diff options
| -rw-r--r-- | PHPINFO | 4 | ||||
| -rw-r--r-- | REFLECTION | 374 | ||||
| -rw-r--r-- | php-pecl-zip.spec | 297 |
3 files changed, 413 insertions, 262 deletions
@@ -2,8 +2,8 @@ zip Zip => enabled -Zip version => 1.20.0-dev -Libzip version => 1.8.0 +Zip version => 1.22.7 +Libzip version => 1.11.4 BZIP2 compression => Yes XZ compression => Yes ZSTD compression => Yes @@ -1,75 +1,87 @@ -Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { +Extension [ <persistent> extension #66 zip version 1.22.7 ] { + + - Dependencies { + Dependency [ pcre (Required) ] + } - Functions { - Function [ <internal:zip> function zip_open ] { + Function [ <internal, deprecated:zip> function zip_open ] { - Parameters [1] { - Parameter #0 [ <required> $filename ] + Parameter #0 [ <required> string $filename ] } } - Function [ <internal:zip> function zip_close ] { + Function [ <internal, deprecated:zip> function zip_close ] { - Parameters [1] { Parameter #0 [ <required> $zip ] } + - Return [ void ] } - Function [ <internal:zip> function zip_read ] { + Function [ <internal, deprecated:zip> function zip_read ] { - Parameters [1] { Parameter #0 [ <required> $zip ] } } - Function [ <internal:zip> function zip_entry_open ] { + Function [ <internal, deprecated:zip> function zip_entry_open ] { - Parameters [3] { Parameter #0 [ <required> $zip_dp ] Parameter #1 [ <required> $zip_entry ] - Parameter #2 [ <optional> $mode ] + Parameter #2 [ <optional> string $mode = "rb" ] } + - Return [ bool ] } - Function [ <internal:zip> function zip_entry_close ] { + Function [ <internal, deprecated:zip> function zip_entry_close ] { - Parameters [1] { - Parameter #0 [ <required> $zip_ent ] + Parameter #0 [ <required> $zip_entry ] } + - Return [ bool ] } - Function [ <internal:zip> function zip_entry_read ] { + Function [ <internal, deprecated:zip> function zip_entry_read ] { - Parameters [2] { Parameter #0 [ <required> $zip_entry ] - Parameter #1 [ <optional> $len ] + Parameter #1 [ <optional> int $len = 1024 ] } + - Return [ string|false ] } - Function [ <internal:zip> function zip_entry_filesize ] { + Function [ <internal, deprecated:zip> function zip_entry_name ] { - Parameters [1] { Parameter #0 [ <required> $zip_entry ] } + - Return [ string|false ] } - Function [ <internal:zip> function zip_entry_name ] { + Function [ <internal, deprecated:zip> function zip_entry_compressedsize ] { - Parameters [1] { Parameter #0 [ <required> $zip_entry ] } + - Return [ int|false ] } - Function [ <internal:zip> function zip_entry_compressedsize ] { + Function [ <internal, deprecated:zip> function zip_entry_filesize ] { - Parameters [1] { Parameter #0 [ <required> $zip_entry ] } + - Return [ int|false ] } - Function [ <internal:zip> function zip_entry_compressionmethod ] { + Function [ <internal, deprecated:zip> function zip_entry_compressionmethod ] { - Parameters [1] { Parameter #0 [ <required> $zip_entry ] } + - Return [ string|false ] } } - Classes [1] { Class [ <internal:zip> class ZipArchive implements Countable ] { - - Constants [101] { + - Constants [110] { Constant [ public int CREATE ] { 1 } Constant [ public int EXCL ] { 2 } Constant [ public int CHECKCONS ] { 4 } @@ -89,6 +101,7 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { Constant [ public int FL_ENC_STRICT ] { 128 } Constant [ public int FL_ENC_UTF_8 ] { 2048 } Constant [ public int FL_ENC_CP437 ] { 4096 } + Constant [ public int FL_OPEN_FILE_NOW ] { 1073741824 } Constant [ public int CM_DEFAULT ] { -1 } Constant [ public int CM_STORE ] { 0 } Constant [ public int CM_SHRINK ] { 1 } @@ -142,6 +155,13 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { Constant [ public int ER_TELL ] { 30 } Constant [ public int ER_COMPRESSED_DATA ] { 31 } Constant [ public int ER_CANCELLED ] { 32 } + Constant [ public int ER_DATA_LENGTH ] { 33 } + Constant [ public int ER_NOT_ALLOWED ] { 34 } + Constant [ public int ER_TRUNCATED_ZIP ] { 35 } + Constant [ public int AFL_RDONLY ] { 2 } + Constant [ public int AFL_IS_TORRENTZIP ] { 4 } + Constant [ public int AFL_WANT_TORRENTZIP ] { 8 } + Constant [ public int AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE ] { 16 } Constant [ public int OPSYS_DOS ] { 0 } Constant [ public int OPSYS_AMIGA ] { 1 } Constant [ public int OPSYS_OPENVMS ] { 2 } @@ -151,7 +171,6 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { Constant [ public int OPSYS_OS_2 ] { 6 } Constant [ public int OPSYS_MACINTOSH ] { 7 } Constant [ public int OPSYS_Z_SYSTEM ] { 8 } - Constant [ public int OPSYS_Z_CPM ] { 9 } Constant [ public int OPSYS_CPM ] { 9 } Constant [ public int OPSYS_WINDOWS_NTFS ] { 10 } Constant [ public int OPSYS_MVS ] { 11 } @@ -170,7 +189,9 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { Constant [ public int EM_AES_192 ] { 258 } Constant [ public int EM_AES_256 ] { 259 } Constant [ public int EM_UNKNOWN ] { 65535 } - Constant [ public string LIBZIP_VERSION ] { 1.8.0 } + Constant [ public string LIBZIP_VERSION ] { 1.11.4 } + Constant [ public int LENGTH_TO_END ] { 0 } + Constant [ public int LENGTH_UNCHECKED ] { -2 } } - Static properties [0] { @@ -180,416 +201,481 @@ Extension [ <persistent> extension #66 zip version 1.20.0-dev ] { Method [ <internal:zip> static public method isCompressionMethodSupported ] { - Parameters [2] { - Parameter #0 [ <required> $method ] - Parameter #1 [ <optional> $encode ] + Parameter #0 [ <required> int $method ] + Parameter #1 [ <optional> bool $enc = true ] } + - Return [ bool ] } Method [ <internal:zip> static public method isEncryptionMethodSupported ] { - Parameters [2] { - Parameter #0 [ <required> $method ] - Parameter #1 [ <optional> $encode ] + Parameter #0 [ <required> int $method ] + Parameter #1 [ <optional> bool $enc = true ] } + - Return [ bool ] } } - Properties [6] { - Property [ <default> public $lastId ] - Property [ <default> public $status ] - Property [ <default> public $statusSys ] - Property [ <default> public $numFiles ] - Property [ <default> public $filename ] - Property [ <default> public $comment ] + Property [ public int $lastId ] + Property [ public int $status ] + Property [ public int $statusSys ] + Property [ public int $numFiles ] + Property [ public string $filename ] + Property [ public string $comment ] } - - Methods [48] { + - Methods [50] { Method [ <internal:zip> public method open ] { - Parameters [2] { - Parameter #0 [ <required> $filename ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $filename ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ int|bool ] } Method [ <internal:zip> public method setPassword ] { - Parameters [1] { - Parameter #0 [ <required> $password ] + Parameter #0 [ <required> string $password ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method close ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip, prototype Countable> public method count ] { - Parameters [0] { } + - Tentative return [ int ] } Method [ <internal:zip> public method getStatusString ] { - Parameters [0] { } + - Tentative return [ string ] } Method [ <internal:zip> public method clearError ] { - Parameters [0] { } + - Return [ void ] } Method [ <internal:zip> public method addEmptyDir ] { - Parameters [2] { - Parameter #0 [ <required> $dirname ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $dirname ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method addFromString ] { - Parameters [3] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $content ] - Parameter #2 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> string $content ] + Parameter #2 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method addFile ] { - Parameters [5] { - Parameter #0 [ <required> $filepath ] - Parameter #1 [ <optional> $entryname ] - Parameter #2 [ <optional> $start ] - Parameter #3 [ <optional> $length ] - Parameter #4 [ <optional> $flags ] + Parameter #0 [ <required> string $filepath ] + Parameter #1 [ <optional> string $entryname = "" ] + Parameter #2 [ <optional> int $start = 0 ] + Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ] + Parameter #4 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ] } + - Tentative return [ bool ] + } + + Method [ <internal:zip> public method replaceFile ] { + + - Parameters [5] { + Parameter #0 [ <required> string $filepath ] + Parameter #1 [ <required> int $index ] + Parameter #2 [ <optional> int $start = 0 ] + Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ] + Parameter #4 [ <optional> int $flags = 0 ] + } + - Tentative return [ bool ] } Method [ <internal:zip> public method addGlob ] { - Parameters [3] { - Parameter #0 [ <required> $pattern ] - Parameter #1 [ <optional> $flags ] - Parameter #2 [ <optional> $options ] + Parameter #0 [ <required> string $pattern ] + Parameter #1 [ <optional> int $flags = 0 ] + Parameter #2 [ <optional> array $options = [] ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method addPattern ] { - Parameters [3] { - Parameter #0 [ <required> $pattern ] - Parameter #1 [ <optional> $path ] - Parameter #2 [ <optional> $options ] + Parameter #0 [ <required> string $pattern ] + Parameter #1 [ <optional> string $path = "." ] + Parameter #2 [ <optional> array $options = [] ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method renameIndex ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $new_name ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> string $new_name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method renameName ] { - Parameters [2] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $new_name ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> string $new_name ] } + - Tentative return [ bool ] } - Method [ <internal:zip> public method replaceFile ] { + Method [ <internal:zip> public method setArchiveComment ] { - - Parameters [5] { - Parameter #0 [ <required> $filepath ] - Parameter #1 [ <required> $index ] - Parameter #2 [ <optional> $start ] - Parameter #3 [ <optional> $length ] - Parameter #4 [ <optional> $flags ] + - Parameters [1] { + Parameter #0 [ <required> string $comment ] } + - Tentative return [ bool ] } - Method [ <internal:zip> public method setArchiveComment ] { + Method [ <internal:zip> public method getArchiveComment ] { - Parameters [1] { - Parameter #0 [ <required> $comment ] + Parameter #0 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } - Method [ <internal:zip> public method getArchiveComment ] { + Method [ <internal:zip> public method setArchiveFlag ] { - - Parameters [1] { - Parameter #0 [ <optional> $flags ] + - Parameters [2] { + Parameter #0 [ <required> int $flag ] + Parameter #1 [ <required> int $value ] } + - Return [ bool ] + } + + Method [ <internal:zip> public method getArchiveFlag ] { + + - Parameters [2] { + Parameter #0 [ <required> int $flag ] + Parameter #1 [ <optional> int $flags = 0 ] + } + - Return [ int ] } Method [ <internal:zip> public method setCommentIndex ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $comment ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> string $comment ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCommentName ] { - Parameters [2] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $comment ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> string $comment ] } + - Tentative return [ bool ] + } + + Method [ <internal:zip> public method setMtimeIndex ] { + + - Parameters [3] { + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> int $timestamp ] + Parameter #2 [ <optional> int $flags = 0 ] + } + - Tentative return [ bool ] + } + + Method [ <internal:zip> public method setMtimeName ] { + + - Parameters [3] { + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> int $timestamp ] + Parameter #2 [ <optional> int $flags = 0 ] + } + - Tentative return [ bool ] } Method [ <internal:zip> public method getCommentIndex ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method getCommentName ] { - Parameters [2] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method deleteIndex ] { - Parameters [1] { - Parameter #0 [ <required> $index ] + Parameter #0 [ <required> int $index ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method deleteName ] { - Parameters [1] { - Parameter #0 [ <required> $name ] + Parameter #0 [ <required> string $name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method statName ] { - Parameters [2] { - Parameter #0 [ <required> $filename ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method statIndex ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method locateName ] { - Parameters [2] { - Parameter #0 [ <required> $filename ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ int|false ] } Method [ <internal:zip> public method getNameIndex ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method unchangeArchive ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeAll ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeIndex ] { - Parameters [1] { - Parameter #0 [ <required> $index ] + Parameter #0 [ <required> int $index ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeName ] { - Parameters [1] { - Parameter #0 [ <required> $name ] + Parameter #0 [ <required> string $name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method extractTo ] { - Parameters [2] { - Parameter #0 [ <required> $pathto ] - Parameter #1 [ <optional> $files ] + Parameter #0 [ <required> string $pathto ] + Parameter #1 [ <optional> array|string|null $files = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getFromName ] { - Parameters [3] { - Parameter #0 [ <required> $entryname ] - Parameter #1 [ <optional> $len ] - Parameter #2 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <optional> int $len = 0 ] + Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method getFromIndex ] { - Parameters [3] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <optional> $len ] - Parameter #2 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <optional> int $len = 0 ] + Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } - Method [ <internal:zip> public method getStreamName ] { + Method [ <internal:zip> public method getStreamIndex ] { - Parameters [2] { - Parameter #0 [ <required> $entryname ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <optional> int $flags = 0 ] } } - Method [ <internal:zip> public method getStreamIndex ] { + Method [ <internal:zip> public method getStreamName ] { - Parameters [2] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <optional> int $flags = 0 ] } } Method [ <internal:zip> public method getStream ] { - Parameters [1] { - Parameter #0 [ <required> $entryname ] + Parameter #0 [ <required> string $name ] } } Method [ <internal:zip> public method setExternalAttributesName ] { - Parameters [4] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $opsys ] - Parameter #2 [ <required> $attr ] - Parameter #3 [ <optional> $flags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> int $opsys ] + Parameter #2 [ <required> int $attr ] + Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setExternalAttributesIndex ] { - Parameters [4] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $opsys ] - Parameter #2 [ <required> $attr ] - Parameter #3 [ <optional> $flags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> int $opsys ] + Parameter #2 [ <required> int $attr ] + Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getExternalAttributesName ] { - Parameters [4] { - Parameter #0 [ <required> $name ] + Parameter #0 [ <required> string $name ] Parameter #1 [ <required> &$opsys ] Parameter #2 [ <required> &$attr ] - Parameter #3 [ <optional> $flags ] + Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getExternalAttributesIndex ] { - Parameters [4] { - Parameter #0 [ <required> $index ] + Parameter #0 [ <required> int $index ] Parameter #1 [ <required> &$opsys ] Parameter #2 [ <required> &$attr ] - Parameter #3 [ <optional> $flags ] - } - } - - Method [ <internal:zip> public method setMtimeName ] { - - - Parameters [3] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $timestamp ] - Parameter #2 [ <optional> $flags ] - } - } - - Method [ <internal:zip> public method setMtimeIndex ] { - - - Parameters [3] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $timestamp ] - Parameter #2 [ <optional> $flags ] + Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCompressionName ] { - Parameters [3] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $method ] - Parameter #2 [ <optional> $compflags ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> int $method ] + Parameter #2 [ <optional> int $compflags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCompressionIndex ] { - Parameters [3] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $method ] - Parameter #2 [ <optional> $compflags ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> int $method ] + Parameter #2 [ <optional> int $compflags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setEncryptionName ] { - Parameters [3] { - Parameter #0 [ <required> $name ] - Parameter #1 [ <required> $method ] - Parameter #2 [ <optional> $password ] + Parameter #0 [ <required> string $name ] + Parameter #1 [ <required> int $method ] + Parameter #2 [ <optional> ?string $password = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setEncryptionIndex ] { - Parameters [3] { - Parameter #0 [ <required> $index ] - Parameter #1 [ <required> $method ] - Parameter #2 [ <optional> $password ] + Parameter #0 [ <required> int $index ] + Parameter #1 [ <required> int $method ] + Parameter #2 [ <optional> ?string $password = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method registerProgressCallback ] { - Parameters [2] { - Parameter #0 [ <required> $rate ] - Parameter #1 [ <required> $callback ] + Parameter #0 [ <required> float $rate ] + Parameter #1 [ <required> callable $callback ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method registerCancelCallback ] { - Parameters [1] { - Parameter #0 [ <required> $callback ] + Parameter #0 [ <required> callable $callback ] } + - Tentative return [ bool ] } } } diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec index 398b4e4..74df757 100644 --- a/php-pecl-zip.spec +++ b/php-pecl-zip.spec @@ -3,26 +3,35 @@ # # fedora spec file for php-pecl-zip # -# Copyright (c) 2013-2021 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 # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-zip} -%{?scl: %scl_package php-pecl-zip} +%if ( 0%{?scl:1} && 0%{?rhel} == 8 ) || 0%{?rhel} >= 9 +%bcond_without move_to_opt +%else +%bcond_with move_to_opt +%endif + +%bcond_without tests -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global pecl_name zip +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name zip +%global pie_vend pecl +%global pie_proj zip -%global upstream_version 1.20.0 -%global upstream_prever dev -%global upstream_lower DEV +%global upstream_version 1.22.7 +#global upstream_prever dev +#global upstream_lower DEV +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure -%global libzip_version 1.8.0 +%global libzip_version 1.11.1 %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini @@ -34,12 +43,12 @@ Summary: A ZIP archive management extension Name: %{?scl_prefix}php-pecl-zip Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: PHP +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 Group: Development/Languages URL: https://pecl.php.net/package/zip -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -47,73 +56,44 @@ BuildRequires: %{?scl_prefix}php-devel BuildRequires: zlib-devel BuildRequires: %{?scl_prefix}php-pear -%if 0%{?rhel} >= 8 && 0%{?scl:1} -# use SCLized libzip -BuildRequires: %{?scl_prefix}libzip-devel >= %{libzip_version} -Requires: %{?scl_prefix}libzip%{?_isa} >= %{libzip_version} +%if %{with move_to_opt} +BuildRequires: %{?vendeur:%{vendeur}-}libzip-devel >= %{libzip_version} +Requires: %{?vendeur:%{vendeur}-}libzip%{?_isa} >= %{libzip_version} +%global __brp_check_rpaths /bin/true %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 +BuildRequires: libzip-devel >= %{libzip_version} +Requires: libzip%{?_isa} >= %{libzip_version} %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}} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# Extension Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release} +# 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} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif +Obsoletes: %{?scl_prefix}php-zip <= 7.0.0 %endif -%if "%{php_version}" > "7.0" -Obsoletes: %{?scl_prefix}php-zip <= 7.0.0 +%if 0%{?rhel} >= 10 && "%{?vendeur}" == "remi" && 0%{!?scl:1} +%if "%{php_version}" >= "8.5" +Obsoletes: php8.4-pecl-zip < %{version}-%{release} +Obsoletes: php8.5-pecl-zip < %{version}-%{release} +Provides: php8.5-pecl-zip = %{version}-%{release} +Provides: php8.5-pecl-zip%{?_isa} = %{version}-%{release} +%elif "%{php_version}" >= "8.4" +Obsoletes: php8.4-pecl-zip < %{version}-%{release} +Provides: php8.4-pecl-zip = %{version}-%{release} +Provides: php8.4-pecl-zip%{?_isa} = %{version}-%{release} +%endif %endif @@ -127,134 +107,123 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS # 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 NTS +cd %{sources} # Sanity check, really often broken -extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php7/php_zip.h) +extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php74/php_zip.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}" -a "x${extver}" != "x%{upstream_version}-%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 fi - cd .. + : Create the configuration file cat >%{ini_name} << 'EOF' ; Enable ZIP extension module extension=%{pecl_name}.so EOF +mkdir NTS %if %{with_zts} -: Duplicate sources tree for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +%if %{with move_to_opt} +export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig +%endif + +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-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS 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 -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -cd NTS +cd %{sources} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check +cd %{sources} OPT="-q --show-diff" %if "%{php_version}" > "8.0" OPT="$OPT %{?_smp_mflags}" %endif -cd NTS : minimal load test of NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/php \ -%{_bindir}/php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__php} \ +%{__php} -n run-tests.php $OPT +%endif %if %{with_zts} -cd ../ZTS : minimal load test of ZTS extension -%{_bindir}/zts-php --no-php-ini \ +%{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : upstream test suite for ZTS extension -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ -%{_bindir}/zts-php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +%{__ztsphp} -n run-tests.php $OPT %endif - - -%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 %files -%{?_licensedir:%license NTS/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -268,6 +237,102 @@ fi %changelog +* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.22.7-1 +- update to 1.22.7 + +* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.22.6-6 +- rebuild for PHP 8.5.0RC1 + +* Thu Sep 18 2025 Remi Collet <remi@remirepo.net> - 1.22.6-4 +- more upstream patches for PHP 8.5 + +* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 1.22.6-3 +- rebuild for 8.5.0alpha3 + +* Tue Jul 1 2025 Remi Collet <remi@remirepo.net> - 1.22.6-2 +- add upstream patch for 8.5 + +* Wed May 7 2025 Remi Collet <remi@remirepo.net> - 1.22.6-1 +- update to 1.22.6 + +* Thu Feb 20 2025 Remi Collet <remi@remirepo.net> - 1.22.5-1.1 +- fix reported version with PHP 7.4 + +* Thu Feb 20 2025 Remi Collet <remi@remirepo.net> - 1.22.5-1 +- update to 1.22.5 +- re-license spec file to CECILL-2.1 + +* Fri Nov 15 2024 Remi Collet <remi@remirepo.net> - 1.22.4-2 +- don't check rpath + +* Thu Sep 26 2024 Remi Collet <remi@remirepo.net> - 1.22.4-1 +- update to 1.22.4 + +* Tue Sep 24 2024 Remi Collet <remi@remirepo.net> - 1.22.3-5 +- rebuild for 8.4.0RC1 + +* Wed Aug 21 2024 Remi Collet <remi@remirepo.net> - 1.22.3-4 +- fix previous patch (for 8.0) + +* Wed Jul 17 2024 Remi Collet <remi@remirepo.net> - 1.22.3-3 +- rebuild for 8.4.0alpha2 + +* Thu Jul 4 2024 Remi Collet <remi@remirepo.net> - 1.22.3-2 +- add upstream patches for PHP 8.4 + +* Tue Nov 14 2023 Remi Collet <remi@remirepo.net> - 1.22.3-1 +- update to 1.22.3 +- build out of sources tree + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.22.2-2 +- rebuild for PHP 8.3.0RC1 + +* Wed Aug 23 2023 Remi Collet <remi@remirepo.net> - 1.22.2-1 +- update to 1.22.2 + +* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.22.1-1 +- update to 1.22.1 + +* Mon Jun 26 2023 Remi Collet <remi@remirepo.net> - 1.22.0-1 +- update to 1.22.0 + +* Mon Jun 5 2023 Remi Collet <remi@remirepo.net> - 1.21.1-2 +- add upstream patches for 8.3 + +* Fri Sep 16 2022 Remi Collet <remi@remirepo.net> - 1.21.1-1 +- update to 1.21.1 + +* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.21.0-5 +- rebuild for PHP 8.2.0RC1 + +* Wed Jul 20 2022 Remi Collet <remi@remirepo.net> - 1.21.0-4 +- add upstream patch for 8.2.0beta1 + +* Wed Jun 29 2022 Remi Collet <remi@remirepo.net> - 1.21.0-3 +- require minimal libzip version +- rebuild using libzip5 on EL-7 + +* 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 + +* Mon Jun 13 2022 Remi Collet <remi@remirepo.net> - 1.20.1-3 +- more upstream patch for PHP 8.2 + +* Wed May 11 2022 Remi Collet <remi@remirepo.net> - 1.20.1-2 +- add upstream patch for PHP 8.2 + +* Mon May 2 2022 Remi Collet <remi@remirepo.net> - 1.20.1-1 +- update to 1.20.1 + +* 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 + * Tue Oct 12 2021 Remi Collet <remi@remirepo.net> - 1.20.0~DEV-2 - test build for 1.20.0-dev |
