diff options
author | Remi Collet <remi@remirepo.net> | 2023-06-22 10:05:37 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-06-22 10:05:37 +0200 |
commit | a05f0c80b08ff2ac26a4b241d0792087544e85ac (patch) | |
tree | 629d0f5015cc0df9394b43631d804fab6c3e327f /php-pecl-rnp.spec | |
parent | dfd730dd45078c4305cd6fff8ed5ebba3c700665 (diff) |
build out of sources tree
Diffstat (limited to 'php-pecl-rnp.spec')
-rw-r--r-- | php-pecl-rnp.spec | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/php-pecl-rnp.spec b/php-pecl-rnp.spec index 37fffe2..ba0c169 100644 --- a/php-pecl-rnp.spec +++ b/php-pecl-rnp.spec @@ -21,11 +21,13 @@ %global upstream_version 0.2.0 #global upstream_prever a1 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure Summary: wrapper around the RNP library Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -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;')}} License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} @@ -39,7 +41,6 @@ BuildRequires: librnp-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_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} @@ -55,26 +56,23 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS - # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS +pushd %{sources} # Check version as upstream often forget to update this extver=$(sed -n '/define PHP_RNP_VERSION/{s/.* "//;s/".*$//;p}' php_rnp.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then : Error: Upstream version is ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:-dev}. exit 1 fi -cd .. - +popd +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -93,15 +91,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 @@ -124,7 +123,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 [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -143,7 +142,7 @@ done %endif %if %{with tests} -cd NTS +cd %{sources} : Run upstream test suite TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ %{__php} -n run-tests.php -q --show-diff %{?_smp_mflags} @@ -171,7 +170,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -185,6 +184,9 @@ fi %changelog +* Thu Jun 22 2023 Remi Collet <remi@remirepo.net> - 0.2.0-2 +- build out of sources tree + * Wed Apr 5 2023 Remi Collet <remi@remirepo.net> - 0.2.0-1 - update to 0.2.0 - drop patches merged upstream |