summaryrefslogtreecommitdiff
path: root/user/networkmanager/APKBUILD
blob: daf79c413bcbb15d3c7f77934145e4de20c94d75 (plain) (blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=networkmanager
pkgver=1.18.1
pkgrel=0
pkgdesc="Network management daemon"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch="all"
options="!check"  # Requires dbus-python and running DBus server.
license="GPL-2.0+ AND LGPL-2.1+"
depends="dhcpcd iputils ppp wpa_supplicant-dbus"
makedepends="bluez-dev consolekit2-dev curl-dev dbus-dev dbus-glib-dev
	eudev-dev glib-dev gobject-introspection-dev intltool libedit-dev
	libndp-dev libxslt modemmanager-dev ncurses-dev newt-dev nss-dev
	perl polkit-dev ppp-dev py3-pygobject util-linux-dev vala-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
source="https://download.gnome.org/sources/NetworkManager/1.18/NetworkManager-$pkgver.tar.xz
	editline.patch
	errno.patch
	musl.patch
	tests.patch

	01-org.freedesktop.NetworkManager.rules
	10-openrc-status
	nm.confd
	nm.initd
	"
builddir="$srcdir/NetworkManager-$pkgver"

build() {
	# pppd plugin dir is a huge hack.
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-json-validation \
		--disable-more-warnings \
		--disable-ovs \
		--disable-qt \
		--disable-static \
		--enable-bluez5-dun \
		--enable-concheck \
		--enable-polkit=yes \
		--enable-ppp \
		--enable-vala \
		--with-crypto=nss \
		--with-dbus-sys-dir=/etc/dbus-1/system.d \
		--with-dhcpcd \
		--with-ebpf=yes \
		--with-iptables=/sbin/iptables \
		--with-libnm-glib \
		--with-nmcli=yes \
		--with-nmtui \
		--with-pppd-plugin-dir=/usr/lib/pppd/$(ls -1 /usr/lib/pppd | head) \
		--with-session-tracking=consolekit \
		--with-suspend-resume=consolekit \
		--without-dhclient \
		--without-libaudit \
		--without-libpsl \
		--without-netconfig \
		--without-systemd-journal
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -D -m755 "$srcdir"/nm.initd "$pkgdir"/etc/init.d/NetworkManager
	install -D -m644 "$srcdir"/nm.confd "$pkgdir"/etc/conf.d/NetworkManager
	install -D -m600 -t "$pkgdir"/usr/share/polkit-1/rules.d/ \
		"$srcdir"/01-org.freedesktop.NetworkManager.rules
	install -D -m755 -t "$pkgdir"/etc/NetworkManager/dispatcher.d/ \
		"$srcdir"/10-openrc-status
	install -d "$pkgdir"/etc/NetworkManager/system-connections
	touch "$pkgdir"/etc/NetworkManager/system-connections/.keepdir
}

openrc() {
	default_openrc
	mkdir -p "$subpkgdir"/etc/NetworkManager/dispatcher.d
	mv "$pkgdir"/etc/NetworkManager/dispatcher.d/10-openrc-status \
		"$subpkgdir"/etc/NetworkManager/dispatcher.d/
}

sha512sums="24ffd5b5802692ce392a5ce65623679014d4e476cddedf76222829118f3ab4c92e180c1814db80438f66e2ab7a4e93eb1bac1e0b77575ff7620b0bf0e27d2992  NetworkManager-1.18.1.tar.xz
559dc42d3017508bfc35ea91da3d0169d601cd6b1764210fd8a27733e9c6671ec2d2d4d6a88af6749df450ea0c16dbc5269258cf2a0b608b9223688a40ca3ec0  editline.patch
0006d9c538a72673746b6aede8c61e0b7a23b055f8276fa2dde6e70f8c00d60854cf49678c996764f83b40cf06c5c2cd24c8c382d900aaf97fc840342e29500f  errno.patch
2d77b08d737653999631b8d51b884d12a2f6ba62ef99f0115e0fe2513fcdabec44ea67083684a6762dbc0423d9b41706d6223e4751bbabb70e8ef0691af57256  musl.patch
2c987c464c31e6ad5a34abd8401bb625e9438e656a55adca21e07ca6ee974d39b6d7e942805b17a72ef38154612e2475fd7951f185b775945c8bd740226668af  tests.patch
22dfa5b071891ba16b9a8b90a1964d56e370cb640d78191934ae802e568f92c299b9d4d965f7081fb36a8c09378bfb0b33193b2332cbdc28c6799b152128c214  01-org.freedesktop.NetworkManager.rules
26f962cea0b6a75549d16c19a71e3559239b08b001927882702f5d9355a2cc95f7b13c581439f758a950d9a5bfb73b86ba61a5ffb22c9abe19f5b05fe5f5834a  10-openrc-status
f8c9331834cbc66ab0e4e6f4a120fde6a08a435d680a1e1087718fdbb2b9843a313e7ec30b7008822999dafd98e152aa7d2a96f87320ba9c91c3adb63e0b7c9a  nm.confd
a8356480592ec5e818b390b83cb258248d64850748e9e485bed68befabf067219d02fda137ee63684e0cd2c0e4f5fca30f94f8db71f811149183ff4715159658  nm.initd"