pmaports/temp/networkmanager/APKBUILD
Oliver Smith 2ac369ed8f
temp/{networkmanager,wpa_supplicant}: new aports (!547)
Fork from Alpine to apply Martijn's patch:
https://github.com/alpinelinux/aports/pull/9894

"This makes wpa_supplicant run in dbus mode if no config file has been
created for it, fixing the networkmanager integration. This config has
been used for a long time in postmarketOS and works fine.

It also removes the iwd dependency from networkmanager again so
wpa_supplicant is used because iwd doesn't support as many chipsets as
wpa_supplicant and it doesn't run on older kernels."

[ci:skip-build]: already built successfully in CI for x86_64, I've
                 tested that it builds for armhf and aarch64 too.
2019-08-06 11:27:35 +02:00

120 lines
4.4 KiB
Text

# Forked from Alpine until this is merged:
# https://github.com/alpinelinux/aports/pull/9894
pkgname=networkmanager
pkgver=1.18.2
pkgrel=2
pkgdesc="Network Management daemon"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch="all !s390x" # Limited by iwd
license="GPL-2.0-or-later"
depends="dhcpcd iptables dbus"
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
py-gobject3
libpsl-dev
python2
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
source="https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz
$pkgname.conf
$pkgname.initd
$pkgname.rules
musl-basic.patch
musl-network-support.patch
musl-fix-includes.patch
musl-process-util.patch
musl-has-not-secure-getenv.patch
musl-compar.patch
fix-ppc64le-build.patch
"
options="!check" # fail to compile on musl
builddir="$srcdir"/NetworkManager-$pkgver
build() {
meson \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
-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=dhcpcd \
-Dvapi=true \
-Dtests=no \
-Dlibnm_glib=true \
-Dpolkit_agent=true \
-Dsession_tracking=no \
-Dqt=false \
. 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/$pkgname.conf" "$pkgdir"/etc/NetworkManager/NetworkManager.conf
# allow plugdev users to modify connections
install -m644 -D "$srcdir/$pkgname.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"
cat > "$pkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
To modify system network connections without the root password: add your user account to the 'plugdev' group, or use Polkit.
To use iwd instead of the default wpa_supplicant install iwd, start its service and add the following to your /etc/NetworkManager/NetworkManager.conf:
[device]
wifi.backend=iwd
EOF
}
sha512sums="a220d856632693298af0bd23ae4393ee597684fcae400c8ed35bae5e543bcdbd0b0e879f4a7587b674ae86c5fdfbee955acd0fb6226cb95ed31372cb7c222814 NetworkManager-1.18.2.tar.xz
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf
5ac6d11b588c479de9c7e1fef79ed0a2c04dc159a2173636a6a77a2867c839cc1609860756109e9e794f23a02238a6d94834d8fb6fcb81a6be3ef1dbf4a34e6f networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules
9d1a9185b0b50f677a4173a8b67e808ba36971111165ae446e9a15b5c7adcc8cc6d44fa7bddac05762c50d80b04818a483756eaf2aaefe0162e1f37cd070fca4 musl-basic.patch
095c1d944f3274ba31435cd1af8e2affb4187bdd921a0cc0c185b59810b73cfab7919b5f551bab3d9e4644fbee8f9ac017b4c5d69a771fb68319cbefa37c71a3 musl-network-support.patch
a3fe34eb93cb918650390ea01696a8e8489455a89721e479d6b83ab730f6608e9cf78cd0d993e7c8051708b695eea420490e36d85d400fa39ec0ff5d3882d26b musl-fix-includes.patch
b5cd94928ca3ba1fb71aec28d9ff66f319f6d23131e02c90f1dfbfaf16c537935228a9981c95f29ffb74e91752a17801c94d09ca57b7ba98028262b9e8e5d322 musl-process-util.patch
76b6728389686c91df6acafbbe17af7f0e01971e5f7185e164dcb39f93982ac6b73fc2cdf0ba2018e3fa80321178621fe2a5d910546de98bfc52484aa5d90d34 musl-has-not-secure-getenv.patch
634377674691b52da80ca4c445a727d39cd40269f7deef0d3ccc1e1041cc262e8bc1423200e9a2b0cf1804e9950059ebbbc827f1200c6a97c58bc76080a6d6d2 musl-compar.patch
c2dbdf31adb472dc6b14aad6d7a0981b2618880df7c9081ebb9bc6da8af4c5e791c36c4e997878d5e1e7f96bd65814f718e7ae23dcfea5ac5aa91acdab3775ae fix-ppc64le-build.patch"