diff options
| author | Remi Collet <remi@remirepo.net> | 2023-09-01 09:02:33 +0200 | 
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2023-09-01 09:02:33 +0200 | 
| commit | 40c924575cad95550d3b65d412978528539342c6 (patch) | |
| tree | b672d9c9bdfa885115a1e333e280a724c5bc3821 | |
| parent | 1743ff287951ad9ef58eb30333aa51b68c2932d8 (diff) | |
build out of sources tree
| -rw-r--r-- | php-pecl-geospatial.spec | 52 | 
1 files changed, 26 insertions, 26 deletions
diff --git a/php-pecl-geospatial.spec b/php-pecl-geospatial.spec index 222725a..aaa5e14 100644 --- a/php-pecl-geospatial.spec +++ b/php-pecl-geospatial.spec @@ -1,7 +1,7 @@  # remirepo spec file for php-pecl-geospatial  # -# Copyright (c) 2015-2022 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 @@ -16,6 +16,8 @@  %global with_zts    0%{!?_without_zts:%{?__ztsphp:1}}  %global pecl_name   geospatial  %global ini_name    40-%{pecl_name}.ini +%global sources     %{gh_project}-%{gh_commit} +%global _configure  ../%{sources}/configure  %bcond_without  tests @@ -25,10 +27,10 @@ Version:        0.3.2  %if 0%{?gh_date:1}  Release:        0.11.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  %else -Release:        2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release:        3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  %endif -License:        PHP +License:        PHP-3.01  URL:            https://pecl.php.net/package/%{pecl_name}  Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz @@ -40,7 +42,6 @@ BuildRequires:  %{?scl_prefix}php-json  Requires:       %{?scl_prefix}php(zend-abi) = %{php_zend_api}  Requires:       %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}  # Package have be renamed  Obsoletes:      %{?scl_prefix}php-%{pecl_name}               < %{version} @@ -64,12 +65,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO  %prep  %setup -qc -mv %{gh_project}-%{gh_commit} NTS -mv NTS/package.xml . +mv %{sources}/package.xml .  %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS +cd %{sources}  # Check version as upstream often forget to update this  extver=$(sed -n '/#define PHP_GEOSPATIAL_VERSION/{s/.* "//;s/".*$//;p}' php_geospatial.h)  if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then @@ -84,10 +84,9 @@ cat << 'EOF' | tee %{ini_name}  extension = %{pecl_name}.so  EOF - +mkdir NTS  %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS  %endif @@ -99,15 +98,16 @@ peclconf() {      --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 @@ -130,19 +130,20 @@ 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 [ -f NTS/$i ] &&  install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do [ -f NTS/$i ] &&  install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i  done  %check -cd NTS +cd %{sources} +  OPT="-n"  if [ -f %{php_extdir}/json.so ]; then    OPT="$OPT -d extension=json.so"  fi  : Minimal load test for NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \      --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \      --modules | grep %{pecl_name} @@ -150,16 +151,13 @@ fi  : Upstream test suite for NTS extension  TEST_PHP_EXECUTABLE=%{__php} \  TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \  REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff  %else  : Upstream test suite disabled  %endif  %if %{with_zts} -cd ../ZTS -  : Minimal load test for ZTS extension  %{__ztsphp} --no-php-ini \      --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ @@ -169,9 +167,8 @@ cd ../ZTS  : Upstream test suite for ZTS extension  TEST_PHP_EXECUTABLE=%{__ztsphp} \  TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \  REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff  %else  : Upstream test suite disabled  %endif @@ -199,7 +196,7 @@ fi  %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE}  %{!?_licensedir:%doc %{pecl_docdir}/%{pecl_name}}  %{pecl_xmldir}/%{name}.xml @@ -213,6 +210,9 @@ fi  %changelog +* Fri Sep  1 2023 Remi Collet <remi@remirepo.net> - 0.3.2-3 +- build out of sources tree +  * Thu Sep  1 2022 Remi Collet <remi@remirepo.net> - 0.3.2-2  - rebuild for PHP 8.2.0RC1  | 
