#!/usr/bin/make -f

dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS="hardening=+pie" dpkg-buildflags

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		$(shell $(dpkg_buildflags) --export=configure) \
		--with-unique

override_dh_install:
	dh_install
	# upstream does not ship the XPM yet and won't install it by default
	# anyway as it's pretty much specific to Debian
	mkdir "$(CURDIR)/debian/gobby-0.5/usr/share/pixmaps"
	cp "$(CURDIR)/debian/gobby-0.5.xpm" \
	   "$(CURDIR)/debian/gobby-0.5/usr/share/pixmaps"

override_dh_strip:
	dh_strip -a --dbg-package=gobby-0.5-dbg

override_dh_builddeb:
	dh_builddeb -- -Zxz

