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 62 63 64 65 66 67 68 69 70 71
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEBVER := $(shell dpkg-parsechangelog -S Version)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh ${@} --parallel --with autoreconf
override_dh_auto_configure:
dh_auto_configure -- \
--libdir /lib/$(DEB_HOST_MULTIARCH) \
--disable-silent-rules \
--enable-opaque-hierarchy="name=systemd"
override_dh_auto_test:
# Disabled. Requires root and also modifies the testbed.
override_dh_installdirs:
dh_installdirs
# While the PAM module and the library are in /lib, according to the
# FHS, development files must go into usr/lib/<triplet>.
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_install:
dh_auto_install
# libcgroup-dev:
# Move the development files from lib/ to usr/lib. The pkgconfig files
# can be moved as-is, but we need to redirect the .so symlink. dh_link
# will later correct this link for us (from relative to absolute).
cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) && \
mv ../../../lib/$(DEB_HOST_MULTIARCH)/pkgconfig . && \
ln -s ../../../lib/$(DEB_HOST_MULTIARCH)/libcgroup.so.*.*.* libcgroup.so
# libpam-cgroup:
# Rename the PAM module to pam_cgroup.so
cd debian/tmp/lib/$(DEB_HOST_MULTIARCH)/security && \
rm -f pam_cgroup.so && \
mv pam_cgroup.so.*.*.* pam_cgroup.so
# Remove unwanted/unused files (because of --fail-missing)
cd debian/tmp/lib/$(DEB_HOST_MULTIARCH) && \
rm -f *.so security/pam_cgroup.so.* *.la security/*.la
override_dh_install:
dh_install --fail-missing
override_dh_compress:
dh_compress -Xexamples
override_dh_strip:
dh_strip --dbgsym-migration='libcgroup-dbg (<< $(DEBVER)~)'
override_dh_makeshlibs:
dh_makeshlibs -Xpam_cgroup.so
|