blob: 287dfb603beb307c5d90ab5565ffb77b42114e68 (
plain) (
tree)
|
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=iproute2
pkgver=5.3.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 bsd-compat-headers"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz"
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
mkdir "$pkgdir"/bin
mv "$pkgdir"/sbin/ip "$pkgdir"/bin/ip
mkdir "$pkgdir"/usr/share/man/man1
mv "$pkgdir"/usr/share/man/man8/ip.8 \
"$pkgdir"/usr/share/man/man1/ip.1
}
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="c20ce477cb3ec24194ea56d3d9037795e26975ffde188b63ba974a0aa671dd169f356e9446bf43dc56523e01c0bafa442b91d83da9b2302daee18e237f2f3157 iproute2-5.3.0.tar.xz"
|