aboutsummaryrefslogtreecommitdiffstats
path: root/main/iproute2/APKBUILD
blob: 5a484f7dee43a556b08d0d1dfd278ecd08cf18ce (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iproute2
pkgver=3.18.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

	for i in $source; do
		case $i in
		*.patch) msg "$i";  patch -p1 -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 \
		|| return 1
	make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib || return 1
}

package() {
	cd "$srcdir"/$pkgname-$_realver
	make -j1 DESTDIR="$pkgdir" install
}

md5sums="6f6ad51a00007880460e103367b16057  iproute2-3.18.0.tar.xz
70c83e0a355467d80e6c9ad080f0af75  musl-fixes.patch"
sha256sums="d5a182154abd0749b1df7d1649115a32c65f559951477396203b1f514dbff1df  iproute2-3.18.0.tar.xz
718845685aad2ff07f261b4039748a96d301c2f1b41676d606cb97bacf52b1f4  musl-fixes.patch"
sha512sums="038df5a065c6b544ff84016fa9300abd99d41d086d0741e176799a564d1b6b317acf786732cc90e2cd2d4bc6acd0c8788ad2485d4e65c2caf1e5ba4cdbdbbf0a  iproute2-3.18.0.tar.xz
f95a1b4c367e5bb30b473d027fee3a4087ba84f6e176b53a775faec23fe603a6d0bf16ff93e3b3f6a2764ce1066bae59105c05ebba44263a26589f45af687c27  musl-fixes.patch"