# packages/libpcap/auxbuild
#

# download and unpack tarball
TARVERSION="1.3.0"
TARDIR="${BUILD_PACKAGE}-${TARVERSION}"
TARBALL="${TARDIR}.tar.gz"
build_download "http://www.tcpdump.org/release/${TARBALL}"
build_unpack "${TARBALL}"
PKGDIR="${TARDIR}"

# invoke configure (directory, prefix, extra arguments)
build_autoconf "${PKGDIR}" "" "--with-pcap=linux --enable-ipv6"

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

# this stops rpath being passed to the linker, and has a hack to ensure
# required extra libs are emitted
sed -i "${BUILDROOT}/usr/bin/pcap-config" \
    -e "s/^V_RPATH_OPT=.*$/V_RPATH_OPT=/" \
    -e "s/^static=.*$/static=1/"

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