aboutsummaryrefslogtreecommitdiffstats
path: root/community/networkmanager-elogind/APKBUILD
blob: e88f89b87ed459a50c7ea3f8f73668e4bfee5ebb (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=networkmanager-elogind
pkgver=1.24.2
pkgrel=2
pkgdesc="Network Management daemon (with elogind hibernation support)"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch="all"
license="GPL-2.0-or-later"
depends="iptables dbus mobile-broadband-provider-info openresolv"
install="$pkgname.pre-install $pkgname.pre-upgrade"
makedepends="$depends_dev
	curl-dev
	dbus-glib-dev
	eudev-dev
	libgudev-dev
	gobject-introspection-dev
	intltool
	libndp-dev
	libnl3-dev
	libsoup-dev
	libteam-dev
	linux-headers
	modemmanager-dev
	newt-dev
	nss-dev
	polkit-dev
	ppp-dev
	readline-dev
	util-linux-dev
	jansson-dev
	vala
	meson
	py3-gobject3
	libpsl-dev
	python3
	elogind-dev
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-lang
	$pkgname-openrc
	$pkgname-bash-completion:bashcomp:noarch
	"
source="$pkgname-$pkgver.tar.xz::https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz
	networkmanager.conf
	networkmanager.initd
	networkmanager.rules
	README.alpine
	musl-basic.patch
	musl-network-support.patch
	musl-fix-includes.patch
	musl-process-util.patch
	musl-compar.patch
	musl-no-drand.patch
	py3.patch
	"
options="!check" # fail to compile on musl
provides="networkmanager"

install_if="networkmanager elogind"

builddir="$srcdir"/NetworkManager-$pkgver

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--buildtype=plain \
		-Dsystemdsystemunitdir=no \
		-Dudev_dir=/lib/udev \
		-Diptables=/sbin/iptables \
		-Ddnsmasq=/usr/sbin/dnsmasq \
		-Dmodify_system=true \
		-Dselinux=false \
		-Dsystemd_journal=false \
		-Dlibaudit=no \
		-Diwd=true \
		-Dpppd=/usr/sbin/pppd \
		-Dconfig_plugins_default=ifupdown \
		-Difupdown=true \
		-Ddhcpcd=true \
		-Dconfig_dhcp_default=internal \
		-Dvapi=true \
		-Dtests=no \
		-Dpolkit_agent=true \
		-Dsession_tracking=elogind \
		-Dsuspend_resume=elogind \
		-Dresolvconf=/usr/sbin/resolvconf \
		-Dqt=false \
		-Dofono=true \
		. output
	ninja -C output introspection/libnmdbus.a
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	install -m755 -D "$srcdir"/networkmanager.initd "$pkgdir"/etc/init.d/networkmanager
	install -m644 -D "$srcdir"/networkmanager.conf "$pkgdir"/etc/NetworkManager/NetworkManager.conf
	# allow plugdev users to modify connections
	install -m644 -D "$srcdir"/networkmanager.rules \
		"$pkgdir"/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules
	mkdir -p "$pkgdir"/usr/share/apk-tools/$pkgname
	# post-install message
	mv "$pkgdir"/usr/share/doc/NetworkManager "$pkgdir"/usr/share/doc/$pkgname
	install -Dm0644 "$srcdir"/README.alpine -t "$pkgdir"/usr/share/doc/$pkgname
}

dev() {
	provides="networkmanager-dev"

	default_dev
}

doc() {
	provides="networkmanager-doc"

	default_doc
}

lang() {
	provides="networkmanager-lang"

	default_lang
}

openrc() {
	provides="networkmanager-openrc"

	default_openrc
}

bashcomp() {
	provides="networkmanager-bash-completion"
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	amove usr/share/bash-completion
}
sha512sums="34fcbdffe5b621ff5d851e6b8de07ddf3f3ad294822adc36d6c36682049cc1f7e0280631ecc38d335871a3ee3483b338106b3a513d46a6cafdf61849027fe923  networkmanager-elogind-1.24.2.tar.xz
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82  networkmanager.conf
5ac6d11b588c479de9c7e1fef79ed0a2c04dc159a2173636a6a77a2867c839cc1609860756109e9e794f23a02238a6d94834d8fb6fcb81a6be3ef1dbf4a34e6f  networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6  networkmanager.rules
744570b30738f0603fe1b83d8f2051277c7bd908bb226e45339b791334d8c2baf4c185a3118bf7739c780e2938dfc11d08f4fc8b3ae6398305f28e528e16c1a2  README.alpine
9d1a9185b0b50f677a4173a8b67e808ba36971111165ae446e9a15b5c7adcc8cc6d44fa7bddac05762c50d80b04818a483756eaf2aaefe0162e1f37cd070fca4  musl-basic.patch
095c1d944f3274ba31435cd1af8e2affb4187bdd921a0cc0c185b59810b73cfab7919b5f551bab3d9e4644fbee8f9ac017b4c5d69a771fb68319cbefa37c71a3  musl-network-support.patch
aa756d7d54aceb213a05746d43367ed1871782f4b9678f3f51b302f4f9c7a4384dd3f6d3a5a4a0106c741faf2b4c13964a57c5aa0c5d0222f653a4d51422857a  musl-fix-includes.patch
b5cd94928ca3ba1fb71aec28d9ff66f319f6d23131e02c90f1dfbfaf16c537935228a9981c95f29ffb74e91752a17801c94d09ca57b7ba98028262b9e8e5d322  musl-process-util.patch
634377674691b52da80ca4c445a727d39cd40269f7deef0d3ccc1e1041cc262e8bc1423200e9a2b0cf1804e9950059ebbbc827f1200c6a97c58bc76080a6d6d2  musl-compar.patch
342fb3eef0e7057b6d8f1a00687af17dc633387d8a25d475e3e9c8de5712221eec8ada634a189e3458dcbb12b20625b99b552acda3927b5baa61b960ce5740eb  musl-no-drand.patch
929add0500198f5bdeaf06daee34c116155ee7182337d5f104693263263871c108eb5278ef748834408803168636e9ece6e39047bf82160c211da47b34e8ca6b  py3.patch"