# packages/ppp/auxbuild
#

# download and unpack tarball
TARVERSION="2.4.7"
TARDIR="${BUILD_PACKAGE}-${TARVERSION}"
TARBALL="${TARDIR}.tar.gz"
build_download "ftp://ftp.samba.org/pub/ppp/${TARBALL}"
build_unpack "${TARBALL}"
PKGDIR="${TARDIR}"

# Makefiles use "install -s", but that expects native "strip" to work;
# fix it by adding the --strip-program option to point to crosstools
find "Distn/${PKGDIR}" -name "Makefile.top" -o -name "Makefile.linux" \
    -exec sed -i {} -e 's/^INSTALL[ 	]*=.*$/INSTALL = install --strip-program='${ARCH_CC_PREFIX}'strip/' \;

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

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

# clean up
rm -rf "${BUILDROOT}/share" "${BUILDROOT}/include"

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