# Contributor: Natanael Copa # Maintainer: Dan Theisen pkgname=iproute2 pkgver=4.20.0 pkgrel=0 pkgdesc="IP configuration, routing, and traffic control utilities" url="https://wiki.linuxfoundation.org/networking/iproute2" arch="all" # the testsuite in this package seems to be geared towards kernel developers options="!check" license="GPL-2.0-only" depends="" makedepends="bison flex bash libelf-dev libmnl-dev libcap-dev" install="$pkgname.post-install" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz fix-uapi-garbage.patch 0001-f_flower-fix-build-with-musl-libc.patch " prepare() { default_prepare sed -i '/^TARGETS=/s: arpd : :' misc/Makefile sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h sed -i -e 's:=/share:=/usr/share:' \ -e 's:-Werror::' Makefile } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib } package() { make -j1 DESTDIR="$pkgdir" install } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/share/bash-completion \ "$subpkgdir"/usr/share rmdir -p "$pkgdir"/usr/share 2>/dev/null || true } sha512sums="ed29638c864062e199152c7b3b24b6495987ca6f79cc9ab1b529dab37a8a840fa2b5858d5db2b94eeefa1c0d72ff666a790107e27d11a597b189bfb7a01a4b8b iproute2-4.20.0.tar.xz d9b40539f4ac074f20b0bb10381de9c3b64aadf612f0d599814cdb632fe97c76c9b4730406b08a6e53739670ca51ea0f699862156247cf20c3b7f4c78394fa46 fix-uapi-garbage.patch b6b5dc65fb4ffff06978c160446bcc79f4f242c94d0ba44890f3b01d86640f56e7cc32efbc0b2bbfce1ae5fd40252ba9ddbb59ff91e54a4de1d4274d48260b2c 0001-f_flower-fix-build-with-musl-libc.patch"