blob: ce85af071e329af183829231d78fb8210ecc2391 (
plain) (
tree)
|
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=iproute2
pkgver=4.18.0
pkgrel=0
pkgdesc="IP configuration, routing, and traffic control utilities"
url="https://wiki.linuxfoundation.org/networking/iproute2"
arch="all"
license="GPL-2.0-only"
depends=""
install="$pkgname.post-install"
makedepends="bison flex bash libelf-dev libmnl-dev libcap-dev"
# the testsuite in this package seems to be geared towards kernel developers
options="!check"
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"
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() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib
}
package() {
cd "$builddir"
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="c7c8e8e76c78faf63548da641769cf9f51811a308cd8eeec171f5f46423f116ff123033f11a554609825aba6d078c95dbbe36aa7ab23bd8d87b3a0d5100be1a9 iproute2-4.18.0.tar.xz
d9b40539f4ac074f20b0bb10381de9c3b64aadf612f0d599814cdb632fe97c76c9b4730406b08a6e53739670ca51ea0f699862156247cf20c3b7f4c78394fa46 fix-uapi-garbage.patch"
|