abinfo "Using Autobuild 4 routines to config and build ..."
export MAKE_AFTER="VERBOSE=1"
build_autotools_update_base
build_autotools_regenerate
build_autotools_configure
build_autotools_build

abinfo "Installing into a temporary directory ..."
# Save PKGDIR
export PREV_PKGDIR="$PKGDIR"
TMP_PKGDIR=$(mktemp -d "$SRCDIR"/abdist.XXXXXX)
export PKGDIR="$TMP_PKGDIR"
build_autotools_install

export PKGDIR="$PREV_PKGDIR"
abinfo "Installing libraries ..."
install -dvm755 "$PKGDIR"/usr/lib
install -dvm755 "$PKGDIR"/usr/include
install -dvm755 "$PKGDIR"/usr/share/man

cp -arv "$TMP_PKGDIR"/usr/lib/* "$PKGDIR"/usr/lib/
cp -arv "$TMP_PKGDIR"/usr/include/* "$PKGDIR"/usr/include/
cp -arv "$TMP_PKGDIR"/usr/share/man/man3 "$PKGDIR"/usr/share/man/

abinfo "Removing systemd unit files ..."
rm -rv "$PKGDIR"/usr/lib/systemd
