#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	docbook-to-man debian/pngcrush.sgml > pngcrush.1
	sed -e '1,/^<pre>$$/d' -e '/<\/pre>/,$$d' < ChangeLog.html > changelog

override_dh_auto_clean:
	dh_auto_clean
	rm -f pngcrush.1 changelog

# without this, the binary may be unnecessarily linked with libm
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
