# Maintainer: jc_gargma # Maintainer (Arch): Jan Alexander Steffens (heftig) # Contributor (Arch): Jan de Groot # Contributor (Arch): Wael Nasreddine # Contributor (Arch): Tor Krill # Contributor (Arch): Will Rea # Contributor (Arch): Valentine Sinitsyn # # I maintain this because: # Arch version is not configured for openrc # Arch version uses git # Arch version uses nftables _offline=1 _altname=NetworkManager pkgbase=networkmanager pkgname=(networkmanager libnm nm-cloud-setup) _basever=1.40 pkgver=${_basever}.4 pkgrel=1 pkgdesc="Network connection manager and user applications" pkgdesc+=", modified for openrc" url="https://wiki.gnome.org/Projects/NetworkManager" arch=(x86_64) license=(GPL) _pppver=2.4.9 makedepends=(dhclient dhcpcd iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager iproute2 nss polkit wpa_supplicant curl libelogind libmm-glib libnewt libndp libteam nftables vala perl-yaml python-gobject git vala jansson bluez-libs glib2-docs iwd dnsmasq openresolv libpsl audit meson) checkdepends=(libx11 python-dbus) source=(https://download.gnome.org/sources/${_altname}/${_basever}/${_altname}-${pkgver}.tar.xz) # https://download.gnome.org/sources/NetworkManager/1.40/NetworkManager-1.40.4.sha256sum sha256sums=('b23214b5481c80f93f7515fcdeac11c09c8c96466872d7ec386d64fb5fd12cbf') b2sums=('1ba9d530c7365eed3b9ba9d24f746fee0afae96dde281f022b98eed2f2594438c03f889f8067afe2362876e5135a7e0857cbde5e709d21481b742ff27e9d6480') build() { local meson_options=( # system paths -D dbus_conf_dir=/usr/share/dbus-1/system.d # platform -D dist_version="$pkgver-$pkgrel" -D session_tracking_consolekit=false -D session_tracking=elogind -D suspend_resume=elogind -D systemdsystemunitdir=false -D systemd_journal=false -D config_logging_backend_default=syslog -D modify_system=true -D selinux=false # features -D iwd=true -D pppd_plugin_dir=/usr/lib/pppd/$_pppver -D teamdctl=true -D nm_cloud_setup=true -D bluez5_dun=true -D ebpf=true # configuration plugins -D config_plugins_default=keyfile -D ifcfg_rh=false -D ifupdown=false # handlers for resolv.conf -D netconfig=no -D config_dns_rc_manager_default=auto # miscellaneous -D vapi=true -D docs=true -D more_asserts=no -D more_logging=false -D qt=false ) arch-meson ${_altname}-${pkgver} build "${meson_options[@]}" meson compile -C build ${MAKEFLAGS} } # tests do not work in an offline build environment if [ "${_offline}" == "0" ]; then check() { meson test -C build --print-errorlogs } fi _pick() { local p="$1" f d; shift for f; do d="$srcdir/$p/${f#$pkgdir/}" mkdir -p "$(dirname "$d")" mv "$f" "$d" rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")" done } package_networkmanager() { depends=(libnm iproute2 wpa_supplicant libmm-glib libnewt libndp libteam curl bluez-libs libpsl audit mobile-broadband-provider-info) optdepends=('polkit: let non-root users control networking' 'dnsmasq: connection sharing' 'nftables: connection sharing' 'iptables: connection sharing' 'bluez: Bluetooth support' 'ppp: dialup connection support' 'modemmanager: cellular network support' 'iwd: wpa_supplicant alternative' 'dhclient: alternative DHCP client' 'dhcpcd: alternative DHCP client' 'openresolv: alternative resolv.conf manager' 'firewalld: firewall support') backup=(etc/NetworkManager/NetworkManager.conf) meson install -C build --destdir "$pkgdir" cd "$pkgdir" # /etc/NetworkManager install -d etc/NetworkManager/{conf,dnsmasq}.d install -dm700 etc/NetworkManager/system-connections install -m644 /dev/stdin etc/NetworkManager/NetworkManager.conf <