#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
# tweaked by Stephen Kulow and Ivan Moore for use with KDE

BUILDDIR = ./build

build: build-stamp

-include debian/debiandirs

debian/debiandirs: debian/debianrules
	perl -w debian/debianrules echodirs > debian/debiandirs

build-stamp:
	dh_testdir
	if test ! -f configure; then \
	  $(MAKE) -f admin/Makefile.common ;\
	fi
	./configure $(configkde)
	make
	touch build-stamp

clean: debian-clean
	dh_clean

debian-clean:
	dh_testdir
	-rm -f build-stamp
	if test -d CVS; then \
	  make -f admin/Makefile.common cvs-clean ;\
	fi
	-make distclean

binary-indep: build
	dh_testroot
	dh_testdir
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	install -d debian/tmp/etc/kde2
	make install DESTDIR=`pwd`/debian/tmp/
	perl -w debian/debianrules cleanup
	dh_undocumented
	dh_movefiles
	dh_installdocs
	dh_installmenu
	dh_installmime
	dh_installchangelogs
	dh_strip
	dh_perl
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb       	

# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
