#!/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.

build:
	dh_testdir
## prefix is useless and leads to problems, since configure looks for
## $prefix/include only, if it's given
	( CFLAGS="-O2 -g -Wall" \
	 CXXFLAGS="-O2 -g -Wall" \
	./configure --enable-debug --with-install-root=`pwd`/debian/tmp \
	--disable-rpath )

	make

	touch build

clean:
	dh_testdir
	-rm -f build
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -f `find . -name "*.moc"`
	-rm -rf debian/tmp debian/files* core debian/substvars \
		debian/menu debian/*shlibs* 
	-rm -f config.log libtool

binary-indep:	build
	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_testroot
	dh_testdir
	dh_clean -k
	make install 
	chmod +x debian/kderules
	debian/kderules
	dh_movefiles
	dh_undocumented `cat debian/man-pages`
	dh_installdocs
	dh_installchangelogs
	dh_strip
	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
