# Maintainer: Natanael Copa pkgname=iproute2 pkgver=4.4.0 _realver=$pkgver pkgrel=1 pkgdesc="IP Routing Utilities" url="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" arch="all" license="GPL2" depends= install="$pkgname.post-install" makedepends="bison flex bash iptables-dev" subpackages="$pkgname-doc" source="http://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz musl-fixes.patch" prepare() { cd "$srcdir"/$pkgname-$_realver local i for i in $source; do case $i in *.patch) msg "$i"; patch -p0 -i "$srcdir"/$i || return 1;; esac done sed -i '/^TARGETS=/s: arpd : :' misc/Makefile sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || return 1 sed -i -e 's:=/share:=/usr/share:' \ -e 's:-Werror::' Makefile || return 1 } build() { cd "$srcdir"/$pkgname-$_realver ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ || return 1 make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib || return 1 } package() { cd "$srcdir"/$pkgname-$_realver make -j1 DESTDIR="$pkgdir" install } md5sums="d762653ec3e1ab0d4a9689e169ca184f iproute2-4.4.0.tar.xz 4940583731a0e941b6c0b87ee119a420 musl-fixes.patch" sha256sums="bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514 iproute2-4.4.0.tar.xz ad4574e697bd2e61126172d19cc4561ab218a9c9bc8aa9cc16ce7e9ff77a9f73 musl-fixes.patch" sha512sums="48236fc6103a55d977efa4f93ad7fdfc0944df975ce771d57fd3dcfb13b761b0c05dbe749978ac86c7a471d023bee62a2f1648a6ca75f50da9252acfde174b69 iproute2-4.4.0.tar.xz 7373b0e53a10961e7d405081182db65fb51ea80226c2a5e0088dcd9e83105953ce412be8e4a73ca6ed819a3ffa15a6e258ff6a76e511a9d4434a579d2338efaf musl-fixes.patch"