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
|
#!/usr/bin/make -f
# -*- makefile -*-
#
# # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export LIBDIR=$${DESTDIR}/usr/lib/${DEB_HOST_MULTIARCH}
export PYTHON=python3
export PYTHONLIBDIR=$${DESTDIR}/usr/lib/$(shell py3versions -d)
export INITDIR=$${DESTDIR}/etc/init.d
export SYSCONFDIR=$${DESTDIR}/etc/default
export SYSTEMDDIR=$${DESTDIR}/lib/systemd
export HLLDIR=$${DESTDIR}/usr/lib/selinux/hll
#export SHLIBDIR=$${DESTDIR}/lib/${DEB_HOST_MULTIARCH}
#export LIBBASE=lib/${DEB_HOST_MULTIARCH}
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
# missing (hardening) flags. dpkg_buildflags is necessary because $(shell ..)
# doesn't use local environment variables.
dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags
export DEB_CFLAGS_MAINT_APPEND = $(shell $(dpkg_buildflags) --get CPPFLAGS)
# Build newrole executable with the audit and namespace support
export LSPP_PRIV=y
%:
dh $@ --with python3 --with systemd
override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
override_dh_install:
dh_install --list-missing
override_dh_installinit:
dh_installinit -pmcstrans
dh_installinit -prestorecond
dh_installinit --no-start --name=selinux-autorelabel
# We don't have a -mark LSB initscript, so we don't need maintainer script for it (-n)
dh_installinit -n --name=selinux-autorelabel-mark
override_dh_installpam:
dh_installpam -pnewrole --name=newrole
dh_installpam -pnewrole --name=run_init
|