summaryrefslogtreecommitdiffstats
path: root/php-pecl-rar.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-rar.spec')
-rw-r--r--php-pecl-rar.spec59
1 files changed, 23 insertions, 36 deletions
diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec
index ea22e2c..f69f731 100644
--- a/php-pecl-rar.spec
+++ b/php-pecl-rar.spec
@@ -1,8 +1,8 @@
# spec file for php-pecl-rar
#
-# Copyright (c) 2013-2022 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -12,18 +12,14 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name rar
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
%global ini_name 40-%{pecl_name}.ini
-%endif
%global sources %{pecl_name}-%{version}
%global _configure ../%{sources}/configure
Summary: PHP extension for reading RAR archives
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 4.2.0
-Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP-3.01 and Freeware with further limitations
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
@@ -60,7 +56,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
@@ -93,13 +89,15 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -107,14 +105,14 @@ cd ../ZTS
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -123,7 +121,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -135,26 +133,6 @@ do
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
cd %{sources}
@@ -164,9 +142,12 @@ cd %{sources}
--modules | grep '^%{pecl_name}$'
%if %{with tests}
+# erratic results
+rm tests/065.phpt
+
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
+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
%endif
@@ -181,8 +162,8 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license %{sources}/LICENSE}
-%{?_licensedir:%license %{sources}/unrar/LICENSE.txt}
+%license %{sources}/LICENSE
+%license %{sources}/unrar/LICENSE.txt
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -195,6 +176,12 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Jul 10 2025 Remi Collet <remi@remirepo.net> - 4.2.0-6
+- re-license spec file to CECILL-2.1
+
+* Mon Nov 25 2024 Remi Collet <remi@remirepo.net> - 4.2.0-5
+- spec cleanup
+
* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 4.2.0-4
- add patch for PHP 8.3 from ammended
https://github.com/cataphract/php-rar/pull/18