#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Adjusted by Jeroen Massar <jeroen@sixxs.net> for aiccu

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/quilt/quilt.make

%:
	dh $@

build: $(QUILT_STAMPFN)
	dh $@

clean: unpatch
	dh $@
#	dh_testdir
#	rm -f build-stamp configure-stamp
#
#	$(MAKE) clean
#
	# Fix permissions of configuration file
	chmod a-x `pwd`/doc/aiccu.conf

	# Fix permissions of 60aiccu file
	chmod a+x `pwd`/debian/60aiccu

	# Remove empty preinst script
	[ -f `pwd`/debian/aiccu.preinst ] && rm `pwd`/debian/aiccu.preinst || exit 0

#	dh_clean

binary-arch: build install
	dh $@

install: build
	dh $@
	# The license is already duplicated in debian/copyright
	rm `pwd`/debian/aiccu/usr/share/doc/aiccu/LICENSE

binary: binary-arch binary-indep
