Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #DH_VERBOSE = 1
5
6 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7 DPKG_EXPORT_BUILDFLAGS = 1
8 include /usr/share/dpkg/default.mk
9
10 # see FEATURE AREAS in dpkg-buildflags(1)
11 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12
13 # see ENVIRONMENT in dpkg-buildflags(1)
14 # package maintainers to append CFLAGS
15 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
16 # package maintainers to append LDFLAGS
17 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
18
19 SKIP_64BIT_ON_CPU="aarch64 alpha ia64 mips64 mips64el riscv64 mipsisa64r6 mipsisa64r6el"
20
21 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
22
23 ifeq ($(DEB_HOST_ARCH_BITS),64)
24 # -m64 is not recognized on most architectures
25 ifeq (,$(findstring $(DEB_HOST_GNU_CPU),$(SKIP_64BIT_ON_CPU)))
26 CONFIGURE_FLAGS = --enable-64bit
27 endif
28 endif
29
30 %:
31 dh $@ --with autoreconf
32
33 override_dh_auto_configure:
34 dh_auto_configure -- \
35 --sysconfdir=/etc/softhsm \
36 --localstatedir=/var \
37 --with-crypto-backend=openssl \
38 --with-migrate \
39 --with-pic \
40 --disable-gost \
41 --enable-ecc \
42 --enable-eddsa \
43 $(CONFIGURE_FLAGS)
44
45 override_dh_installchangelogs:
46 dh_installchangelogs NEWS
47
48 override_dh_install:
49 install -m 0755 -d $(CURDIR)/debian/tmp/usr/include/softhsm/
50 install -m 0644 $(CURDIR)/src/lib/pkcs11/*.h $(CURDIR)/debian/tmp/usr/include/softhsm/
51 find $(CURDIR)/debian/tmp -name *.la | xargs rm -f
52 dh_install
53
54 override_dh_link:
55 #FIXME when all packages know that we have move to multiarch libdir, we cannot remove this symlink
56 #While I have no idea when we can finish this.
57 dh_link -plibsofthsm2 usr/lib/$(DEB_HOST_MULTIARCH)/softhsm/libsofthsm2.so usr/lib/softhsm/libsofthsm2.so
58 dh_link
59
60 override_dh_strip:
61 dh_strip -O--dbgsym-migration='softhsm2-dbg (<< 2.2.0-2~)'