# Contributor: William Pitcock # Maintainer: Stuart Cardall pkgname=networkmanager pkgver=1.0.0 _ver=1.0 pkgrel=2 pkgdesc="network management tool" url="http://projects.gnome.org/NetworkManager/" arch="all" license="GPL" depends="dhcpcd iptables dbus" depends_dev="dbus-glib-dev udev-dev libnl3-dev util-linux-dev linux-headers polkit-dev ppp-dev zlib-dev wireless-tools-dev nss-dev nspr-dev gobject-introspection-dev libndp-dev libmm-glib-dev modemmanager-dev newt-dev bluez-dev libsoup-dev libteam-dev rp-pppoe valgrind dnsmasq openresolv dhclient vala gtk-doc readline-dev" makedepends="$depends_dev intltool ncurses-terminfo" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" source="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/$_ver/NetworkManager-$pkgver.tar.xz $pkgname.conf $pkgname.initd $pkgname.rules new-fix-musl-headers.patch disable_set_hostname.patch " _builddir="$srcdir"/NetworkManager-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # Build fails without IPTOS_CLASS_CS6 defined (required by systemd) ### # http://cgit.openembedded.org/openembedded-core/commit/?id=7562021eef5b7585122c92db8b686808ebe7d85e # Remove systemd functionality. This also removes many: "error: redefinition of 'struct ethhdr'" local f= files=$(find src/dhcp-manager/systemd-dhcp -type f) # --without-systemd has no effect files="$files $(find src/dhcp-manager -maxdepth 1 -type f -name "*-systemd.*")" for f in $files; do # do NOT build --with-dbus-sys-dir=/etc/dbus-1 (nm service will crash) printf "" > $f done } build() { cd "$_builddir" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-systemdsystemunitdir=no \ --enable-more-warnings=yes \ --enable-ifupdown \ --enable-concheck \ --with-dhcpcd=yes \ --with-crypto=nss \ --with-modem-manager-1 \ --with-nmtui=yes \ --with-wext=yes \ --with-resolvconf=yes \ --disable-wimax \ || return 1 # ourLDFLAGS confuses the gir-scanner unset LDFLAGS make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -m755 -D "$srcdir"/networkmanager.initd \ "$pkgdir"/etc/init.d/networkmanager || return 1 rm "$pkgdir"/usr/lib/*.la \ "$pkgdir"/usr/lib/NetworkManager/*.la \ "$pkgdir"/usr/lib/pppd/*/nm-pppd-plugin.la || return 1 mv "$pkgdir"/usr/lib/locale "$pkgdir"/usr/share/ || return 1 install -m644 -D "$srcdir/$pkgname.conf" \ "$pkgdir/etc/NetworkManager/NetworkManager.conf" || return 1 # 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" || return 1 mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname" # post-install message mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname" || return 1 cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <