#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #DH_VERBOSE = 1 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk # see FEATURE AREAS in dpkg-buildflags(1) export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed SKIP_64BIT_ON_CPU="aarch64 alpha ia64 mips64 mips64el riscv64 mipsisa64r6 mipsisa64r6el" export DPKG_GENSYMBOLS_CHECK_LEVEL=4 ifeq ($(DEB_HOST_ARCH_BITS),64) # -m64 is not recognized on most architectures ifeq (,$(findstring $(DEB_HOST_GNU_CPU),$(SKIP_64BIT_ON_CPU))) CONFIGURE_FLAGS = --enable-64bit endif endif %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- \ --sysconfdir=/etc/softhsm \ --localstatedir=/var \ --with-crypto-backend=openssl \ --with-migrate \ --with-pic \ --disable-gost \ $(CONFIGURE_FLAGS) override_dh_installchangelogs: dh_installchangelogs NEWS override_dh_install: install -m 0755 -d $(CURDIR)/debian/tmp/usr/include/softhsm/ install -m 0644 $(CURDIR)/src/lib/pkcs11/*.h $(CURDIR)/debian/tmp/usr/include/softhsm/ find $(CURDIR)/debian/tmp -name *.la | xargs rm -f dh_install override_dh_link: #FIXME when all packages know that we have move to multiarch libdir, we cannot remove this symlink #While I have no idea when we can finish this. dh_link -plibsofthsm2 usr/lib/$(DEB_HOST_MULTIARCH)/softhsm/libsofthsm2.so usr/lib/softhsm/libsofthsm2.so dh_link override_dh_strip: dh_strip -O--dbgsym-migration='softhsm2-dbg (<< 2.2.0-2~)'