| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
|
| 5 |
export systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,) |
| 6 |
|
| 7 |
include /usr/share/dpkg/default.mk |
| 8 |
|
| 9 |
%: |
| 10 |
dh ${@} --buildsystem=meson |
| 11 |
|
| 12 |
override_dh_auto_configure: |
| 13 |
dh_auto_configure -- \ |
| 14 |
-Dman=true \ |
| 15 |
-Dapparmor=true \ |
| 16 |
-Dselinux=true \ |
| 17 |
-Dcapabilities=true \ |
| 18 |
-Dexamples=true \ |
| 19 |
-Dpam-cgroup=true \ |
| 20 |
-Dtests=true \ |
| 21 |
-Dinit-script=sysvinit,systemd |
| 22 |
|
| 23 |
override_dh_clean: |
| 24 |
dh_clean |
| 25 |
|
| 26 |
override_dh_auto_build: |
| 27 |
dh_auto_build |
| 28 |
# See https://github.com/lxc/lxc/issues/4156 |
| 29 |
cd doc/api/ && doxygen |
| 30 |
|
| 31 |
override_dh_auto_install: |
| 32 |
dh_auto_install |
| 33 |
|
| 34 |
# install pam config |
| 35 |
cp $(CURDIR)/debian/pam-cgfs.config \ |
| 36 |
$(CURDIR)/debian/libpam-cgfs/usr/share/pam-configs/cgfs |
| 37 |
|
| 38 |
# cleanup .la files |
| 39 |
find debian/tmp/ -type f -name \*.la -delete |
| 40 |
|
| 41 |
# move the tests |
| 42 |
mkdir -p debian/lxc-tests/usr/bin |
| 43 |
mv debian/tmp/usr/bin/lxc-test-* debian/lxc-tests/usr/bin/ |
| 44 |
|
| 45 |
# increase limit of inotify listeners |
| 46 |
mkdir -p debian/tmp/etc/sysctl.d |
| 47 |
cp debian/lxc.sysctl debian/tmp/etc/sysctl.d/30-lxc-inotify.conf |
| 48 |
|
| 49 |
# fix the sysvinit script name |
| 50 |
mv $(CURDIR)/debian/tmp/etc/init.d/lxc-containers \ |
| 51 |
$(CURDIR)/debian/tmp/etc/init.d/lxc |
| 52 |
|
| 53 |
dh_apparmor -p liblxc-common --profile-name=usr.bin.lxc-copy |
| 54 |
dh_apparmor -p liblxc-common --profile-name=usr.bin.lxc-start |
| 55 |
|
| 56 |
override_dh_compress: |
| 57 |
dh_compress -X.cfg |
| 58 |
|
| 59 |
override_dh_fixperms: |
| 60 |
dh_fixperms -Xusr/libexec/lxc/lxc-user-nic |
| 61 |
|
| 62 |
override_dh_installinit: |
| 63 |
dh_installinit -p lxc --onlyscripts --no-stop-on-upgrade --no-start --name lxc |
| 64 |
dh_installinit -p lxc --onlyscripts --no-stop-on-upgrade --no-start --name lxc-net |
| 65 |
|
| 66 |
override_dh_installsystemd: |
| 67 |
dh_installsystemd --no-stop-on-upgrade |
| 68 |
|
| 69 |
override_dh_missing: |
| 70 |
dh_missing --fail-missing |
| 71 |
|
| 72 |
override_dh_gencontrol: |
| 73 |
dh_gencontrol -- -Vmisc:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version})' -W libc-dev-bin)" |