#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs -Wl,--as-needed

%:
	dh $@ --with gnome

override_dh_auto_configure:
	dh_auto_configure -- \
		--bindir=\$${prefix}/games \
		--with-pysol-card-theme-path=/usr/share/games/pysol \
		-with-platform=gtk-only

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_fixperms:
	dh_fixperms -X/usr/games/sol

override_dh_makeshlibs:
	dh_makeshlibs -p aisleriot --no-act
	dh_makeshlibs --remaining-packages

override_dh_missing:
	dh_missing --fail-missing

# Build fails if it tries to strip the .go files
# https://bugs.debian.org/907061
override_dh_strip:
	dh_strip -X.go
