blob: 9629753d250b91494765b47f0d498ec213a8ea57 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iproute2
pkgver=4.17.0
pkgrel=0
pkgdesc="IP Routing Utilities"
url="https://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
arch="all"
license="GPL-2.0-or-later"
depends=""
install="$pkgname.post-install"
makedepends="bison flex bash iptables-dev libelf-dev"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz
fix-install-errors.patch"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
default_prepare
cd "$builddir"
sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h
sed -i -e 's:=/share:=/usr/share:' \
-e 's:-Werror::' Makefile
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
}
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
rmdir -p "$pkgdir"/usr/share 2>/dev/null || true
}
sha512sums="ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5 iproute2-4.17.0.tar.xz
24fc2a901650e11f80bcaa82c839e70c21aafdf3c5b8a357d932d066a0b98ae2ec8379fc17a0a16a1b5b4fa5edc131179c10fc02e55d6101701df5a09966912c fix-install-errors.patch"
|