summaryrefslogtreecommitdiffstats
path: root/main/iproute2/APKBUILD
blob: 9b474f2f86fe4ce53253fd1c29e0c682d752e1d2 (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.14.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
	0001-iproute2-various-header-include-fixes-for-compiling-.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="bd9d7567bbb987c88120669f5e1a1092  iproute2-3.14.0.tar.xz
b3ea32f3ea905949ed5d53d08c6d1b48  0001-iproute2-various-header-include-fixes-for-compiling-.patch"
sha256sums="bda38951c49f89ffc2e2fe85579ce616337b5d3a2f0319921fd071c838356bd4  iproute2-3.14.0.tar.xz
e10d5be14f1b37a9ca9b7f024c3858fbece46a350d9c1268d1708754aa3eaa48  0001-iproute2-various-header-include-fixes-for-compiling-.patch"
sha512sums="774ab15bc0001d79884d9c88920c63dead162f6d93816bb921beca3b5bcc12555b07beaa726107491b5a6c7eae89558dc1dba85712d0fb35c3a78133356b2921  iproute2-3.14.0.tar.xz
8d3e1d905278a6b4bb60ca4f76ce09268e237fcd410e193c3049f54816037fc4d396b61addc34beea5b5a2ffece4605903e28c078d67168eefb5cabd1d7afa0a  0001-iproute2-various-header-include-fixes-for-compiling-.patch"