diff options
-rw-r--r-- | php-pecl-oauth.spec | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/php-pecl-oauth.spec b/php-pecl-oauth.spec index 15a77f3..775c495 100644 --- a/php-pecl-oauth.spec +++ b/php-pecl-oauth.spec @@ -11,19 +11,19 @@ %bcond_without tests -%if 0%{?scl:1} -%scl_package php-pecl-oauth -%endif +%{?scl:%scl_package php-pecl-oauth} %global pecl_name oauth %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Name: %{?scl_prefix}php-pecl-oauth Version: 2.0.7 -Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP OAuth consumer extension -License: BSD +License: BSD-3-Clause URL: https://pecl.php.net/package/oauth Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -40,14 +40,13 @@ BuildRequires: libcurl-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} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff Obsoletes: php56u-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "7.1" @@ -55,17 +54,6 @@ Obsoletes: php71u-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.2" Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-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 @@ -83,16 +71,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version} 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 -%patch0 -p1 -b .up -%patch1 -p1 -b .pr24 +cd %{sources} +%patch -P0 -p1 -b .up +%patch -P1 -p1 -b .pr24 #sed -e '/PHP_OAUTH_VERSION/s/2.0.3-dev/2.0.3/' -i php_oauth.h # Sanity check, really often broken @@ -108,24 +94,25 @@ cat >%{ini_name} << 'EOF' extension=%{pecl_name}.so EOF +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif %build %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config +%configure --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -147,7 +134,7 @@ install -D -m 644 %{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 @@ -174,19 +161,19 @@ fi %check +cd %{sources} + : Minimal load test for NTS extension %{__php} -n \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^OAuth$' %if %{with tests} -cd NTS : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=posix.so -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 %endif %if %{with_zts} @@ -199,7 +186,7 @@ REPORT_EXIT_STATUS=1 \ %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -213,6 +200,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Tue Jul 18 2023 Remi Collet <remi@remirepo.net> - 2.0.7-8 +- build out of sources tree + * Tue Sep 20 2022 Remi Collet <remi@remirepo.net> - 2.0.7-7 - drop unneeded build dependency on pcre #2128353 |