diff options
| -rw-r--r-- | php-pecl-seaslog.spec | 83 | 
1 files changed, 32 insertions, 51 deletions
diff --git a/php-pecl-seaslog.spec b/php-pecl-seaslog.spec index 78a1b41..21d390c 100644 --- a/php-pecl-seaslog.spec +++ b/php-pecl-seaslog.spec @@ -1,35 +1,33 @@  # remirepo spec file for php-pecl-seaslog  # -# Copyright (c) 2015-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2015-2023 Remi Collet +# License: CC-BY-SA-4.0  # http://creativecommons.org/licenses/by-sa/4.0/  #  # Please, preserve the changelog entries  # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package       php-pecl-seaslog -%else -%global _root_libdir %{_libdir} -%endif -%global with_zts   0%{!?_without_zts:%{?__ztsphp:1}} -%global proj_name  SeasLog -%global pecl_name  seaslog -%global with_tests 0%{!?_without_tests:1} +%{?scl:%scl_package php-pecl-seaslog} + +%global with_zts    0%{!?_without_zts:%{?__ztsphp:1}} +%global proj_name   SeasLog +%global pecl_name   seaslog +%global with_tests  0%{!?_without_tests:1}  %if "%{php_version}" < "5.6" -%global ini_name   %{pecl_name}.ini +%global ini_name    %{pecl_name}.ini  %else -%global ini_name   40-%{pecl_name}.ini +%global ini_name    40-%{pecl_name}.ini  %endif +%global sources     %{proj_name}-%{version} +%global _configure  ../%{sources}/configure  Summary:        An effective, fast, stable log extension for PHP -Name:           %{?sub_prefix}php-pecl-%{pecl_name} +Name:           %{?scl_prefix}php-pecl-%{pecl_name}  Version:        2.2.0 -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.0.1  URL:            https://pecl.php.net/package/%{proj_name} -Source0:        https://pecl.php.net/get/%{proj_name}-%{version}.tgz +Source0:        https://pecl.php.net/get/%{sources}.tgz  BuildRequires:  make  BuildRequires:  %{?dtsprefix}gcc @@ -40,29 +38,11 @@ BuildRequires:  %{?scl_prefix}php-json  Requires:       %{?scl_prefix}php(zend-abi) = %{php_zend_api}  Requires:       %{?scl_prefix}php(api) = %{php_core_api}  Requires:       %{?scl_prefix}php-json%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}  Provides:       %{?scl_prefix}php-%{pecl_name}               = %{version}  Provides:       %{?scl_prefix}php-%{pecl_name}%{?_isa}       = %{version}  Provides:       %{?scl_prefix}php-pecl(%{proj_name})         = %{version}  Provides:       %{?scl_prefix}php-pecl(%{proj_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} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes:      php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes:      php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes:      php80-pecl-%{pecl_name} <= %{version} -%endif -%endif  %description @@ -84,14 +64,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO  %prep  %setup -q -c -mv %{proj_name}-%{version} NTS  # Don't install tests  sed -e 's/role="test"/role="src"/' \      %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \      -i package.xml -cd NTS +cd %{sources}  #sed -e 's/ifndef ulong/if 0/' -i include/php7_wrapper.h  : Sanity check, really often broken @@ -102,9 +81,9 @@ if test "x${extver}" != "x%{version}"; 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 @@ -150,19 +129,20 @@ EOF  %build  %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS  %configure \      --with-seaslog \ -    --with-php-config=%{_bindir}/php-config +    --with-php-config=%{__phpconfig}  make %{?_smp_mflags}  %if %{with_zts}  cd ../ZTS -%{_bindir}/zts-phpize  %configure \      --with-seaslog \ -    --with-php-config=%{_bindir}/zts-php-config +    --with-php-config=%{__ztsphpconfig}  make %{?_smp_mflags}  %endif @@ -186,27 +166,25 @@ 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  %check  # No useful test in tests directory -cd NTS  : Minimal load test for NTS extension  %{__php} --no-php-ini \      --define extension=json.so \      --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ -    --modules | grep -i %{pecl_name} +    --modules | grep -i '^%{pecl_name}$'  %if %{with_zts} -cd ../ZTS  : Minimal load test for ZTS extension  %{__ztsphp} --no-php-ini \      --define extension=json.so \      --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ -    --modules | grep -i %{pecl_name} +    --modules | grep -i '^%{pecl_name}$'  %endif @@ -231,8 +209,8 @@ fi  %files +%{?_licensedir:%license %{sources}/LICENSE}  %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license NTS/LICENSE}  %{pecl_xmldir}/%{name}.xml  %config(noreplace) %{php_inidir}/%{ini_name} @@ -245,6 +223,9 @@ fi  %changelog +* Fri Sep  1 2023 Remi Collet <remi@remirepo.net> - 2.2.0-2 +- build out of sources tree +  * Tue Jan 19 2021 Remi Collet <remi@remirepo.net> - 2.2.0-1  - update to 2.2.0  | 
