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
|
#!/usr/bin/make -f
# -*- makefile -*-
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh $@ --with autoreconf,gir
DPKG_GENSYMBOLS_CHECK_LEVEL=4
export DPKG_GENSYMBOLS_CHECK_LEVEL
ifeq (linux,$(DEB_HOST_ARCH_OS))
SYSTEMD_CONFIG_FLAG = --enable-systemd
else
SYSTEMD_CONFIG_FLAG = --disable-systemd
endif
override_dh_auto_configure:
dh_auto_configure -- \
--enable-gtk-doc \
--enable-man-pages \
--enable-introspection \
$(SYSTEMD_CONFIG_FLAG) \
--disable-examples \
--libexecdir=\$${prefix}/lib/policykit-1
override_dh_auto_test:
# on buildds we can't rely on actually having a system bus
dbus-run-session -- sh -c 'DBUS_SYSTEM_BUS_ADDRESS=$$DBUS_SESSION_BUS_ADDRESS make check'
override_dh_makeshlibs:
dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/polkit-1/
override_dh_install-arch:
dh_install -a
# on Debian use sudo group; on Ubuntu, also allow the admin group for
# historical reasons
if dpkg-vendor --is ubuntu; then \
/bin/echo -e "[Configuration]\nAdminIdentities=unix-group:sudo;unix-group:admin" > debian/policykit-1/etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf; \
elif dpkg-vendor --is debian; then \
/bin/echo -e "[Configuration]\nAdminIdentities=unix-group:sudo" > debian/policykit-1/etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf; \
fi
|