#!/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" }