aboutsummaryrefslogtreecommitdiffstats
path: root/main/iproute2/APKBUILD
blob: 2ebb7a0a2302ca97dab48a28350c99f488effd74 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iproute2
pkgver=2.6.35
_realver=$pkgver
pkgrel=1
pkgdesc="IP Routing Utilities"
url="http://www.linux-foundation.org/en/Net:Iproute2"
license="GPL2"
depends=
install="$pkgname.post-install $pkgname.post-deinstall"
makedepends="bison flex bash"
subpackages="$pkgname-doc"
source="http://devresources.linux-foundation.org/dev/iproute2/download/$pkgname-$_realver.tar.bz2"

prepare() {
	cd "$srcdir"/$pkgname-$_realver

	sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
	sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || return 1
	sed -i 's:=/share:=/usr/share:' Makefile || return 1
}

build() {
	cd "$srcdir"/$pkgname-$_realver
	./configure || return 1
	make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib || return 1
}

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

md5sums="b0f281b3124bf04669e18f5fe16d4934  iproute2-2.6.35.tar.bz2"