# packages/libgcrypt/auxbuild
#

# download and unpack tarball
TARVERSION="1.4.4"
TARDIR="${BUILD_PACKAGE}-${TARVERSION}"
TARBALL="${TARDIR}.tar.bz2"
build_download "ftp://ftp.gnupg.org/gcrypt/libgcrypt/${TARBALL}"
build_unpack "${TARBALL}"
PKGDIR="${TARDIR}"

# apply patches matching pattern (repository, patch prefix)
build_patch "${PKGDIR}" "${BUILD_PACKAGE}-ALL-"
build_patch "${PKGDIR}" "${BUILD_PACKAGE}-${TARVERSION}-"

# invoke configure (directory, prefix, extra arguments)
build_autoconf "${PKGDIR}" "" "--disable-padlock-support --disable-asm"
    # assembler support ought to work, but gives link errors with libgnutls

# stop it from building the tests
sed -e "s,SUBDIRS = \(.*\) tests$,SUBDIRS = \1," -i "Distn/${PKGDIR}/Makefile"

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

# remove m4 macros
rm -rf "${BUILDROOT}/usr/share/aclocal"

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