#!/usr/bin/make -f

tmp = $(CURDIR)/debian/$(shell dh_listpackages)

%:
	dh $@

override_dh_install:
	dh_install
	mkdir -p $(tmp)/usr/share/foo
	echo "Back-up file" > $(tmp)/usr/share/foo/file~
	touch $(tmp)/usr/share/foo/'*'
	touch $(tmp)/usr/share/foo/'ws '

override_dh_fixperms:
	dh_fixperms
	chmod 755 $(tmp)/usr/share/man/man5/foo.5.gz
	chmod 644 $(tmp)/etc/sudoers.d/*

override_dh_compress:
	dh_compress
	# create a .png and .png.gz
	gzip -1 $(tmp)/usr/share/doc/lintian/lintian-16x16.png
	zcat $(tmp)/usr/share/doc/lintian/lintian-16x16.png.gz > \
		$(tmp)/usr/share/doc/lintian/lintian-16x16.png

override_dh_link:
	dh_link
	mkdir -p $(tmp)/usr/share/doc/bar
	echo "Hallo World" > $(tmp)/usr/share/doc/bar/foo
	ln -s ../bar/foo $(tmp)/usr/share/doc/bar/star
