#!/bin/bash
###SHELLPACK preamble gnupgsource-install gnupg-2.2.27
GIT_LOCATION=https://dev.gnupg.org/source/gnupg.git
MIRROR_LOCATION="$WEBROOT/extra/gnupgsource/"

install-depends gettext-tools libgpg-error-devel libksba-devel \
		npth-devel libgcrypt-devel libassuan-devel makeinfo \
		glibc-locale-base

###SHELLPACK parseargBegin
###SHELLPACK parseargEnd

###SHELLPACK git_fetch gnupgsource-${VERSION}.tar.gz gnupgsource-${VERSION}-installed

###SHELLPACK build_start gnupgsource-${VERSION}-installed
if [ -e .git ]; then
	git checkout $VERSION || die Failed to checkout version $VERSION
fi

./autogen.sh || die Failed to run autogen.sh
# 'doc' would require 'transfig' package which pulls in many texinfo packages
###SHELLPACK build_configure gnupgsource-${VERSION} --enable-maintainer-mode --disable-doc --enable-all-tests
###SHELLPACK make

echo gnupgsource installed successfully
exit $SHELLPACK_SUCCESS
