diff options
| author | Remi Collet <remi@remirepo.net> | 2026-03-09 07:38:04 +0100 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-03-09 07:38:04 +0100 |
| commit | a102bef3dacbb0a9bd1855d11cc95f83475c0fad (patch) | |
| tree | 18c8eff9a2712c315c2d39fc3e8113f97d936f2e /php-pecl-rar.spec | |
| parent | 2c7ff1ecbb837ab7bdeec9387b873bdf898019c6 (diff) | |
add pie virtual provides
drop pear/pecl dependency
sources from github
Diffstat (limited to 'php-pecl-rar.spec')
| -rw-r--r-- | php-pecl-rar.spec | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec index f69f731..3e78c3b 100644 --- a/php-pecl-rar.spec +++ b/php-pecl-rar.spec @@ -1,6 +1,6 @@ # spec file for php-pecl-rar # -# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2013-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # @@ -11,36 +11,46 @@ %bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pie_vend cataphract +%global pie_proj rar %global pecl_name rar %global ini_name 40-%{pecl_name}.ini -%global sources %{pecl_name}-%{version} +%global sources %{archivename} %global _configure ../%{sources}/configure +# Github forge +%global gh_vend %{pie_vend} +%global gh_proj php-rar +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag v%{version} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{version} Summary: PHP extension for reading RAR archives Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 4.2.0 -Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 4.3.0 +%forgemeta +Release: 1%{?dist} License: PHP-3.01 and Freeware with further limitations Group: Development/Languages -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}.tgz - -Patch0: %{pecl_name}-php81.patch -Patch1: %{pecl_name}-php82.patch -Patch2: %{pecl_name}-php83.patch +URL: %{forgeurl} +Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel -BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-devel >= 7.0 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -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} +# Extension +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +# PECL +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# PIE +Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} +Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} %description @@ -54,15 +64,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -# Don't install/register tests -sed -e 's/role="test"/role="src"/' \ - -e '/LICENSE/s/role="doc"/role="src"/' \ - -i package.xml - cd %{sources} -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 +sed -e '/PHP_RAR_VERSION/s/4.2.0/%{version}/' -i php_rar.h # Sanity check, really often broken extver=$(sed -n '/#define PHP_RAR_VERSION/{s/.* "//;s/".*$//;p}' php_rar.h) @@ -117,21 +120,12 @@ cd ../ZTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -# Install XML package description -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml - %if %{with_zts} %make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Documentation -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do - install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done - %check cd %{sources} @@ -149,7 +143,7 @@ rm tests/065.phpt TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d fatal_error_backtraces=0 -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests8.php -q --show-diff +%{__php} -n run-tests-rar.php -q --show-diff %endif @@ -164,8 +158,7 @@ REPORT_EXIT_STATUS=1 \ %files %license %{sources}/LICENSE %license %{sources}/unrar/LICENSE.txt -%doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%doc %{sources}/*.md %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -176,6 +169,16 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Mar 9 2026 Remi Collet <remi@remirepo.net> - 4.3.0-1 +- update to 4.3.0 +- add pie virtual provides +- drop pear/pecl dependency +- sources from github + +* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 4.2.0-7 +- fix build with PHP 8.5.0alpha2 using patch from + https://github.com/cataphract/php-rar/pull/18 + * Thu Jul 10 2025 Remi Collet <remi@remirepo.net> - 4.2.0-6 - re-license spec file to CECILL-2.1 |
