Debian Codegraph @

packaging/debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/default.mk
4
5 %:
6 dh $@ --with systemd
7
8 # this should track the definition of USERCOMPILE in mk/userland.mk:46
9 # but without -fstack-protector-all for arches that lack stack-protector
10 ifneq (,$(filter $(DEB_HOST_ARCH), hppa alpha ia64))
11 export USERCOMPILE = -fexceptions -fno-strict-aliasing -fPIE -DPIE
12 endif
13
14 ifeq ($(DEB_HOST_ARCH_OS),linux)
15 ENABLE_SELINUX = USE_LABELED_IPSEC=true USE_LINUX_AUDIT=true
16 ENABLE_LIBCAP_NG = USE_LIBCAP_NG=true
17 else
18 ENABLE_SELINUX = USE_LABELED_IPSEC=false USE_LINUX_AUDIT=false
19 ENABLE_LIBCAP_NG = USE_LIBCAP_NG=false
20 endif
21
22 override_dh_auto_build:
23 dh_auto_build -- programs \
24 ARCH=$(DEB_HOST_ARCH) \
25 IPSECVERSION=$(DEB_VERSION_UPSTREAM_REVISION) \
26 PREFIX=/usr \
27 LIBEXECDIR=/usr/libexec/ipsec \
28 MANDIR=/usr/share/man \
29 USE_LDAP=true \
30 INITSYSTEM=systemd \
31 $(ENABLE_LIBCAP_NG) \
32 $(ENABLE_SELINUX)
33
34 override_dh_auto_install-arch:
35 # Add here commands to install the package into debian/libreswan
36 $(MAKE) install \
37 ARCH=$(DEB_HOST_ARCH) \
38 IPSECVERSION=$(DEB_VERSION_UPSTREAM_REVISION) \
39 PREFIX=/usr \
40 LIBEXECDIR=/usr/libexec/ipsec \
41 MANDIR=/usr/share/man \
42 USE_LDAP=true \
43 INITSYSTEM=systemd \
44 $(ENABLE_LIBCAP_NG) \
45 $(ENABLE_SELINUX) \
46 DESTDIR=$(CURDIR)/debian/libreswan
47
48 override_dh_auto_test:
49 echo "Skip dh_auto_test"
50
51 override_dh_strip:
52 dh_strip --dbg-package=libreswan-dbg