#!/usr/bin/make -f # https://pkg-perl.alioth.debian.org/debhelper.html#Occasionally_Useful PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) # https://wiki.debian.org/HardeningWalkthrough export DEB_BUILD_MAINT_OPTIONS = hardening=+all #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed #export DH_VERBOSE=1 # Needed to pass the dh-generated buildflags to the configure script export EXTRA_CFLAGS=$(CFLAGS) $(CPPFLAGS) export EXTRA_LDFLAGS=$(LDFLAGS) %: dh $@ override_dh_auto_clean: dh_auto_clean # Manually remove leftover file. rm -fv s-nail-uninstall.sh override_dh_auto_configure: $(MAKE) config \ VERBOSE=1 \ VAL_PREFIX=/usr \ VAL_LIBEXECDIR=/usr/lib/s-nail \ VAL_SYSCONFDIR=/etc \ VAL_MTA=/usr/sbin/sendmail \ VAL_MAIL=/var/mail override_dh_fixperms: dh_fixperms # This could be avoided with VAL_PRIVSEP_GROUP=mail, but this # setting has been deprecated upstream. chgrp mail $(TMP)/usr/lib/s-nail/s-nail-privsep override_dh_auto_test: export HOME=$(shell mktemp -d "$$PWD/TESTHOME.XXXXXXXX") override_dh_auto_test: # Avoid override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) dh_auto_test rm -rf TESTHOME.* endif override_dh_installchangelogs: dh_installchangelogs NEWS