# Contributor: Stuart Cardall # Maintainer: Rasmus Thomsen pkgname=networkmanager pkgver=1.18.1 pkgrel=2 pkgdesc="Network Management daemon" url="https://wiki.gnome.org/Projects/NetworkManager" arch="all" 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 <