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 72 73 74 75 76 77
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh ${@} --with autoreconf
override_dh_auto_configure:
dh_auto_configure -- \
--disable-rpath \
--enable-doc \
--enable-api-docs \
--enable-apparmor \
--enable-selinux \
--enable-capabilities \
--enable-examples \
--enable-pam \
--with-pamdir=/usr/lib/${DEB_HOST_MULTIARCH}/ \
--disable-mutex-debugging \
--enable-bash \
--enable-tests \
--enable-configpath-log \
--with-distro=debian \
--with-init-script=sysvinit,systemd \
--with-systemdsystemunitdir=/lib/systemd/system
override_dh_auto_install:
dh_auto_install
# install pam config
cp $(CURDIR)/debian/pam-cgfs.config \
$(CURDIR)/debian/libpam-cgfs/usr/share/pam-configs/cgfs
# cleanup .la files
find debian/tmp/ -type f -name \*.la -delete
find debian/tmp/ -type f -name \*.a -delete
# lxc
grep complete debian/tmp/usr/share/bash-completion/completions/lxc | sed "s/.* //g" | while read cmd; do \
dh_link -p lxc usr/share/bash-completion/completions/lxc usr/share/bash-completion/completions/$${cmd}; \
done
# move the tests
mkdir -p debian/lxc-tests/usr/bin
mv debian/tmp/usr/bin/lxc-test-* debian/lxc-tests/usr/bin/
# remove lxc-top until lua-alt-getopt is available
rm -f debian/tmp/usr/bin/lxc-top
rm -f debian/tmp/usr/share/man/*/lxc-top.*
rm -f debian/tmp/usr/share/man/*/*/lxc-top.*
# increase limit of inotify listeners
mkdir -p debian/tmp/etc/sysctl.d
cp debian/lxc.sysctl debian/tmp/etc/sysctl.d/30-lxc-inotify.conf
dh_apparmor -p lxc --profile-name=usr.bin.lxc-start
override_dh_compress:
dh_compress -X.cfg
override_dh_fixperms:
dh_fixperms -Xusr/lib/$(DEB_HOST_MULTIARCH)/lxc/lxc-user-nic
override_dh_installinit:
dh_installinit -p lxc --onlyscripts --no-restart-on-upgrade --no-start --name lxc
dh_installinit -p lxc --onlyscripts --no-restart-on-upgrade --no-start --name lxc-net
override_dh_strip:
dh_strip --dbgsym-migration='lxc-dbg (<< 2:2.0.5-2~)'
override_dh_installsystemd:
dh_installsystemd --no-restart-on-upgrade
override_dh_missing:
dh_missing --fail-missing
|