diff options
Diffstat (limited to 'php-pecl-gnupg.spec')
-rw-r--r-- | php-pecl-gnupg.spec | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/php-pecl-gnupg.spec b/php-pecl-gnupg.spec index 8397c34..9e71a64 100644 --- a/php-pecl-gnupg.spec +++ b/php-pecl-gnupg.spec @@ -15,6 +15,8 @@ %else %bcond_without tests %endif +# to run test with GnuPG v1 instead of GnuPG v2 +%bcond_with gpg1 %global pecl_name gnupg %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -45,7 +47,9 @@ BuildRequires: gnupg Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -# We force use of /usr/bin/gpg as gpg2 is unusable in non-interactive mode +%if %{with gpg1} +Requires: gnupg1 +%endif Requires: gnupg Provides: %{?scl_prefix}php-%{pecl_name} = %{version} @@ -94,13 +98,18 @@ mkdir NTS mkdir ZTS %endif +%if %{with gpg1} +%{_bindir}/gpg1 --version +%else +%{_bindir}/gpg --version +%endif + %build %{?dtsenable} export PHP_RPATH=no export CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" -gpg --version peclbuild() { %configure \ @@ -149,6 +158,9 @@ done %check cd %{sources} unset GPG_AGENT_INFO +%if %{with gpg1} +export GNUPGFILENAME=%{_bindir}/gpg1 +%endif : Check if build NTS extension can be loaded %{__php} -n -q \ @@ -162,12 +174,8 @@ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php \ -n -q \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ -%if 0%{?fedora} >= 41 - --show-diff || : ignore failure -%else --show-diff %endif -%endif %if %{with_zts} : Check if build ZTS extension can be loaded |