diff options
| author | Remi Collet <remi@remirepo.net> | 2026-07-21 11:26:53 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-07-21 11:26:53 +0200 |
| commit | 3644a75359129eb29f42291c09ba0745d3759c76 (patch) | |
| tree | ce55f689063df27e0f26cd529b6bdb2528accb38 /php-pecl-scrypt.spec | |
| parent | 05be9940e0f64067f0e627fdc789409077975d84 (diff) | |
re-license spec file to CECILL-2.1
add pie virtual provides
drop pear/pecl dependency
sources from github
fix build with PHP 8.6.0alpha2 using patch from
https://github.com/DomBlack/php-scrypt/pull/79
Diffstat (limited to 'php-pecl-scrypt.spec')
| -rw-r--r-- | php-pecl-scrypt.spec | 127 |
1 files changed, 54 insertions, 73 deletions
diff --git a/php-pecl-scrypt.spec b/php-pecl-scrypt.spec index adbb3f2..bd02580 100644 --- a/php-pecl-scrypt.spec +++ b/php-pecl-scrypt.spec @@ -1,8 +1,8 @@ # remirepo spec file for php-pecl-scrypt # -# Copyright (c) 2013-2023 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2013-2026 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -13,31 +13,44 @@ %global pecl_name scrypt %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%global sources %{pecl_name}-%{version} -%global _configure ../%{sources}/configure +%global _configure ../configure +%global pie_vend woohoolabs +%global pie_proj php-scrypt +%global gh_vend DomBlack +%global gh_proj php-scrypt +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag %{version} -Summary: Scrypt hashing function Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 2.0.1 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Summary: Scrypt hashing function License: BSD-2-Clause -Group: Development/Languages -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}.tgz +Version: 2.0.1 +Release: 3%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} + +Patch0: 79.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 -BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +%if "%{php_version}" < "8.6" Requires: %{?scl_prefix}php-hash%{?_isa} +%endif -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# Extension +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +# 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} +Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} %description @@ -47,21 +60,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -q -c +%forgesetup +%patch -P0 -p1 -# Don't install/register tests -sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ - -i package.xml - -cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_SCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_scrypt.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}. exit 1 fi -cd .. mkdir NTS %if %{with_zts} @@ -78,15 +85,16 @@ 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 \ --with-libdir=%{_lib} \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS @@ -94,65 +102,36 @@ cd ../ZTS --with-libdir=%{_lib} \ --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} --no-php-ini \ - --define extension=../NTS/modules/%{pecl_name}.so \ + --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=$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 -q --show-diff %endif @@ -161,23 +140,17 @@ REPORT_EXIT_STATUS=1 \ %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ - --define extension=../ZTS/modules/%{pecl_name}.so \ + --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=$PWD/../ZTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php -q --show-diff -%endif %endif %files -%{?_licensedir:%license %{sources}/LICENSE} -%doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%license LICENSE +#doc composer.json +%doc *.md +%doc CREDITS +%doc scrypt.php %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -189,6 +162,14 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Tue Jul 21 2026 Remi Collet <remi@remirepo.net> - 2.0.1-3 +- re-license spec file to CECILL-2.1 +- add pie virtual provides +- drop pear/pecl dependency +- sources from github +- fix build with PHP 8.6.0alpha2 using patch from + https://github.com/DomBlack/php-scrypt/pull/79 + * Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 2.0.1-2 - build out of sources tree |
