mirror of
https://github.com/termux/termux-packages.git
synced 2025-10-09 07:20:51 +00:00
This version of gnupg does not ship its own yat2m (used for doc generation) anymore. yat2m is provided by gpgrt-tools in ubuntu, but the version shipped in the ubuntu 24.04 (that we currently use) is too old. To solve this we download libgpg-error sources and host-build the latest version for gnupg. Co-authored-by: Yaksh Bariya <yakshbari4@gmail.com>
49 lines
2.0 KiB
Bash
49 lines
2.0 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://www.gnupg.org/
|
|
TERMUX_PKG_DESCRIPTION="Implementation of the OpenPGP standard for encrypting and signing data and communication"
|
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION=2.5.5
|
|
TERMUX_PKG_SRCURL=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${TERMUX_PKG_VERSION}.tar.bz2
|
|
TERMUX_PKG_SHA256=7afa71d72ff9aaff75a6810b87b486bc492fd752e4f77b07c41759ce4ef36b31
|
|
TERMUX_PKG_DEPENDS="libassuan, libbz2, libgcrypt, libgnutls, libgpg-error, libksba, libnpth, libsqlite, readline, pinentry, resolv-conf, zlib"
|
|
TERMUX_PKG_CONFLICTS="gnupg2 (<< 2.2.9-1), dirmngr (<< 2.2.17-1)"
|
|
TERMUX_PKG_REPLACES="gnupg2 (<< 2.2.9-1), dirmngr (<< 2.2.17-1)"
|
|
TERMUX_PKG_SUGGESTS="scdaemon"
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
--disable-ldap
|
|
--enable-sqlite
|
|
--enable-tofu
|
|
ac_cv_path_YAT2M=$TERMUX_PKG_HOSTBUILD_DIR/doc/yat2m
|
|
"
|
|
# Remove non-english help files and man pages shipped with the gnupg (1) package:
|
|
TERMUX_PKG_RM_AFTER_INSTALL="share/gnupg/help.*.txt share/man/man1/gpg-zip.1 share/man/man7/gnupg.7"
|
|
|
|
# gnupg 2.5.5 needs a newer yat2m version than ubuntu 24.04
|
|
# provides. Therefore download also libgpg-error sources and hostbuild
|
|
# the tool.
|
|
TERMUX_PKG_HOSTBUILD=true
|
|
|
|
termux_step_host_build() {
|
|
LIBGPG_ERROR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libgpg-error/build.sh; echo $TERMUX_PKG_VERSION)
|
|
LIBGPG_ERROR_SRCURL=$(. $TERMUX_SCRIPTDIR/packages/libgpg-error/build.sh; echo $TERMUX_PKG_SRCURL)
|
|
LIBGPG_ERROR_SHA256=$(. $TERMUX_SCRIPTDIR/packages/libgpg-error/build.sh; echo $TERMUX_PKG_SHA256)
|
|
|
|
termux_download \
|
|
$LIBGPG_ERROR_SRCURL \
|
|
$TERMUX_PKG_CACHEDIR/libgpg-error-${LIBGPG_ERROR_VERSION}.tar.bz2 \
|
|
$LIBGPG_ERROR_SHA256
|
|
tar xf $TERMUX_PKG_CACHEDIR/libgpg-error-${LIBGPG_ERROR_VERSION}.tar.bz2
|
|
./libgpg-error-${LIBGPG_ERROR_VERSION}/configure
|
|
make -C doc yat2m
|
|
}
|
|
|
|
termux_step_pre_configure() {
|
|
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/doc/:$PATH"
|
|
CPPFLAGS+=" -Ddn_skipname=__dn_skipname"
|
|
}
|
|
|
|
termux_step_post_make_install() {
|
|
cd $TERMUX_PREFIX/bin
|
|
ln -sf gpg gpg2
|
|
}
|