added iptables build

This commit is contained in:
wt
2025-03-24 17:37:47 +07:00
parent f365fbeb8d
commit 5d876267e2
6 changed files with 202 additions and 107 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
iptables() {
pkgname=iptables
pkgver=1.8.11
printf "$GREEN** Building and installing $pkgname\n$RESET"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--build=x86_64-pc-linux-gnu \
--host=${CROSS_COMPILE} \
--disable-nftables \
--disable-libnfnetlink \
--disable-connlabel
check $? "Configure ${pkgname}"
make ${makeflags}
check $? "Build ${pkgname}"
make install DESTDIR=$rootfspath
check $? "Install to rootfs ${pkgname}"
${CROSS_COMPILE}-strip \
$rootfspath/usr/bin/* \
$rootfspath/usr/sbin/* \
$rootfspath/usr/lib/* \
$rootfspath/usr/lib/xtables/*
rm -rv $rootfspath/usr/share/man
printf "$GREEN** SUCCESS: Building and installing ${pkgname}\n$RESET"
}