export MAJORVER="${PKGVER%%.*}"
abinfo "PostgreSQL major release: $MAJORVER"
if ! [[ "$MAJORVER" =~ ^[0-9]+$ ]] ; then
	abdie "Unexpected major version $MAJORVER."
fi

# FIXME: Do not unset or clear AUTOTOOLS_DEF! Otherwise Autobuild will
# fail during array migration at proc/51-build-hwcaps.sh.
export AUTOTOOLS_DEF=("--prefix=/usr/lib/postgresql-$MAJORVER")

abinfo "Using a temporary installation directory ..."
export OLD_PKGDIR="$PKGDIR"
export PKGDIR="$SRCDIR"/abdist-tmp
