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
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
# relative path to the directory of the SUID root helper "mach-helper"; it
# doesn't need to be called directly, and hence does not need to be in
# /usr/sbin, /usr/lib/mach/sbin seems a saner location
# XXX this is also set in debian/mach.postinst
MACH_HELPER_DIR := usr/lib/mach/sbin
# SELinux must be forced and not detected on the build host
ifeq ($(DEB_HOST_ARCH_OS),linux)
DEB_CONFIGURE_EXTRA_FLAGS += --enable-selinux
else
DEB_CONFIGURE_EXTRA_FLAGS += --disable-selinux
endif
# the SUID root helper shouldn't be called directly, and hence does not need to
# be in /usr/sbin; /usr/lib/mach seems a more sane location
DEB_CONFIGURE_EXTRA_FLAGS += --sbindir=/$(MACH_HELPER_DIR)
# ship upstream list of things not to forget
DEB_INSTALL_DOCS_mach += FORGETMENOT
# ship upstream release notes; includes some useful information such as
# upstream mailing-list, upstream bug tracker, another list of supported roots,
# another quickstart, etc.
DEB_INSTALL_DOCS_mach += RELEASE
# ship DOAP XML file (Description Of A Project)
DEB_INSTALL_DOCS_mach += mach.doap
binary-post-install/mach::
# generate ${python:Depends}; /usr/bin/mach is a Python script
dh_pysupport -p$(cdbs_curpkg)
# set SUID root, group executable, and world readable; the upstream
# build doesn't adjust permissions
# XXX the permissions are also fixed in debian/mach.postinst since
# "chgrp" resets these
chmod 4754 debian/$(cdbs_curpkg)/$(MACH_HELPER_DIR)/mach-helper
# drop useless and dangerous *.la files
rm -f debian/$(cdbs_curpkg)/usr/lib/libselinux-mach.la
# do not fix permission of the SUID root helper "mach-helper"
DEB_FIXPERMS_EXCLUDE += $(MACH_HELPER_DIR)/mach-helper
|