diff options
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pecl-scrypt.spec | 36 | ||||
-rw-r--r-- | scrypt-tests.patch | 25 |
3 files changed, 22 insertions, 41 deletions
@@ -1,4 +1,4 @@ -Extension [ <persistent> extension #125 scrypt version 1.2 ] { +Extension [ <persistent> extension #145 scrypt version 1.3 ] { - Functions { Function [ <internal:scrypt> function scrypt ] { diff --git a/php-pecl-scrypt.spec b/php-pecl-scrypt.spec index fdfa2a4..bc5e5f0 100644 --- a/php-pecl-scrypt.spec +++ b/php-pecl-scrypt.spec @@ -6,6 +6,14 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%endif + %{?scl: %scl_package php-pecl-scrypt} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} @@ -20,17 +28,14 @@ %endif Summary: Scrypt hashing function -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 1.2 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: 1.3 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# https://github.com/DomBlack/php-scrypt/pull/16 -Patch0: %{pecl_name}-tests.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.2 BuildRequires: %{?scl_prefix}php-pear @@ -79,17 +84,17 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %description A PHP wrapper to Colin Percival's scrypt implementation. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. + %prep %setup -q -c mv %{pecl_name}-%{version} NTS -sed -e '/README/s/role="src"/role="doc"/' \ - -e '/CREDITS/s/role="src"/role="doc"/' \ - -i package.xml +# Don't install/register tests +sed -e 's/role="test"/role="src"/' -i package.xml cd NTS -%patch0 -p1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_SCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_scrypt.h) @@ -148,10 +153,7 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation -for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done +# Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -204,8 +206,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -218,6 +220,10 @@ rm -rf %{buildroot} %changelog +* Sun Aug 09 2015 Remi Collet <remi@fedoraproject.org> - 1.3-1 +- Update to 1.3 +- don't install/register tests + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.2-5.1 - Fedora 21 SCL mass rebuild diff --git a/scrypt-tests.patch b/scrypt-tests.patch deleted file mode 100644 index f52311c..0000000 --- a/scrypt-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2966fb5d0a79dd2df5fdd2a5d60344ae2b711c92 Mon Sep 17 00:00:00 2001 -From: Anatol Belski <ab@php.net> -Date: Sat, 21 Sep 2013 20:05:25 +0200 -Subject: [PATCH] fixed the ini for the test - ---- - tests/vectors.phpt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/vectors.phpt b/tests/vectors.phpt -index 7298700..a2660b8 100644 ---- a/tests/vectors.phpt -+++ b/tests/vectors.phpt -@@ -2,6 +2,8 @@ - Test scrypt KDF using test vectors. - --SKIPIF-- - <?php if (!extension_loaded("scrypt")) print "skip"; ?> -+--INI-- -+memory_limit=2G - --FILE-- - <?php - echo scrypt("", "", 16, 1, 1, 64) . "\n"; --- -1.8.4 - |