summaryrefslogtreecommitdiff
path: root/system/iproute2/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
commitfd2bb2f751c13b3c0c002b8e012810902b9da364 (patch)
tree17b2e38c966c9f96cfa568c1f572261a289590e6 /system/iproute2/APKBUILD
parentb0a5136bf3326ba38b360be288d06f9a27f2a4d2 (diff)
downloadpackages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.gz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.bz2
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.xz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.zip
harmony -> system
Diffstat (limited to 'system/iproute2/APKBUILD')
-rw-r--r--system/iproute2/APKBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/system/iproute2/APKBUILD b/system/iproute2/APKBUILD
new file mode 100644
index 000000000..755d5e21a
--- /dev/null
+++ b/system/iproute2/APKBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=iproute2
+pkgver=4.13.0
+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 libelf-dev"
+options="!check"
+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-$pkgver
+patch_args="-p0"
+
+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="f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a iproute2-4.13.0.tar.xz
+03f41867cc728d3fbf372ef00d8e90debd03671cff052f5e75dcfbeffbdb6e2c4b10d16e0737cdf473b063b710e8e2938a8f64cfa1be93da2c7878ce6ca51583 musl-fixes.patch"