diff options
Diffstat (limited to 'php-pecl-weakref.spec')
-rw-r--r-- | php-pecl-weakref.spec | 102 |
1 files changed, 84 insertions, 18 deletions
diff --git a/php-pecl-weakref.spec b/php-pecl-weakref.spec index 16ff932..4ba7f9c 100644 --- a/php-pecl-weakref.spec +++ b/php-pecl-weakref.spec @@ -6,32 +6,38 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-judy} - -%global with_zts 0%{?__ztsphp:1} +%{?scl: %scl_package php-pecl-weakref} + +%global gh_commit faa99eef4c7333ec563e7c22afa152753d1bf3d5 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner colder +%global gh_project php-weakref +#global gh_date 20160111 +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global with_tests 0%{!?_without_tests:1} %global pecl_name Weakref %global ext_name weakref #global versuf -beta -%if "%{php_version}" < "5.6" -%global ini_name %{ext_name}.ini -%else %global ini_name 40-%{ext_name}.ini -%endif Summary: Implementation of weak references Name: %{?scl_prefix}php-pecl-weakref -Version: 0.2.6 +Version: 0.3.3 +%if 0%{?gh_date} +Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz +%else Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +%endif License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel < 7 +BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear -BuildRequires: Judy-devel -BuildRequires: pcre-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -50,13 +56,19 @@ Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} Obsoletes: php54-pecl-%{pecl_name} <= %{version} Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" Obsoletes: php55u-pecl-%{pecl_name} <= %{version} Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-pecl-%{pecl_name} <= %{version} +Obsoletes: php71w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.2" +Obsoletes: php72u-pecl-%{pecl_name} <= %{version} +Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -76,12 +88,19 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c +%if 0%{?gh_date} +mv %{gh_project}-%{gh_commit} NTS +mv NTS/package.xml . +%else mv %{pecl_name}-%{version} NTS +%endif -%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml cd NTS - # Sanity check, really often broken extver=$(sed -n '/#define PHP_WEAKREF_VERSION/{s/.* "//;s/".*$//;p}' php_weakref.h) if test "x${extver}" != "x%{version}%{?versuf}"; then @@ -166,16 +185,40 @@ fi %check +cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{ext_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}/%{ext_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php --show-diff +%else +: Upstream test suite disabled +%endif + %if %{with_zts} +cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{ext_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}/%{ext_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__ztsphp} -n run-tests.php --show-diff +%else +: Upstream test suite disabled +%endif %endif @@ -199,10 +242,32 @@ rm -rf %{buildroot} %changelog -* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 0.2.6-2 +* Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 0.3.3-2 +- rebuild for PHP 7.2.0beta1 new API + +* Tue Dec 13 2016 Remi Collet <remi@fedoraproject.org> - 0.3.3-1 +- update to 0.3.3 + +* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 0.3.2-4 +- rebuild with PHP 7.1.0 GA + +* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 0.3.2-3 +- rebuild for PHP 7.1 new API version + +* Sun Mar 6 2016 Remi Collet <remi@fedoraproject.org> - 0.3.2-2 - adapt for F24 - drop runtime dependency on pear, new scriptlets +* Sun Jan 24 2016 Remi Collet <remi@fedoraproject.org> - 0.3.2-1 +- update to 0.3.2 + +* Mon Jan 11 2016 Remi Collet <remi@fedoraproject.org> - 0.3.1-1 +- update to 0.3.1 +- run test suite during the build +- include patch to prevent segfault + open https://github.com/colder/php-weakref/pull/22 +- use generated tarball from master + pr22 to include tests + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.2.6-1.1 - Fedora 21 SCL mass rebuild @@ -222,3 +287,4 @@ rm -rf %{buildroot} - initial package, version 0.2.3 (beta) - open https://github.com/colder/php-weakref/issues/11 License - open https://github.com/colder/php-weakref/issues/12 Version + |