#!/usr/bin/make -f

clean:
	dh_testdir
	#dh_auto_clean
	dh_clean
	#make clean

install:
	make DESTDIR=`pwd`/debian/tmp install
	dh_testroot
	dh_installdirs
	dh_install
	dh_installdocs
	dh_installman
	dh_installmenu
	dh_installmime
	dh_fixperms
	dh_movefiles

binary-arch: build
	# doesn't work. dpkg-shlibdeps debian/tmp/usr/bin/*
	#dpkg-gencontrol -isp
	#dpkg --build debian/tmp ..
	dh_installdeb
	dh_md5sums
	dh_gencontrol
	dh_builddeb

binary-indep: install
	dh_installdeb
	dh_md5sums
	dh_gencontrol
	dh_builddeb

build:
	#dh_testdir
	#dh_configure
	#dh_auto_build
	#dh_auto_test
	./configure --sysconfdir=/etc --prefix=/opt
	make
	#dh_build


binary: binary-indep binary-arch
.PHONY: binary-indep binary-arch binary

# too new:
#%:
#	dh $@