From 4efa260e22648741cb25f2d8d51418c3491c46a9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Feb 2021 08:23:56 +0100 Subject: Update to 1.5.0RC1 open https://github.com/php-gnupg/php-gnupg/pull/25 missing files in pecl archive open https://github.com/php-gnupg/php-gnupg/pull/26 also cleanup socket files open https://github.com/php-gnupg/php-gnupg/pull/27 fix build with old libgpgme 1.3 use gnupg version 2 (Fedora and EL-8) --- php-pecl-gnupg.spec | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'php-pecl-gnupg.spec') diff --git a/php-pecl-gnupg.spec b/php-pecl-gnupg.spec index 7cec4c6..f3624ea 100644 --- a/php-pecl-gnupg.spec +++ b/php-pecl-gnupg.spec @@ -19,35 +19,40 @@ %else %global ini_name 40-%{pecl_name}.ini %endif -#global prever RC2 +%global upstream_version 1.5.0 +%global upstream_prever RC1 Summary: Wrapper around the gpgme library Name: %{?sub_prefix}php-pecl-gnupg -Version: 1.4.0 -Release: 10%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD URL: https://pecl.php.net/package/gnupg -Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz + +Source1: https://raw.githubusercontent.com/php-gnupg/php-gnupg/master/tests/gnupgt.inc +Source2: https://raw.githubusercontent.com/php-gnupg/php-gnupg/master/tests/vars.inc +Patch0: gnupg-build.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear BuildRequires: gpgme-devel -%if 0%{?fedora} >= 30 || 0%{?rhel} >= 6 +%if 0%{?rhel} == 7 BuildRequires: gnupg1 %else -BuildRequires: gnupg < 2 +BuildRequires: gnupg %endif 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 0%{?fedora} >= 30 || 0%{?rhel} >= 6 +%if 0%{?rhel} == 7 Requires: gnupg1 %else -Requires: gnupg < 2 +Requires: gnupg %endif %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -62,37 +67,14 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{releas %if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -119,13 +101,15 @@ cat >%{ini_name} << 'EOF' extension=%{pecl_name}.so EOF -mv %{pecl_name}-%{version}%{?prever} NTS +mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS cd NTS +cp %{SOURCE1} %{SOURCE2} tests/ +%patch0 -p1 # Check extension version extver=$(sed -n '/#define PHP_GNUPG_VERSION/{s/.* "//;s/".*$//;p}' php_gnupg.h) -if test "x${extver}" != "x%{version}%{?prever}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. +if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then + : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 fi cd .. @@ -141,13 +125,19 @@ cp -r NTS ZTS export PHP_RPATH=no export CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" +%if 0%{?rhel} == 7 export GPG1=$(which gpg1 2>/dev/null || which gpg) $GPG1 --version +%else +gpg --version +%endif peclbuild() { %{_bindir}/${1}ize %configure \ +%if 0%{?rhel} == 7 --with-gpg=$GPG1 \ +%endif --with-libdir=%{_lib} \ --with-php-config=%{_bindir}/${1}-config @@ -252,6 +242,16 @@ cd ../ZTS %changelog +* Mon Feb 15 2021 Remi Collet - 1.5.0~RC1-1 +- Update to 1.5.0RC1 +- open https://github.com/php-gnupg/php-gnupg/pull/25 + missing files in pecl archive +- open https://github.com/php-gnupg/php-gnupg/pull/26 + also cleanup socket files +- open https://github.com/php-gnupg/php-gnupg/pull/27 + fix build with old libgpgme 1.3 +- use gnupg version 2 (Fedora and EL-8) + * Tue Feb 2 2021 Remi Collet - 1.4.0-10 - EL-7 rebuild -- cgit