#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# See FEATURE AREAS in dpkg-buildflags(1).
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	# nothing to build

execute_after_dh_auto_build:
	# generate manpages
	docbook-to-man opencrypt.sgml > opencrypt.7
	docbook-to-man opencrypt.conf.sgml > opencrypt.conf.5

execute_after_dh_fixperms-indep:
	chmod 0755 debian/opencrypt/usr/share/initramfs-tools/hooks/opencrypt
	chmod 0755 debian/opencrypt/usr/share/initramfs-tools/scripts/init-premount/opencrypt
	chmod 0644 debian/opencrypt/usr/share/opencrypt/functions.sh
	chmod 0644 debian/opencrypt/usr/share/opencrypt/script-functions.sh
	chmod 0755 debian/opencrypt/usr/share/opencrypt/genkey

execute_after_dh_builddeb:
	# clean manpages
	#rm opencrypt.7
	#rm opencrypt.conf.5

