summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-zip.spec36
1 files changed, 17 insertions, 19 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index fcaec5d..951da09 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -15,6 +15,12 @@
%{?scl: %scl_package php-pecl-zip}
+%if 0%{?rhel} == 7 || ( 0%{?scl:1} && 0%{?rhel} == 8 ) || 0%{?rhel} >= 9
+%bcond_without move_to_opt
+%else
+%bcond_with move_to_opt
+%endif
+
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name zip
@@ -22,7 +28,7 @@
#global upstream_prever dev
#global upstream_lower DEV
-%global libzip_version 1.9.1
+%global libzip_version 1.9.2
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
@@ -34,7 +40,7 @@
Summary: A ZIP archive management extension
Name: %{?scl_prefix}php-pecl-zip
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/zip
@@ -47,27 +53,13 @@ BuildRequires: %{?scl_prefix}php-devel
BuildRequires: zlib-devel
BuildRequires: %{?scl_prefix}php-pear
-%if 0%{?rhel} >= 9
-%global move_to_opt 1
+%if %{with move_to_opt}
BuildRequires: %{?vendeur:%{vendeur}-}libzip-devel >= %{libzip_version}
Requires: %{?vendeur:%{vendeur}-}libzip%{?_isa} >= %{libzip_version}
%global __requires_exclude ^libzip\\.so.*$
%else
-%global move_to_opt 0
-%if 0%{?rhel} >= 8 && 0%{?scl:1}
-# use SCLized libzip
-BuildRequires: %{?scl_prefix}libzip-devel >= %{libzip_version}
-Requires: %{?scl_prefix}libzip%{?_isa} >= %{libzip_version}
-%global __requires_exclude ^libzip\\.so.*$
-%else
# Ensure latest version is used
-BuildRequires: pkgconfig(libzip) >= %{libzip_version}
-%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
-Requires: libzip%{?_isa} >= %{libzip_version}
-%else
-Requires: libzip5%{?_isa} >= %{libzip_version}
-%endif
-%endif
+BuildRequires: libzip-devel >= %{libzip_version}
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -167,7 +159,7 @@ cp -pr NTS ZTS
%build
%{?dtsenable}
-%if %{move_to_opt}
+%if %{with move_to_opt}
export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig
%endif
@@ -215,6 +207,9 @@ done
%check
OPT="-q --show-diff"
+%if "%{php_version}" > "8.0"
+OPT="$OPT %{?_smp_mflags}"
+%endif
cd NTS
: minimal load test of NTS extension
@@ -278,6 +273,9 @@ fi
%changelog
+* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.21.0-2
+- rebuild using libzip 1.9.2 (remi-libzip on EL)
+
* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.21.0-1
- update to 1.21.0