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.spec15
1 files changed, 13 insertions, 2 deletions
diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec
index e879586..669d5c7 100644
--- a/php-pecl-rar.spec
+++ b/php-pecl-rar.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-rar
#
-# Copyright (c) 2013-2020 Remi Collet
+# Copyright (c) 2013-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -19,12 +19,15 @@
Summary: PHP extension for reading RAR archives
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 4.2.0
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP and Freeware with further limitations
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-php81.patch
+
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -53,6 +56,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%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
@@ -74,6 +80,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RAR_VERSION/{s/.* "//;s/".*$//;p}' php_rar.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -206,6 +214,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Sep 10 2021 Remi Collet <remi@remirepo.net> - 4.2.0-2
+- add upstream patch for PHP 8.1
+
* Mon Dec 7 2020 Remi Collet <remi@remirepo.net> - 4.2.0-1
- update to 4.2.0