blob: 91094056460bb098a4132299867987c314c2673d (
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
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iproute2
pkgver=4.9.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 libelf-dev"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="http://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz
musl-fixes.patch"
_builddir="$srcdir"/$pkgname-$_realver
prepare() {
cd "$_builddir"
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 "$_builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
|| return 1
make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib || return 1
}
package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
}
bashcomp() {
depends=""
pkgdesc="Bash completions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/bash-completion \
"$subpkgdir"/usr/share || return 1
rmdir -p "$pkgdir"/usr/share 2>/dev/null || true
}
md5sums="44a8371a4b2c40e48e4c9f98cbd41391 iproute2-4.9.0.tar.xz
ea8ff3227b0b90717e305e0cdd7c158f musl-fixes.patch"
sha256sums="c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4 iproute2-4.9.0.tar.xz
57678dafb510bf1797240d0713d173c9aa2f7bf137471fe490d07daaf68dd5f7 musl-fixes.patch"
sha512sums="0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889 iproute2-4.9.0.tar.xz
bb8f1f76e0f0a33785ee884b05ad8242780f2069dd9362624ec03b9952d567cac612febd9928b59fd489d5032fb97f179de13676c044cc533cf5280de932ce86 musl-fixes.patch"
|