#!/usr/bin/make -f


clean:
	dh_testdir
	dh_testroot
	-rm -rf configure-stamp build-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_autotools-dev_restoreconfig
	dh_clean
	-test -r /usr/share/misc/config.sub && \
	  cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	  cp -f /usr/share/misc/config.guess config.guess
				      

configure: configure-stamp
configure-stamp:
	dh_testdir
	dh_autotools-dev_updateconfig
	./configure --prefix=/usr --mandir=/usr/share/man
	touch configure-stamp

build: configure-stamp
build-arch: build
build-indep: build
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

install: build
	dh_testdir
	dh_prep
	$(MAKE) install prefix=`pwd`/debian/gkdebconf/usr \
		mandir=`pwd`/debian/gkdebconf/usr/share/man
	install -d `pwd`/debian/gkdebconf/usr/share/applications
	install -m 644 debian/gkdebconf.desktop  \
		`pwd`/debian/gkdebconf/usr/share/applications



binary: binary-arch binary-indep
binary-indep: install

binary-arch: install
	dpkg-buildflags
	dh_testroot
	dh_testdir
	dh_installdocs
	dh_installchangelogs
	dh_installman
	dh_compress
	dh_installmenu
	dh_fixperms
	dh_strip
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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