summaryrefslogtreecommitdiffstats
path: root/php-pecl-zip.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-11-08 15:12:06 +0100
committerRemi Collet <remi@php.net>2021-11-08 15:12:06 +0100
commit1a9d32ce147194fa69c8ff5868de4392d22c0c08 (patch)
treec1ac39715c1d32b7c7f445a940f7c7c3504b6772 /php-pecl-zip.spec
parent9f81c235128f689f89c426707a572076f8d6513d (diff)
use remi-libzip on EL-9
Diffstat (limited to 'php-pecl-zip.spec')
-rw-r--r--php-pecl-zip.spec18
1 files changed, 17 insertions, 1 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index 8e33719..c2257a7 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -34,7 +34,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,6 +47,13 @@ BuildRequires: %{?scl_prefix}php-devel
BuildRequires: zlib-devel
BuildRequires: %{?scl_prefix}php-pear
+%if 0%{?rhel} >= 9
+%global move_to_opt 1
+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}
@@ -61,6 +68,8 @@ Requires: libzip%{?_isa} >= %{libzip_version}
Requires: libzip5%{?_isa} >= %{libzip_version}
%endif
%endif
+%endif
+
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
@@ -158,6 +167,10 @@ cp -pr NTS ZTS
%build
%{?dtsenable}
+%if %{move_to_opt}
+export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig
+%endif
+
cd NTS
%{_bindir}/phpize
%configure \
@@ -268,6 +281,9 @@ fi
%changelog
+* Mon Nov 8 2021 Remi Collet <remi@remirepo.net> - 1.20.0-2
+- use remi-libzip on EL-9
+
* Tue Oct 12 2021 Remi Collet <remi@remirepo.net> - 1.20.0-1
- update to 1.20.0