#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_SHARED_LIBS=OFF \
	                     -DENABLE_BOOST_STATIC_LIBS=OFF \
	                     -DIS_SUPERTUX_RELEASE=ON

override_dh_install:
	# Fix lintian warning script-not-executable
	chmod +x $(CURDIR)/debian/tmp/usr/share/games/supertux2/sounds/normalize.sh
	# Remove unneeded files
	rm -rf $(CURDIR)/debian/tmp/usr/share/doc/supertux2
	cp $(CURDIR)/data/images/engine/icons/supertux-256x256.png supertux.png
	dh_install --exclude=COPYING

override_dh_installchangelogs:
	dh_installchangelogs NEWS.md

override_dh_clean:
	dh_clean
	$(RM) supertux.png

# MX don't need no stinkin' dbgsyms
override_dh_strip:
	dh_strip --no-automatic-dbgsym
