From cf2ce9d3ae3d64268adfe34683b4cb322a4a481c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 26 Jun 2023 07:03:52 +0200 Subject: update to 1.1.2 drop patch merge upstream build out of sources tree --- php-pecl-pkcs11.spec | 70 +++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) (limited to 'php-pecl-pkcs11.spec') diff --git a/php-pecl-pkcs11.spec b/php-pecl-pkcs11.spec index e52100a..487e157 100644 --- a/php-pecl-pkcs11.spec +++ b/php-pecl-pkcs11.spec @@ -1,7 +1,7 @@ # remirepo spec file for php-pecl-pkcs11 # -# Copyright (c) 2020-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2020-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -16,21 +16,21 @@ # export PHP11_PIN=1234 %bcond_with tests -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-pkcs11 -%endif +%{?scl:%scl_package php-pecl-pkcs11} %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name pkcs11 # After 20-json.ini %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure + Summary: PHP Bindings for PKCS11 modules -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.1.1 +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.1.2 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: PHP +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -51,20 +51,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -81,9 +67,7 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS +cd %{sources} find . -type f -exec chmod -x {} ';' # Sanity check, really often broken @@ -94,9 +78,10 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then fi cd .. +mkdir NTS %if %{with_zts} # Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -109,21 +94,22 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --enable-pkcs11 \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-pkcs11 \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -147,7 +133,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -185,7 +171,10 @@ fi %endif %if %{with tests} -cd NTS +cd %{sources} +# see https://github.com/gamringer/php-pkcs11/pull/70#issuecomment-1245260497 +rm tests/0400-open-uri.phpt + if [ -z "$PHP11_MODULE" ]; then export PHP11_MODULE=/usr/lib64/softhsm/libsofthsm.so echo with PHP11_MODULE=$PHP11_MODULE @@ -197,7 +186,7 @@ fi : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff @@ -205,7 +194,7 @@ REPORT_EXIT_STATUS=1 \ %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -219,6 +208,15 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Jun 26 2023 Remi Collet - 1.1.2-1 +- update to 1.1.2 +- drop patch merge upstream +- build out of sources tree + +* Tue Sep 13 2022 Remi Collet - 1.1.1-2 +- add upstream patch for PHP 8.2 from + https://github.com/gamringer/php-pkcs11/pull/70 + * Thu May 26 2022 Remi Collet - 1.1.1-1 - update to 1.1.1 -- cgit