diff options
Diffstat (limited to 'php-xz.spec')
-rw-r--r-- | php-xz.spec | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/php-xz.spec b/php-xz.spec index 0de509b..06b972c 100644 --- a/php-xz.spec +++ b/php-xz.spec @@ -1,8 +1,8 @@ # remirepo spec file for php-xz # -# Copyright (c) 2021-2023 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2021-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -11,23 +11,30 @@ %bcond_without tests -%global gh_commit be72e636dd7dd8a220cb9b54f2970477dad878a0 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +# Forge +#global gh_commit be72e636dd7dd8a220cb9b54f2970477dad878a0 %global gh_owner codemasher %global gh_project php-ext-xz +%global forgeurl https://github.com/%{gh_owner}/%{gh_project} +%global tag %{version} +# PIE +%global pie_vend codemasher +%global pie_proj php-ext-xz +# Extension %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 sources %{gh_project}-%{version} %global _configure ../%{sources}/configure Summary: XZ (LZMA2) compression/decompression Name: %{?scl_prefix}php-%{pecl_name} -Version: 1.1.2 -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.1.3 +%forgemeta +Release: 1%{?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 +URL: %{forgeurl} +Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -36,7 +43,9 @@ BuildRequires: pkgconfig(liblzma) 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-pie(%{pie_vend}/%{pie_proj}) = %{version} +Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} %description @@ -49,7 +58,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %setup -qc cd %{sources} -mv LICENSE.txt LICENSE + +sed -e '/PHP_XZ_VERSION/s/1.1.2/%{version}/' -i php_xz.h # Sanity check, really often broken extver=$(sed -n '/#define PHP_XZ_VERSION/{s/.* "//;s/".*$//;p}' php_xz.h) @@ -80,13 +90,16 @@ EOF 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-php-config=%{__phpconfig} \ --with-libdir=%{_lib} \ --with-xz -make %{?_smp_mflags} + +%make_build %if %{with_zts} cd ../ZTS @@ -94,7 +107,8 @@ cd ../ZTS --with-php-config=%{__ztsphpconfig} \ --with-libdir=%{_lib} \ --with-xz -make %{?_smp_mflags} + +%make_build %endif @@ -102,17 +116,16 @@ make %{?_smp_mflags} %{?dtsenable} # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %if %{with_zts} # Install the ZTS stuff -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif - %check cd %{sources} @@ -134,21 +147,13 @@ REPORT_EXIT_STATUS=1 \ %{__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 %{sources}/LICENSE %doc %{sources}/README.md +%doc %{sources}/composer.json %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -160,6 +165,13 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Sat Sep 13 2025 Remi Collet <remi@remirepo.net> - 1.1.3-1 +- update to 1.1.3 +- re-license spec file to CECILL-2.1 +- add pie virtual provides +- open https://github.com/codemasher/php-ext-xz/pull/12 fix ext version +- open https://github.com/codemasher/php-ext-xz/pull/11 fix license version + * Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.1.2-3 - build out of sources tree |