| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow |
| 5 |
|
| 6 |
include /usr/share/dpkg/default.mk |
| 7 |
include /usr/share/debhelper/dh_package_notes/package-notes.mk |
| 8 |
|
| 9 |
built_binaries := $(shell dh_listpackages) |
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ --with xml-core |
| 13 |
|
| 14 |
DPKG_GENSYMBOLS_CHECK_LEVEL=4 |
| 15 |
export DPKG_GENSYMBOLS_CHECK_LEVEL |
| 16 |
|
| 17 |
configure_flags = |
| 18 |
compat_configure_flags = |
| 19 |
|
| 20 |
ifeq ($(filter %-doc,$(built_binaries)),) |
| 21 |
configure_flags += -Dgtk_doc=false |
| 22 |
else |
| 23 |
configure_flags += -Dgtk_doc=true |
| 24 |
endif |
| 25 |
|
| 26 |
ifeq (linux,$(DEB_HOST_ARCH_OS)) |
| 27 |
configure_flags += -Dsession_tracking=logind |
| 28 |
else |
| 29 |
configure_flags += -Dsession_tracking=ConsoleKit |
| 30 |
endif |
| 31 |
|
| 32 |
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) |
| 33 |
configure_flags += --cross-file=$(DEB_HOST_GNU_TYPE)-gobject-introspection.ini |
| 34 |
endif |
| 35 |
|
| 36 |
override_dh_auto_configure: |
| 37 |
dh_auto_configure -- \ |
| 38 |
-Dexamples=false \ |
| 39 |
-Dintrospection=true \ |
| 40 |
-Dman=true \ |
| 41 |
-Dtests=true \ |
| 42 |
-Dgettext=true \ |
| 43 |
-Dos_type=debian \ |
| 44 |
-Dprivileged_group=sudo \ |
| 45 |
$(configure_flags) |
| 46 |
|
| 47 |
override_dh_auto_test: |
| 48 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 49 |
# on buildds we can't rely on actually having a system bus |
| 50 |
dbus-run-session -- \ |
| 51 |
sh -euc 'export DBUS_SYSTEM_BUS_ADDRESS="$$DBUS_SESSION_BUS_ADDRESS"; exec "$$@"' \ |
| 52 |
sh \ |
| 53 |
dh_auto_test \ |
| 54 |
-- \ |
| 55 |
$(NULL) |
| 56 |
endif |
| 57 |
|
| 58 |
execute_before_dh_install: |
| 59 |
# on Debian use sudo group; on Ubuntu, also allow the admin group for |
| 60 |
# historical reasons |
| 61 |
if dpkg-vendor --is ubuntu; then \ |
| 62 |
install -m644 debian/49-ubuntu-admin.rules debian/tmp/usr/share/polkit-1/rules.d/; \ |
| 63 |
fi |
| 64 |
|
| 65 |
override_dh_installsystemd: |
| 66 |
dh_installsystemd -p polkitd --no-start --restart-after-upgrade polkit.service |
| 67 |
dh_installsystemd -p polkitd --restart-after-upgrade polkit-agent-helper.socket |