#!/bin/bash . ./scripts/colors.sh . ./scripts/funcs.sh . ./scripts/config.sh iptables() { pkgname=iptables pkgver=1.8.11 srcurl=https://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.xz print_info "** Building and installing $pkgname" [ -d $build/${pkgname} ] && return 0 mkdir -p $build/$pkgname cd $build/$pkgname if [ ! -f $root/downloads/${pkgname}-${pkgver}.tar.xz ]; then print_info "** Downloading $srcurl" cd $root/downloads wget $srcurl check $? "download $srcurl" cd - fi tar -xf $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}" print_info "** SUCCESS: Building and installing ${pkgname}" }