diff options
Diffstat (limited to 'php-pecl-pam.spec')
-rw-r--r-- | php-pecl-pam.spec | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/php-pecl-pam.spec b/php-pecl-pam.spec index 577282c..36648b7 100644 --- a/php-pecl-pam.spec +++ b/php-pecl-pam.spec @@ -1,40 +1,33 @@ # remirepo spec file for php-pecl-pam # -# Copyright (c) 2021-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2021-2023 Remi Collet +# License: CC-BY-SA-4.0 # https://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%scl_package php-pecl-pam -%else -%global _root_prefix %{_prefix} -%endif + +%{?scl:%scl_package php-pecl-pam} %global pecl_name pam %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} # after 40-raphf %global ini_name 50-%{pecl_name}.ini -%ifarch %{arm} -# Test suite disabled because of erratic results on slow ARM (timeout) -%bcond_with tests -%else -%bcond_without tests -%endif %global upstream_version 2.2.4 #global upstream_prever beta1 #global upstream_lower beta1 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure Name: %{?scl_prefix}php-pecl-%{pecl_name} Summary: PAM integration Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: PHP +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 URL: https://pecl.php.net/package/PAM -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -44,7 +37,6 @@ BuildRequires: pam-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} @@ -76,11 +68,10 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS +cd %{sources} extver=$(sed -n '/#define PHP_PAM_VERSION/{s/.* "//;s/".*$//;p}' php_pam.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}"; then : Error: Upstream version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:dev}. @@ -89,9 +80,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}" fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -115,15 +106,16 @@ peclconf() { --with-libdir=%{_lib} \ --with-php-config=$1 } -cd NTS -%{_bindir}/phpize -peclconf %{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +peclconf %{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclconf %{_bindir}/zts-php-config +peclconf %{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -145,7 +137,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -cd NTS +cd %{sources} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -186,7 +178,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -198,6 +190,9 @@ fi %endif %changelog +* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 2.2.4-2 +- build out of sources tree + * Wed Jan 19 2022 Remi Collet <remi@remirepo.net> - 2.2.4-1 - update to 2.2.4 |