File: rules

package info (click to toggle)
softhsm2 2.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,160 kB
  • sloc: cpp: 65,886; sh: 4,363; ansic: 2,018; makefile: 655
file content (61 lines) | stat: -rwxr-xr-x 1,852 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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 \
	  --enable-ecc \
	  --enable-eddsa \
	  $(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~)'