summary refs log tree commit diff
path: root/debian/rules
blob: 140dbbe77e75b2ce162cce4eb5fd3474cf48c8d9 (plain)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# Disable lto here regardless of whether we enable the configure flag
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1070
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto

export PYTHON=/usr/bin/python3

PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir)

%:
	dh $@ --with ppp

override_dh_autoreconf:
	NOCONFIGURE=true dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/NetworkManager \
		--runstatedir=/run \
		--with-pppd-plugin-dir=$(PPPD_PLUGIN_DIR) \
		--with-pppd=/usr/sbin/pppd \
		--with-nft=/usr/sbin/nft \
		--with-iptables=/usr/sbin/iptables \
		--with-resolvconf=/sbin/resolvconf \
		--with-dhclient=/sbin/dhclient \
		--with-dnsmasq=/usr/sbin/dnsmasq \
		--with-polkit-agent-helper-1=/usr/lib/policykit-1/polkit-agent-helper-1 \
		--with-systemdsystemunitdir=/lib/systemd/system \
		--with-udev-dir=/lib/udev \
		--with-dbus-sys-dir=/usr/share/dbus-1/system.d \
		--with-crypto=gnutls \
		--with-session-tracking=systemd \
		--with-suspend-resume=systemd \
		--with-modem-manager-1 \
		--with-nmtui \
		--with-nmcli \
		--with-selinux \
		--with-libaudit \
		--with-iwd \
		--without-dhcpcanon \
		--without-nm-cloud-setup \
		--enable-polkit \
		--enable-polkit-agent \
		--enable-ppp \
		--enable-ifupdown \
		--enable-introspection \
		--enable-gtk-doc \
		--enable-concheck \
		--enable-teamdctl \
		--enable-json-validation \
		--enable-bluez5-dun \
		--enable-vala \
		--disable-more-warnings \
		--disable-modify-system \
		--disable-ovs

override_dh_install:
	find debian/tmp -name '*.la' -print -delete
	dh_install

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/ -X/usr/lib/pppd/

override_dh_installsystemd:
	dh_installsystemd -pnetwork-manager --no-start NetworkManager-dispatcher.service NetworkManager-wait-online.service nm-priv-helper.service
	dh_installsystemd -pnetwork-manager --no-also NetworkManager.service

override_dh_ppp:
	dh_ppp --breaks