# packages/iptables/auxbuild
#

# download and unpack tarball
TARVERSION="1.4.13"
TARDIR="${BUILD_PACKAGE}-${TARVERSION}"
PKGDIR="${TARDIR}"
TARBALL="${TARDIR}.tar.bz2"
build_download "http://www.netfilter.org/projects/iptables/files/${TARBALL}"
build_unpack "${TARBALL}"

# workaround for 1.4.13, which otherwise complains about undefined reference to
# `get_kernel_version' (suspicion: crosslinker does something wrong when faced
# with --no-undefined).
sed -e 's/noundef_LDFLAGS="[^"]*"/noundef_LDFLAGS=""/' \
    -i "Distn/${PKGDIR}/configure"

# invoke configure (directory, prefix, extra arguments)
build_autoconf "${PKGDIR}" "/usr"

# run make, make install (directory, extra arguments)
build_make "${PKGDIR}"
build_make "${PKGDIR}" "install"

true
# vim: ts=4:sw=4:expandtab:syntax=sh
