


build-debmake:
	@echo -e "\n--- emulating debmake ---\n"
	cd debian/tmp; md5sum $$(find * -type f -not -regex "DEBIAN/.*") \
		> DEBIAN/md5sums
	echo; dpkg -l gcc "libc6*" binutils ldso make dpkg-dev $(BUILDINFO) \
		| awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
		| tee debian/tmp/usr/doc/$(package)/buildinfo.Debian; echo


clean-common: $(checkdir)
	rm -f debian/files debian/*substvars*
	rm -rf $$(find debian -type d -mindepth 1)
	find . \( -type f -size 0 -maxdepth 1 \) -a \
		\( -name "configure*" -o -name "build*" \) -exec rm {} ";"
	find . \( -name "*.bak" -o -name "*~" \) -exec rm {} ";"
	find . \( -name "*.o" -o -name "*.so" -o -name "*.a" \) -exec rm {} ";"
	find debian \( -name "*rm" -o -name "*inst" \) -exec chmod +x {} ";"
	find debian \( -name "init.d" -o -name "*.daily" \) \
		-exec chmod +x {} ";"
	dh_clean
