diff options
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 10 | ||||
-rw-r--r-- | php-pecl-rpminfo.spec | 77 |
3 files changed, 42 insertions, 47 deletions
@@ -3,4 +3,4 @@ rpminfo rpminfo support => enabled Extension version => 0.6.0 -RPM library version => 4.17.0 +RPM library version => 4.18.0 @@ -1,7 +1,7 @@ -Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] { +Extension [ <persistent> extension #96 rpminfo version 0.6.0 ] { - - Constants [274] { - Constant [ string RPMVERSION ] { 4.17.0 } + - Constants [278] { + Constant [ string RPMVERSION ] { 4.18.0 } Constant [ int RPMSENSE_ANY ] { 0 } Constant [ int RPMSENSE_LESS ] { 2 } Constant [ int RPMSENSE_GREATER ] { 4 } @@ -31,6 +31,7 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] { Constant [ int RPMMIRE_GLOB ] { 3 } Constant [ int RPMTAG_ARCH ] { 1022 } Constant [ int RPMTAG_ARCHIVESIZE ] { 1046 } + Constant [ int RPMTAG_ARCHSUFFIX ] { 5098 } Constant [ int RPMTAG_BASENAMES ] { 1117 } Constant [ int RPMTAG_BUGURL ] { 5012 } Constant [ int RPMTAG_BUILDARCHS ] { 1089 } @@ -233,6 +234,7 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_SOURCEPACKAGE ] { 1106 } Constant [ int RPMTAG_SOURCEPKGID ] { 1146 } Constant [ int RPMTAG_SOURCERPM ] { 1044 } + Constant [ int RPMTAG_SPEC ] { 5099 } Constant [ int RPMTAG_SUGGESTFLAGS ] { 5051 } Constant [ int RPMTAG_SUGGESTNAME ] { 5049 } Constant [ int RPMTAG_SUGGESTNEVRS ] { 5059 } @@ -254,6 +256,7 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_TRANSFILETRIGGERSCRIPTS ] { 5076 } Constant [ int RPMTAG_TRANSFILETRIGGERTYPE ] { 5089 } Constant [ int RPMTAG_TRANSFILETRIGGERVERSION ] { 5081 } + Constant [ int RPMTAG_TRANSLATIONURL ] { 5100 } Constant [ int RPMTAG_TRIGGERCONDS ] { 5005 } Constant [ int RPMTAG_TRIGGERFLAGS ] { 1068 } Constant [ int RPMTAG_TRIGGERINDEX ] { 1069 } @@ -263,6 +266,7 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_TRIGGERSCRIPTS ] { 1065 } Constant [ int RPMTAG_TRIGGERTYPE ] { 5006 } Constant [ int RPMTAG_TRIGGERVERSION ] { 1067 } + Constant [ int RPMTAG_UPSTREAMRELEASES ] { 5101 } Constant [ int RPMTAG_URL ] { 1020 } Constant [ int RPMTAG_V ] { 1001 } Constant [ int RPMTAG_VCS ] { 5034 } diff --git a/php-pecl-rpminfo.spec b/php-pecl-rpminfo.spec index 58d3b05..8f0cadd 100644 --- a/php-pecl-rpminfo.spec +++ b/php-pecl-rpminfo.spec @@ -1,7 +1,7 @@ # remirepo spec file for php-pecl-rpminfo # -# Copyright (c) 2018-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2018-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -10,21 +10,24 @@ # we don't want -z defs linker flag %undefine _strict_symbol_defs_build +%bcond_without tests + %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-rpminfo +%scl_package php-pecl-rpminfo %else %global _root_prefix %{_prefix} %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name rpminfo %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: RPM information -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.6.0 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} -License: PHP +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -42,23 +45,6 @@ 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 "%{?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.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -78,9 +64,7 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_RPMINFO_VERSION/{s/.* "//;s/".*$//;p}' php_rpminfo.h) if test "x${extver}" != "x%{version}"; then @@ -89,9 +73,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 @@ -104,25 +88,26 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --enable-rpminfo \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %{__php} --no-php-ini \ --define extension=modules/%{pecl_name}.so \ - --re %{pecl_name} >REFLECTION + --re %{pecl_name} >../%{sources}/REFLECTION %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-rpminfo \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -148,7 +133,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/".*$//') REFLECTION -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 @@ -173,34 +158,36 @@ fi %check -%if 0%{?fedora} < 33 && 0%{?rhel} < 9 || 0%{?fedora} >= 36 +cd %{sources} +%if 0%{?fedora} < 37 && 0%{?rhel} < 10 # OLD mock install sqlite db, rpm expect db6 format # NEW mock install in /usr/lib/sysimage/rpm instead of /var/lib/rpm -rm ?TS/tests/007-rpmdbinfo.phpt -rm ?TS/tests/008-rpmdbsearch.phpt -rm ?TS/tests/013-rpmdbsearch-error.phpt +rm tests/007-rpmdbinfo.phpt +rm tests/008-rpmdbsearch.phpt +rm tests/013-rpmdbsearch-error.phpt %endif -cd NTS # Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} # Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff +%endif %if %{with_zts} -cd ../ZTS # Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} # Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ @@ -208,10 +195,11 @@ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php --show-diff %endif +%endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -225,6 +213,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 0.6.0-6 +- build out of sources tree + * Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 0.6.0-5 - rebuild for PHP 8.2.0RC1 |