aboutsummaryrefslogtreecommitdiffstats
path: root/main/iptables
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-31 20:53:01 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-03-31 20:53:26 +0200
commit84c69b90667b1b208de0567f46f64574aaf60cc5 (patch)
tree544b74234690b9993cf40b1a3d08f24139b81e19 /main/iptables
parentd935d45bc9764c78145fda540d1cd1e37fc11f6b (diff)
downloadaports-84c69b90667b1b208de0567f46f64574aaf60cc5.tar.bz2
aports-84c69b90667b1b208de0567f46f64574aaf60cc5.tar.xz
main/iptables: improve abuild
Diffstat (limited to 'main/iptables')
-rw-r--r--main/iptables/APKBUILD53
1 files changed, 28 insertions, 25 deletions
diff --git a/main/iptables/APKBUILD b/main/iptables/APKBUILD
index 43d61ee485..d9f2902f70 100644
--- a/main/iptables/APKBUILD
+++ b/main/iptables/APKBUILD
@@ -19,15 +19,16 @@ source="http://ftp.netfilter.org/pub/iptables/iptables-$pkgver.tar.bz2
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- default_prepare || return 1
+ default_prepare
cd "$builddir"
sed -i -e '/if_packet/i#define __aligned_u64 __u64 __attribute__((aligned(8)))' \
- extensions/libxt_pkttype.c || return 1
+ extensions/libxt_pkttype.c
}
build() {
cd "$builddir"
+
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--build=$CBUILD \
@@ -38,46 +39,48 @@ build() {
--without-kernel \
--enable-devel \
--enable-libipq \
- --enable-shared \
- || return 1
+ --enable-shared
+
# do not use rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
- MAKEFLAGS="$MAKEFLAGS -j2" make || return 1
+
+ MAKEFLAGS="$MAKEFLAGS -j2" make
}
package() {
cd "$builddir"
- make -j1 install DESTDIR="$pkgdir" || return 1
+
+ make -j1 install DESTDIR="$pkgdir"
mkdir -p "$pkgdir"/usr/include/libiptc \
"$pkgdir"/usr/lib \
"$pkgdir"/var/lib/iptables \
- "$pkgdir"/etc/init.d \
- "$pkgdir"/etc/conf.d \
- "$pkgdir"/etc/iptables \
- || return 1
+ "$pkgdir"/etc/iptables
+
install -m644 include/iptables.h include/ip6tables.h \
- "$pkgdir"/usr/include/ || return 1
+ "$pkgdir"/usr/include/
install include/libiptc/*.h "$pkgdir"/usr/include/libiptc/
- install -m755 "$startdir"/iptables.initd "$pkgdir"/etc/init.d/iptables
- install -m644 "$startdir"/iptables.confd "$pkgdir"/etc/conf.d/iptables
+
+ install -D -m755 "$srcdir"/iptables.initd "$pkgdir"/etc/init.d/iptables
+ install -D -m644 "$srcdir"/iptables.confd "$pkgdir"/etc/conf.d/iptables
}
ip6tables() {
depends="iptables"
- mkdir -p "$subpkgdir"/sbin \
- "$subpkgdir"/etc/init.d/ \
- "$subpkgdir"/etc/conf.d \
- "$subpkgdir"/var/lib/ip6tables \
- "$subpkgdir"/usr/lib/xtables
-
- mv "$pkgdir"/sbin/ip6* "$subpkgdir"/sbin/
- mv "$pkgdir"/usr/lib/xtables/libip6* \
- "$subpkgdir"/usr/lib/xtables/
- install -m755 "$startdir"/iptables.initd \
- "$subpkgdir"/etc/init.d/ip6tables
- install -m644 "$startdir"/ip6tables.confd "$subpkgdir"/etc/conf.d/ip6tables
+
+ mkdir -p "$subpkgdir"
+ cd "$subpkgdir"
+
+ mkdir -p sbin \
+ var/lib/ip6tables \
+ usr/lib/xtables
+
+ mv "$pkgdir"/sbin/ip6* sbin/
+ mv "$pkgdir"/usr/lib/xtables/libip6* usr/lib/xtables/
+
+ install -D -m755 "$srcdir"/iptables.initd etc/init.d/ip6tables
+ install -D -m644 "$srcdir"/ip6tables.confd etc/conf.d/ip6tables
}
sha512sums="04f22e969c794246b9aa28055b202638081cfb0bb4a5625c049a30c48ac84cdd41db12a53c5831398cfe47c8f5691aa02b30b0ae3b5afe0f20ec48cf86a799c0 iptables-1.6.2.tar.bz2