--- /dev/null
+--- gnupg-2.2.7/autogen.sh.org 2018-05-03 20:55:20.709894555 +0200
++++ gnupg-2.2.7/autogen.sh 2018-05-03 20:57:36.847624695 +0200
+@@ -244,11 +244,10 @@
+ rev=$(git rev-parse --short HEAD | tr -d '\n\r')
+ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
+ else
+- ingit=no
+- beta=yes
+- tmp="-unknown"
+- rev="0000000"
+- rvd="0"
++ ingit=yes
++ tmp=""
++ rev=$(grep "^BUILD_REVISION=" configure | sed -e 's#^BUILD_REVISION=\"\(.*\)\"#\1#g')
++ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
+ fi
+
+ echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
# Conditional build:
%bcond_without tests # testsuite on build
%bcond_without dirmngr # dirmngr packages build
-%bcond_with default_gpg # install as gpg/gpgv instead of gpg2/gpgv2
+%bcond_without default_gpg # install as gpg/gpgv instead of gpg2/gpgv2
%bcond_with gnutls # GnuTLS instead of NTBTLS
%bcond_with selinux # "SELinux hacks"
#
Name: gnupg2
# 2.1.x is development version unfortunately (see gpg2 --version)
Version: 2.2.7
-Release: 0.1
+Release: 1
License: GPL v3+
Group: Applications/File
Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
# Source0-md5: fc13424af7747a5dd6edb6086ec0cb2f
Source1: gnupg-agent.sh
Patch0: %{name}-info.patch
-Patch1: %{name}-pth.patch
+Patch1: %{name}-nogit.patch
Patch2: %{name}-disable_tests.patch
Patch3: %{name}-pl.po-update.patch
Patch4: %{name}-am.patch
Requires: sqlite3 >= 3.7
%if %{with default_gpg}
Obsoletes: gnupg < 2
+Obsoletes: gnupg-plugin-keys_curl < 2
+Obsoletes: gnupg-plugin-keys_hkp < 2
Provides: gnupg = %{version}-%{release}
%endif
Suggests: gnupg-agent
%setup -q -n gnupg-%{version}
%patch0 -p1
%patch1 -p1
+
%{!?with_tests:%patch2 -p1}
%patch3 -p1
%patch4 -p1
%{__autoconf}
%{__autoheader}
%{__automake}
+if (grep -q ^development_version=yes configure); then
+ echo "configure incorrectly rebuild with messed up development status and likely version and revision." >&2
+ echo "Consider fixing nogit.patch" >&2
+ exit 1
+fi
+
%configure \
--libexecdir=%{pkglibexecdir} \
%{!?with_dirmngr:--disable-dirmngr} \