summaryrefslogtreecommitdiff
path: root/repo/iptables/iptables.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
committerdavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
commitf6332a43c35387c4a2dea1746be5fd092890ae0e (patch)
treed6599f63de04096f3fc21a98e0b3bb39d55a3531 /repo/iptables/iptables.xibuild
parentf13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (diff)
added lf and iptables
Diffstat (limited to 'repo/iptables/iptables.xibuild')
-rw-r--r--repo/iptables/iptables.xibuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/repo/iptables/iptables.xibuild b/repo/iptables/iptables.xibuild
new file mode 100644
index 0000000..8d8cead
--- /dev/null
+++ b/repo/iptables/iptables.xibuild
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+NAME="iptables"
+DESC="Linux kernel firewall, NAT and packet mangling tools"
+
+MAKEDEPS=" linux-headers libnftnl bison flex autoconf automake"
+
+PKG_VER=1.8.7
+SOURCE="https://www.netfilter.org/projects/iptables/files/iptables-$PKG_VER.tar.bz2"
+
+ADDITIONAL="
+ebtables.confd
+ebtables.initd
+ip6tables.confd
+iptables.confd
+iptables.initd
+use-sh-iptables-apply.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --without-kernel \
+ --enable-devel \
+ --enable-libipq \
+ --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
+
+ make
+}
+
+package() {
+ make -j1 install DESTDIR="$PKG_DEST"
+
+ mkdir -p "$PKG_DEST"/usr/include/libiptc \
+ "$PKG_DEST"/usr/lib \
+ "$PKG_DEST"/var/lib/iptables \
+ "$PKG_DEST"/etc/iptables
+
+ install -m644 include/iptables.h include/ip6tables.h \
+ "$PKG_DEST"/usr/include/
+ install include/libiptc/*.h "$PKG_DEST"/usr/include/libiptc/
+
+ install -D -m755 "$BUILD_ROOT"/iptables.initd "$PKG_DEST"/etc/init.d/iptables
+ install -D -m644 "$BUILD_ROOT"/iptables.confd "$PKG_DEST"/etc/conf.d/iptables
+ install -D -m755 "$BUILD_ROOT"/ebtables.initd "$PKG_DEST"/etc/init.d/ebtables
+ install -D -m644 "$BUILD_ROOT"/ebtables.confd "$PKG_DEST"/etc/conf.d/ebtables
+}