diff options
| -rw-r--r-- | php-zstd.spec | 44 | 
1 files changed, 22 insertions, 22 deletions
diff --git a/php-zstd.spec b/php-zstd.spec index eec64bb..9635bb4 100644 --- a/php-zstd.spec +++ b/php-zstd.spec @@ -7,9 +7,6 @@  # Please, preserve the changelog entries  # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build -  %{?scl:%scl_package php-zstd}  %bcond_without tests @@ -22,11 +19,13 @@  %global with_zts    0%{!?_without_zts:%{?__ztsphp:1}}  %global ini_name    40-%{pecl_name}.ini  %global buildver    %(pkg-config --silence-errors --modversion libzstd 2>/dev/null || echo 65536) +%global sources     %{pecl_name}-%{version} +%global _configure  ../%{sources}/configure  Summary:       Zstandard extension  Name:          %{?scl_prefix}php-%{pecl_name}  Version:       0.12.3 -Release:       1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release:       2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  %if %{with libzstd}  License:       MIT  %else @@ -51,7 +50,6 @@ Provides:      bundled(libzstd) = %{zstdver}  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} @@ -78,12 +76,10 @@ These are the files needed to compile programs using %{name}.  %prep  %setup -qc -mv %{pecl_name}-%{version} NTS  %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS - +cd %{sources}  %if %{with libzstd}  # Use the system library  rm -r zstd @@ -100,9 +96,9 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then  fi  cd .. +mkdir NTS  %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS  %endif  # Drop in the bit of configuration @@ -115,10 +111,12 @@ EOF  %build  %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS  %configure \ -    --with-php-config=%{_bindir}/php-config \ +    --with-php-config=%{__phpconfig} \  %if %{with libzstd}      --with-libzstd \  %endif @@ -128,9 +126,8 @@ make %{?_smp_mflags}  %if %{with_zts}  cd ../ZTS -%{_bindir}/zts-phpize  %configure \ -    --with-php-config=%{_bindir}/zts-php-config \ +    --with-php-config=%{__ztsphpconfig} \  %if %{with libzstd}      --with-libzstd \  %endif @@ -158,15 +155,17 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}  # Test & Documentation  for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do [ -f NTS/tests/$i ] && install -Dpm 644 NTS/tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i +do [ -f %{sources}/tests/$i ] && install -Dpm 644 %{sources}/tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i  done  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 +cd %{sources} +  export REPORT_EXIT_STATUS=1  %if %{with libzstd}  ver=$(pkg-config libzstd --modversion) @@ -175,7 +174,6 @@ export REPORT_EXIT_STATUS=0  fi  %endif -cd NTS  : Minimal load test for NTS extension  %{__php} --no-php-ini \      --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -199,7 +197,6 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \  %endif  %if %{with_zts} -cd ../ZTS  : Minimal load test for ZTS extension  %{__ztsphp} --no-php-ini \      --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ @@ -215,11 +212,11 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \  %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE}  %doc %{pecl_docdir}/%{pecl_name}  %{pecl_xmldir}/%{name}.xml  %if ! %{with libzstd} -%{?_licensedir:%license NTS/LICENSE-libzstd} +%{?_licensedir:%license %{sources}/LICENSE-libzstd}  %endif  %config(noreplace) %{php_inidir}/%{ini_name} @@ -232,7 +229,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \  %files devel -%doc NTS/tests +%doc %{sources}/tests  %{php_incldir}/ext/%{pecl_name}  %if %{with_zts} @@ -241,6 +238,9 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \  %changelog +* Tue Jul 18 2023 Remi Collet <remi@remirepo.net> - 0.12.3-2 +- build out of sources tree +  * Sat Apr 29 2023 Remi Collet <remi@remirepo.net> - 0.12.3-1  - update to 0.12.3  - drop patch merged upstream  | 
