summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION4
-rw-r--r--php-xz.spec67
3 files changed, 32 insertions, 42 deletions
diff --git a/PHPINFO b/PHPINFO
index b1d033f..cf6cf06 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,7 +3,8 @@ xz
xz support => enabled
xz extension version => 1.1.2
-liblzma version => 5.2.5
+liblzma headers version => 5.2.5
+liblzma library version => 5.4.1
Directive => Local Value => Master Value
xz.compression_level => 5 => 5
diff --git a/REFLECTION b/REFLECTION
index a689ff4..71982c4 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -21,7 +21,7 @@ Extension [ <persistent> extension #108 xz version 1.1.2 ] {
- Parameters [3] {
Parameter #0 [ <required> $filename ]
Parameter #1 [ <required> $mode ]
- Parameter #2 [ <optional> $compression_level ]
+ Parameter #2 [ <optional> $compression_level = <default> ]
}
}
Function [ <internal:xz> function xzencode ] {
@@ -42,7 +42,7 @@ Extension [ <persistent> extension #108 xz version 1.1.2 ] {
- Parameters [3] {
Parameter #0 [ <required> $fp ]
Parameter #1 [ <required> $str ]
- Parameter #2 [ <optional> $length ]
+ Parameter #2 [ <optional> $length = <default> ]
}
}
Function [ <internal:xz> function xzclose ] {
diff --git a/php-xz.spec b/php-xz.spec
index 9bc26d8..0de509b 100644
--- a/php-xz.spec
+++ b/php-xz.spec
@@ -1,20 +1,15 @@
# remirepo spec file for php-xz
#
-# Copyright (c) 2021 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2021-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
+%{?scl:%scl_package php-xz}
-%if 0%{?scl:1}
-%scl_package php-xz
-%else
-%global pkg_name %{name}
-%endif
+%bcond_without tests
%global gh_commit be72e636dd7dd8a220cb9b54f2970477dad878a0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
@@ -23,12 +18,14 @@
%global pecl_name xz
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
+%global sources %{gh_project}-%{gh_commit}
+%global _configure ../%{sources}/configure
Summary: XZ (LZMA2) compression/decompression
Name: %{?scl_prefix}php-%{pecl_name}
Version: 1.1.2
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
@@ -41,21 +38,6 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-%{pecl_name} <= %{version}
-%endif
-%endif
-
%description
PHP Extension providing XZ (LZMA2) compression/decompression functions.
@@ -65,9 +47,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{gh_project}-%{gh_commit} NTS
-cd NTS
+cd %{sources}
mv LICENSE.txt LICENSE
# Sanity check, really often broken
@@ -78,9 +59,9 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Drop in the bit of configuration
@@ -97,19 +78,20 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config \
+ --with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \
--with-xz
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__ztsphpconfig} \
--with-libdir=%{_lib} \
--with-xz
make %{?_smp_mflags}
@@ -132,37 +114,41 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
%{__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_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q -x --offline --show-diff
+%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__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_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q -x --offline --show-diff
%endif
+%endif
%files
%{!?_licensedir:%global license %%doc}
-%license NTS/LICENSE
-%doc NTS/README.md
+%license %{sources}/LICENSE
+%doc %{sources}/README.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -174,6 +160,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.1.2-3
+- build out of sources tree
+
* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.1.2-2
- rebuild for 8.1.0RC1