diff options
Diffstat (limited to 'pcr')
5 files changed, 202 insertions, 0 deletions
diff --git a/pcr/networkmanager-elogind/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/pcr/networkmanager-elogind/01-org.freedesktop.NetworkManager.settings.modify.system.rules new file mode 100644 index 000000000..ed4a41f9d --- /dev/null +++ b/pcr/networkmanager-elogind/01-org.freedesktop.NetworkManager.settings.modify.system.rules @@ -0,0 +1,6 @@ +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" && + subject.isInGroup("network")) { + return "yes"; + } +}); diff --git a/pcr/networkmanager-elogind/20-connectivity.conf b/pcr/networkmanager-elogind/20-connectivity.conf new file mode 100644 index 000000000..9631eabdf --- /dev/null +++ b/pcr/networkmanager-elogind/20-connectivity.conf @@ -0,0 +1,2 @@ +[connectivity] +uri=http://www.archlinux.org/check_network_status.txt diff --git a/pcr/networkmanager-elogind/50-org.freedesktop.NetworkManager.rules b/pcr/networkmanager-elogind/50-org.freedesktop.NetworkManager.rules new file mode 100644 index 000000000..b6fe9c73f --- /dev/null +++ b/pcr/networkmanager-elogind/50-org.freedesktop.NetworkManager.rules @@ -0,0 +1,5 @@ +polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) { + return polkit.Result.YES; + } +}); diff --git a/pcr/networkmanager-elogind/NetworkManager.conf b/pcr/networkmanager-elogind/NetworkManager.conf new file mode 100644 index 000000000..8976130b9 --- /dev/null +++ b/pcr/networkmanager-elogind/NetworkManager.conf @@ -0,0 +1,2 @@ +# Configuration file for NetworkManager. +# See "man 5 NetworkManager.conf" for details. diff --git a/pcr/networkmanager-elogind/PKGBUILD b/pcr/networkmanager-elogind/PKGBUILD new file mode 100644 index 000000000..544f455f3 --- /dev/null +++ b/pcr/networkmanager-elogind/PKGBUILD @@ -0,0 +1,187 @@ +# Maintainer (Manjaro): artoo <artoo@manjaro.org> +# Contributor (Manjaro): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor (Manjaro): Jan de Groot <jgc@archlinxu.org> +# Contributor (Manjaro): Wael Nasreddine <gandalf@siemens-mobiles.org> +# Contributor (Manjaro): Tor Krill <tor@krill.nu> +# Contributor (Manjaro): Will Rea <sillywilly@gmail.com> +# Contributor (Manjaro): Valentine Sinitsyn <e_val@inbox.ru> +# Maintainer: OmarVega Ramos <ovruni@gnu.org.pe> + +_pppver=2.4.7 + +_patch_url=https://cgit.freedesktop.org/NetworkManager/NetworkManager/patch + +pkgname=networkmanager-elogind +pkgver=1.6.2 +pkgrel=3.parabola1 +pkgdesc="Network Management daemon" +arch=('i686' 'x86_64' 'armv7h') +license=('GPL2' 'LGPL2.1') +url="http://www.gnome.org/projects/NetworkManager/" +provides=('networkmanager') +conflicts=('networkmanager' 'networkmanager-consolekit') +# replaces=('networkmanager-consolekit') +makedepends=('intltool' 'dhclient' 'iptables' 'gobject-introspection' 'gtk-doc' + "ppp=$_pppver" 'modemmanager' 'dbus-glib' 'iproute2' 'nss' + 'polkit' 'wpa_supplicant' 'libsoup' 'libgudev' 'libmm-glib' + 'rp-pppoe' 'libnewt' 'libndp' 'libteam' 'vala' 'perl-yaml' 'python-gobject' 'git' 'vala' + 'jansson' 'bluez-libs' 'glib2-docs' 'elogind') +checkdepends=('libx11' 'python-dbus' 'elogind') +depends=('libnm-glib' 'iproute2' 'polkit' 'wpa_supplicant' 'libsoup' 'libmm-glib' 'libnewt' 'libndp' 'libteam' 'elogind') +optdepends=('dnsmasq: connection sharing' + 'bluez: Bluetooth support' + 'openresolv: resolvconf support' + 'ppp: dialup connection support' + 'rp-pppoe: ADSL support' + 'dhclient: External DHCP client' + 'modemmanager: cellular network support' + 'networkmanager-openrc: networkmanager initscript') +backup=('etc/NetworkManager/NetworkManager.conf') +_commit=037a12f96eff09aa48481fda7ea602a3388afc74 # tags/1.6.2^0 +source=("git+https://anongit.freedesktop.org/git/NetworkManager/NetworkManager#commit=$_commit" + #"https://download.gnome.org/sources/NetworkManager/${pkgver:0:3}/NetworkManager-$pkgver.tar.xz" + 'NetworkManager.conf' + '01-org.freedesktop.NetworkManager.settings.modify.system.rules' + '50-org.freedesktop.NetworkManager.rules' + '20-connectivity.conf' + "elogind1.patch::${_patch_url}/?id=360e80b75faead6595ceb4ca8cd91dd7fbaa2f47" + "elogind2.patch::${_patch_url}/?id=c0d9243e7ebdb6efd5c3e866b03a28cd91b08c83") +sha256sums=('SKIP' + 'dd2d3a9c8a08ce961e263e1847453890f1b24c72a806d8c83a5b69b227a5ccec' + '4b815f43de58379e68653d890f529485aec4d2f83f11d050b08b31489d2267c2' + '02d9f7d836d297d6ddf39482d86a8573b3e41735b408aa2cd6df22048ec5f6c4' + '477d609aefd991c48aca93dc7ea5a77ebebf46e0481184530cceda4c0d8d72c6' + 'f008c03a1b500bcdde176505e338280246af9431703951f97a88b4ae484c7e9b' + 'e845261a468586a360f68f812c5ca69c86a08cb455e3df430bda4cce58307ae4') + +prepare() { + mkdir -p libnm{,-glib}/usr/{include,lib/{girepository-1.0,pkgconfig},share/{gir-1.0,gtk-doc/html,vala/vapi}} + + cd NetworkManager + + patch -Np 1 -i ${srcdir}/elogind1.patch + patch -Np 1 -i ${srcdir}/elogind2.patch + + NOCONFIGURE=1 ./autogen.sh +} + +pkgver() { + cd NetworkManager + git describe | sed 's/-dev/dev/;s/-/+/g' +} + +build() { + cd NetworkManager #-$pkgver + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + runstatedir=/run \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/NetworkManager \ + --disable-ifcfg-rh \ + --disable-ifcfg-suse \ + --disable-ifnet \ + --disable-ifupdown \ + --disable-lto \ + --disable-more-warnings \ + --disable-static \ + --enable-bluez5-dun \ + --enable-concheck \ + --enable-config-plugin-ibft \ + --enable-gtk-doc \ + --enable-introspection \ + --enable-json-validation \ + --enable-ld-gc \ + --enable-modify-system \ + --enable-polkit \ + --enable-polkit-agent \ + --enable-teamdctl \ + --enable-wifi \ + --with-config-dhcp-default=dhclient \ + --with-config-dns-rc-manager-default=resolvconf \ + --with-config-logging-backend-default=journal \ + --with-config-plugins-default=keyfile,ibft \ + --with-crypto=nss \ + --with-dbus-sys-dir=/usr/share/dbus-1/system.d \ + --with-dhclient=/usr/bin/dhclient \ + --with-dist-version="$pkgver-$pkgrel, Parabola GNU/Linux-libre" \ + --with-dnsmasq=/usr/bin/dnsmasq \ + --with-dnssec-trigger=/usr/lib/dnssec-trigger \ + --with-hostname-persist=default \ + --with-iptables=/usr/bin/iptables \ + --with-kernel-firmware-dir=/usr/lib/firmware \ + --with-libnm-glib \ + --with-libsoup \ + --with-modem-manager-1 \ + --with-nmcli \ + --with-nmtui \ + --with-pppd-plugin-dir=/usr/lib/pppd/$_pppver \ + --with-pppd=/usr/bin/pppd \ + --with-resolvconf=/usr/bin/resolvconf \ + --with-session-tracking=elogind \ + --with-suspend-resume=elogind \ + --with-system-ca-path=/etc/ssl/certs \ + --without-systemd-journal \ + --without-systemd-logind \ + --with-udev-dir=/usr/lib/udev \ + --with-wext \ + --without-consolekit \ + --without-dhcpcd \ + --without-libaudit \ + --without-netconfig \ + --without-ofono \ + --without-selinux + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +check() { + cd NetworkManager #-$pkgver + make -k check +} + +package() { + cd NetworkManager #-$pkgver + make DESTDIR="$pkgdir" install + + ### rm libnm + + cd ../libnm + rm -rv "$pkgdir"/usr/include/libnm + rm -rv "$pkgdir"/usr/lib/girepository-1.0/NM-* + rm -rv "$pkgdir"/usr/lib/libnm.* usr/lib + rm -rv "$pkgdir"/usr/lib/pkgconfig/libnm.pc + rm -rv "$pkgdir"/usr/share/gir-1.0/NM-* + rm -rv "$pkgdir"/usr/share/gtk-doc/html/libnm + rm -rv "$pkgdir"/usr/share/vala/vapi/libnm.* + + ### rm libnm-glib + + cd ../libnm-glib + rm -rv "$pkgdir"/usr/include/* + rm -rv "$pkgdir"/usr/lib/girepository-1.0/* + rm -rv "$pkgdir"/usr/lib/libnm-* + rm -rv "$pkgdir"/usr/lib/pkgconfig/* + rm -rv "$pkgdir"/usr/share/gir-1.0/* + rm -rv "$pkgdir"/usr/share/gtk-doc/html/libnm-* + rm -rv "$pkgdir"/usr/share/vala/vapi/* + + rmdir -p --ignore-fail-on-non-empty \ + "$pkgdir"/usr/include \ + "$pkgdir"/usr/lib/{girepository-1.0,pkgconfig} \ + "$pkgdir"/usr/share/{gir-1.0,vala/vapi} + + install -m644 ${srcdir}/NetworkManager.conf "$pkgdir/etc/NetworkManager/" + install -dm700 "$pkgdir/etc/NetworkManager/system-connections" + install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d + + install -dm 750 -o polkitd "${pkgdir}"/usr/share/polkit-1/rules.d + + install -m 644 ${srcdir}/01-org.freedesktop.NetworkManager.settings.modify.system.rules $pkgdir/usr/share/polkit-1/rules.d/ + + install -m 644 ${srcdir}/50-org.freedesktop.NetworkManager.rules $pkgdir/usr/share/polkit-1/rules.d/ + + install -Dm644 ${srcdir}/20-connectivity.conf "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" +} |