# Maintainer: Natanael Copa pkgname=iproute2 pkgver=5.2.0 pkgrel=0 pkgdesc="IP Routing Utilities" url="https://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" arch="all" license="GPL-2.0-or-later" depends="" install="$pkgname.post-install" makedepends="bison flex bash iptables-dev elfutils-dev" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz fix-install-errors.patch musl-fixes.patch" builddir="$srcdir"/$pkgname-$pkgver prepare() { default_prepare cd "$builddir" 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="82bbeae29d98129d822c95ff7523186569e32c66132b8d781d501d61f396b04d122e3d13057dd4236455264008e5bfac7cb63c325908fc1c46d416cbde6ac7e1 iproute2-5.2.0.tar.xz 24fc2a901650e11f80bcaa82c839e70c21aafdf3c5b8a357d932d066a0b98ae2ec8379fc17a0a16a1b5b4fa5edc131179c10fc02e55d6101701df5a09966912c fix-install-errors.patch 2e3558caddf814da8c4d78c74eddb7a659d6f94b93de5396bdd995e2333e3cd656f9c936ac7a5a86d0477abc27a92550582575ab4ed19fc2ec0d9b6699cd612c musl-fixes.patch"