%global gnupg22_ver 2.2.40 %global libgpg_error_ver 1.46 %global npth_ver 1.6 %global libgcrypt_ver 1.10.1 %global libassuan_ver 2.5.5 %global libksba_ver 1.6.2 Name: gnupg22-static Version: %{gnupg22_ver} Release: 1%{?dist} Summary: Static-built newer version of gnupg-2.2.x License: GPLv3+ URL: https://gnupg.org Source0: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-%{gnupg22_ver}.tar.bz2 Source10: https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-%{libgpg_error_ver}.tar.bz2 Source11: https://gnupg.org/ftp/gcrypt/npth/npth-%{npth_ver}.tar.bz2 Source12: https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-%{libgcrypt_ver}.tar.bz2 Source13: https://gnupg.org/ftp/gcrypt/libassuan/libassuan-%{libassuan_ver}.tar.bz2 Source14: https://gnupg.org/ftp/gcrypt/libksba/libksba-%{libksba_ver}.tar.bz2 Source100: https://versions.gnupg.org/swdb.lst BuildRequires: gcc-c++ curl-devel gnutls-devel sqlite-devel openldap-devel %description Provides a statically-built gnupg22 in /opt/gnupg22. This is not a substitute for a complete gnupg installation, but will do in a situation when you need to work with ECC subkeys (the version of gnupg2 in CentOS-7 does not handle ECC crypto). If you need to use auxiliary programs like gpg-agent or dirmngr, you will need to tell gpg where to find them, because the default static build scripts hardcode the buildroot locations. E.g., in your gpg.conf: agent-program /opt/gnupg22/bin/gpg-agent dirmngr-program /opt/gnupg22/bin/dirmngr %prep %autosetup -N -n gnupg-%{version} cp %{SOURCE100} swdb.lst %{__mkdir_p} PLAY/src %build pushd PLAY/src tar xf %{SOURCE10} tar xf %{SOURCE11} tar xf %{SOURCE12} tar xf %{SOURCE13} tar xf %{SOURCE14} ln -s libgpg-error-* libgpg-error ln -s npth-* npth ln -s libgcrypt-* libgcrypt ln -s libassuan-* libassuan ln -s libksba-* libksba popd cat < config.mk speedo_pkg_gnupg_configure += --prefix=/opt/gnupg22 speedo_pkg_gnupg_make_args_inst="DESTDIR=$PWD/PLAY/buildroot" EOF %{__make} -f build-aux/speedo.mk STATIC=1 CUSTOM_SWDB=1 INSTALL_PREFIX=. this-native %install %{__mkdir_p} %{buildroot}/opt %{__cp} -a PLAY/buildroot/opt/gnupg22 %{buildroot}/opt/gnupg22 %files %license COPYING /opt/gnupg22 %changelog * Tue Oct 18 2022 Konstantin Ryabitsev - 2.2.40-1 - Update to gnupg-2.2.40 * Wed Jul 13 2022 Konstantin Ryabitsev - 2.2.36-1 - Update to gnupg-2.2.36 * Thu Oct 07 2021 Konstantin Ryabitsev - 2.2.32-1 - Update to gnupg-2.2.32 * Fri Aug 27 2021 Konstantin Ryabitsev - 2.2.30-1 - Update to gnupg-2.2.30 * Mon Jul 12 2021 Konstantin Ryabitsev - 2.2.29-1 - Update to gnupg-2.2.29 * Fri Jun 11 2021 Konstantin Ryabitsev - 2.2.28-1 - Update to gnupg-2.2.28 * Wed Apr 21 2021 Konstantin Ryabitsev - 2.2.27-1 - Update to gnupg-2.2.27 * Wed Nov 25 2020 Konstantin Ryabitsev - 2.2.25-1 - Update to gnupg-2.2.25 * Thu Nov 19 2020 Konstantin Ryabitsev - 2.2.24-1 - Update to gnupg-2.2.24 * Fri Sep 04 2020 Konstantin Ryabitsev - 2.2.23-1 - Update to gnupg-2.2.23 * Mon Mar 23 2020 Konstantin Ryabitsev - 2.2.20-1 - Update to gnupg-2.2.20 * Thu Dec 19 2019 Benjamin Gordon - 2.2.19-1 - Update to gnupg-2.2.19 - Change the built-in default paths to point into /opt/gnupg22 - Install all of gnupg into the buildroot instead of just bin/* * Tue Jul 09 2019 Konstantin Ryabitsev - 2.2.17-1 - Update to gnupg-2.2.17 * Mon Feb 18 2019 Konstantin Ryabitsev - 2.2.13-1 - Update to gnupg-2.2.13 * Thu Jul 12 2018 Konstantin Ryabitsev - 2.2.9-1 - Update to gnupg-2.2.9 * Tue Jun 12 2018 Konstantin Ryabitsev - 2.2.8-2 - Very dirty first try