# packages/e2fsprogs/auxbuild
#

# download and unpack tarball
TARVERSION="1.41.14"
TARDIR="${BUILD_PACKAGE}-${TARVERSION}"
TARBALL="${TARDIR}.tar.gz"
build_download "http://downloads.sourceforge.net/e2fsprogs/${TARBALL}"
build_unpack "${TARBALL}"
PKGDIR="${TARDIR}"

# invoke configure (directory, prefix, extra arguments)

build_autoconf "${PKGDIR}" "/usr" \
	"--enable-symlink-install --disable-rpath CC=${ARCH_CC}" 

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

# Copy libraries and headers required to build util-linux
copy_file() {
    local src=Distn/${PKGDIR}/$1
    local dst=${CROSSLIB}/$2

    if [ -r $src ]
    then
	mkdir -p $dst
	echo cp $src $dst
	cp $src $dst
    fi
}

copy_file lib/libblkid.a lib
copy_file lib/libuuid.a lib
copy_file lib/uuid/uuid.h include/uuid
copy_file lib/uuid/uuid_types.h include/uuid
copy_file lib/blkid/blkid.h include/blkid
copy_file lib/blkid/blkid_types.h include/blkid


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