File: rules

package info (click to toggle)
policykit-1 122-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,280 kB
  • sloc: ansic: 20,980; sh: 12,380; xml: 4,321; cpp: 1,031; makefile: 173; python: 124; javascript: 83; sed: 16; perl: 11
file content (86 lines) | stat: -rwxr-xr-x 2,228 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/make -f
# -*- makefile -*-

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

include /usr/share/dpkg/default.mk

built_binaries := $(shell dh_listpackages)

%:
	dh $@ --with xml-core

DPKG_GENSYMBOLS_CHECK_LEVEL=4
export DPKG_GENSYMBOLS_CHECK_LEVEL

configure_flags =
compat_configure_flags =

ifeq ($(filter %-doc,$(built_binaries)),)
configure_flags += -Dgtk_doc=false
else
configure_flags += -Dgtk_doc=true
endif

ifeq (linux,$(DEB_HOST_ARCH_OS))
configure_flags += -Dsession_tracking=libsystemd-login
else
configure_flags += -Dsession_tracking=ConsoleKit
endif

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --sourcedirectory=polkit-pkla-compat

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dexamples=false \
		-Dintrospection=true \
		-Dman=true \
		-Dsystemdsystemunitdir=/lib/systemd/system \
		-Dtests=true \
		$(configure_flags)
	dh_auto_configure \
		--sourcedirectory=polkit-pkla-compat \
		-- \
		--bindir=/usr/sbin \
		POLKIT_CFLAGS="-I$(CURDIR)/src -I$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src" \
		POLKIT_LIBS="$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/polkit/libpolkit-gobject-1.so" \
		$(compat_configure_flags)

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --sourcedirectory=polkit-pkla-compat

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# on buildds we can't rely on actually having a system bus
	dbus-run-session -- \
		sh -euc 'export DBUS_SYSTEM_BUS_ADDRESS="$$DBUS_SESSION_BUS_ADDRESS"; exec "$$@"' \
		sh \
		dh_auto_test \
		-- \
		$(NULL)
	dbus-run-session -- \
		sh -euc 'export DBUS_SYSTEM_BUS_ADDRESS="$$DBUS_SESSION_BUS_ADDRESS"; exec "$$@"' \
		sh \
		env LD_LIBRARY_PATH="$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/polkit" \
		dh_auto_test --sourcedirectory=polkit-pkla-compat \
		-- \
		$(NULL)
endif

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --sourcedirectory=polkit-pkla-compat

override_dh_install:
	# on Debian use sudo group; on Ubuntu, also allow the admin group for
	# historical reasons
	if dpkg-vendor --is ubuntu; then \
		install -m644 debian/49-ubuntu-admin.rules debian/tmp/usr/share/polkit-1/rules.d/; \
	fi
	dh_install

override_dh_installsystemd:
	dh_installsystemd --no-start --restart-after-upgrade