diff options
| author | Remi Collet <remi@remirepo.net> | 2026-05-06 11:20:02 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-05-06 11:20:02 +0200 |
| commit | 204ce7747aaced7236aeb1cc6ea99f550b4a2577 (patch) | |
| tree | b6739f50d260392481eb9ea8d6e411e1ac82be69 | |
| parent | d84cfeb5b7ed89a5a963b48e656e6c9188891ba2 (diff) | |
re-license spec file to CECILL-2.1
drop pear/pecl dependency
sources from github
| -rw-r--r-- | PHPINFO | 2 | ||||
| -rw-r--r-- | REFLECTION | 2 | ||||
| -rw-r--r-- | php-pecl-bsdiff.spec | 91 |
3 files changed, 34 insertions, 61 deletions
@@ -2,5 +2,5 @@ bsdiff bsdiff support => enabled -bsdiff version => 0.1.2 +bsdiff version => 0.2.0 BZip2 version => 1.0.8, 13-Jul-2019 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #72 bsdiff version 0.1.2 ] { +Extension [ <persistent> extension #72 bsdiff version 0.2.0 ] { - Functions { Function [ <internal:bsdiff> function bsdiff_diff ] { diff --git a/php-pecl-bsdiff.spec b/php-pecl-bsdiff.spec index 4e2c276..5166378 100644 --- a/php-pecl-bsdiff.spec +++ b/php-pecl-bsdiff.spec @@ -1,8 +1,8 @@ # remirepo spec file for php-pecl-bsdiff # -# Copyright (c) 2022-2023 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2022-2026 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -14,17 +14,21 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name bsdiff %global ini_name 40-%{pecl_name}.ini -#global prever RC2 -%global sources %{pecl_name}-%{version} -%global _configure ../%{sources}/configure +%global _configure ../configure + +# Github forge +%global gh_vend deminy +%global gh_proj php-bsdiff +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} -Summary: The bsdiff extension for PHP Name: %{?scl_prefix}php-pecl-bsdiff -Version: 0.1.2 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP-3.01 -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}%{?prever}.tgz +Summary: The bsdiff extension for PHP +Version: 0.2.0 +Release: 1%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -49,21 +53,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -q -c - -# Don't install/register tests -sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ - -i package.xml +%forgesetup -cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_BSDIFF_VERSION/{s/.* "//;s/".*$//;p}' php_bsdiff.h) if test "x${extver}" != "x%{version}%{?prever}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi -cd .. mkdir NTS %if %{with_zts} @@ -80,70 +77,41 @@ EOF %build %{?dtsenable} -cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL -cd ../NTS +cd NTS %configure \ --enable-bsdiff \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS %configure \ --enable-bsdiff \ --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file 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 -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done - - -%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 - %check -cd %{sources} - : Minimal load test for NTS extension %{__php} -n \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -151,7 +119,7 @@ cd %{sources} %if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -P -q --show-diff %endif @@ -165,10 +133,9 @@ REPORT_EXIT_STATUS=1 \ %files -%doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license %{sources}/LICENSE} +%license LICENSE +%doc *.md -%{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -179,6 +146,12 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed May 6 2026 Remi Collet <remi@remirepo.net> - 0.2.0-1 +- update to 0.2.0 +- re-license spec file to CECILL-2.1 +- drop pear/pecl dependency +- sources from github + * Thu Aug 31 2023 Remi Collet <remi@remirepo.net> - 0.1.2-2 - build out of sources tree |
