#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Make sure the decades-old source code gets compiled with modern GCC
export DEB_CFLAGS_MAINT_APPEND = \
	-Wno-error=implicit-function-declaration \
	-Wno-error=return-mismatch

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-cpu --prefix=/usr

override_dh_auto_install:
	dh_installdirs
	install src/truecrack $(CURDIR)/debian/truecrack/usr/bin/

override_dh_fixperms:
	dh_fixperms
	chmod 644 debian/truecrack/usr/share/truecrack/most_common_password_10k.txt
