summaryrefslogtreecommitdiffstats
path: root/main/iproute2/APKBUILD
blob: fb0a8adcbef70487e3fbd934836baa87ddd6d90f (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.10.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
	fix-includes.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="45fb5427fc723a0001c72b92c931ba02  iproute2-3.10.0.tar.xz
914a7876074d4dca39eb80b98bf65091  fix-includes.patch"
sha256sums="c4023d8d722a1ed673474ca0e5a2d61ebd747cc7001a91321757422d9074c97e  iproute2-3.10.0.tar.xz
14bd5601ebdb7a02a2f2c2eebed6adfe33249e4a394e5e5ecea75387ad82c4a3  fix-includes.patch"
sha512sums="afe81462e0d1ed4483cd7ab99abb15ccc9795fbd1276c162d0c8af236357d97fcbfc0ce3356f9ad94fbe048de9e13b2eb98cad60196d6cdbe1a3f2367887ce9f  iproute2-3.10.0.tar.xz
9bdc960ea5c6cdc8db6f5197624f1faa778170122ac3c3d4e091921c761ba66edf660eebf9c64d467586cb18dd6a630cfbfb379ed45a9acad91cd4b37f4d0b16  fix-includes.patch"