aboutsummaryrefslogtreecommitdiffstats
path: root/main/iproute2/APKBUILD
blob: c8758debddcd134e72f159b2185bc89e99acab90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iproute2
pkgver=4.2.0
_realver=$pkgver
pkgrel=0
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="51c54cc3245eff451154938fbc0f64f5  iproute2-4.2.0.tar.xz
4940583731a0e941b6c0b87ee119a420  musl-fixes.patch"
sha256sums="a4101e743e0da36b55f63353ff489699ddcd634ceca854a9a272346588f30f30  iproute2-4.2.0.tar.xz
ad4574e697bd2e61126172d19cc4561ab218a9c9bc8aa9cc16ce7e9ff77a9f73  musl-fixes.patch"
sha512sums="a2580cab92ee4c3e78e52bd8b742e9a1f2097815022a392241136b5589dd1de2ff1def9f608e4b5464c57d8f3d50c4361897271db2058683dfdc6984172784c5  iproute2-4.2.0.tar.xz
7373b0e53a10961e7d405081182db65fb51ea80226c2a5e0088dcd9e83105953ce412be8e4a73ca6ed819a3ffa15a6e258ff6a76e511a9d4434a579d2338efaf  musl-fixes.patch"