Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 SHELL := sh -e
4 export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 include /usr/share/dpkg/default.mk
7
8 %:
9 dh ${@}
10
11 override_dh_auto_clean:
12 dh_auto_clean
13 rm -f usr/lib/pkcs11/api/pkcs11
14
15 override_dh_auto_configure:
16 dh_auto_configure -- --enable-tpmtok --with-systemd=/usr/lib/systemd/system ac_cv_path_CHGRP=true
17
18 override_dh_auto_install:
19 dh_auto_install
20
21 # create links to .so-files in usr/lib
22 ( cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) && \
23 for FILE in ./opencryptoki/*.so.* ./opencryptoki/stdll/*.so.*; \
24 do \
25 ln -s $$FILE ; \
26 done \
27 )
28
29 # Remove broken symlinks in /usr/lib/pkcs11/
30 cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkcs11 && rm -f \
31 libopencryptoki.so PKCS11_API.so
32
33 # Removing useless files
34 rm -rf debian/tmp/etc/ld.so.conf.d
35 rm -rf debian/tmp/etc/init.d
36 rm -f debian/tmp/usr/include/Makefile*
37 rm -f debian/tmp/usr/include/*/Makefile*
38 rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/opencryptoki/*.la \
39 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/opencryptoki/stdll/*.la
40 rm -f debian/tmp/usr/lib/systemd/system/tmpfiles.conf
41
42 override_dh_install:
43 # We need to be explicit on the sourcedir because the source tree mirrors the
44 # installed tree layout, leading to source files being installed in /usr/sbin
45 # when using the default.
46 dh_install --sourcedir=debian/tmp
47
48 override_dh_installinit:
49 dh_installinit -p opencryptoki --name pkcsslotd