#!/usr/bin/make -f

# debian/rules - file to build debian package
#
# Copyright (C) 1999 Josip Rodin.
# Copyright (C) 1999 Tom Lees.
# Copyright (C) 2002 Arthur de Jong.
#
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# On Debian GNU/Linux systems, the complete text of the GNU General Public
# License can be found in /usr/share/common-licenses/GPL.

export DH_VERBOSE=1

export DH_COMPAT=3

build:
	dh_testdir
	$(MAKE) 

clean:
	dh_testdir
	dh_testroot
	$(MAKE) clean
	dh_clean

install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -A usr/lib/gnupg
#	install -c -s -m 644 idea `pwd`/debian/gnupg-idea/usr/lib/gnupg
	dh_install idea usr/lib/gnupg

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs -A README
	dh_installchangelogs -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dpkg-shlibdeps debian/gnupg-idea/usr/lib/gnupg/idea
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
