diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-03-23 16:24:00 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-03-23 16:24:00 +0100 |
commit | 2eb16f0c7eafc04c1fe71e43668eb83d9e17c7b5 (patch) | |
tree | c1bfefb67db943490c0484c986916ff44bae07c3 /php-pecl-pthreads.spec | |
parent | 32a217370e47720508922c97bd860d6f20553a62 (diff) |
3.1.7-dev
Diffstat (limited to 'php-pecl-pthreads.spec')
-rw-r--r-- | php-pecl-pthreads.spec | 78 |
1 files changed, 59 insertions, 19 deletions
diff --git a/php-pecl-pthreads.spec b/php-pecl-pthreads.spec index d95c72d..d048ba2 100644 --- a/php-pecl-pthreads.spec +++ b/php-pecl-pthreads.spec @@ -8,17 +8,28 @@ # %{?scl: %scl_package php-pecl-pthreads} -%global pecl_name pthreads -%global ini_name 40-%{pecl_name}.ini +%global pecl_name pthreads +%global ini_name 40-%{pecl_name}.ini +# https://github.com/krakjoe/pthreads/commits/master +%global gh_commit 959ab0ff5fbd59d29a9d77f0309065cdfe62531f +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_date 20161111 +%global gh_owner krakjoe +%global gh_project pthreads Summary: Threading API Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 3.1.6 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 3.1.7 +%if 0%{?gh_date:1} +Release: 0.4.%{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}%{!?scl:%{!?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-zts-devel > 7 @@ -28,12 +39,14 @@ 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-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +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} -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%if "%{?scl_prefix}" != "%{?sub_prefix}" +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff @@ -47,6 +60,10 @@ 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 %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -68,18 +85,30 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c +%if 0%{?gh_date:1} +mv %{gh_project}-%{gh_commit} ZTS +%{__php} -r ' + $pkg = simplexml_load_file("ZTS/package.xml"); + $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2); + $pkg->version->release = "%{version}dev"; + $pkg->stability->release = "devel"; + $pkg->asXML("package.xml"); +' +%else +mv %{pecl_name}-%{version} ZTS +%endif # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd %{pecl_name}-%{version} +cd ZTS # Sanity check, really often broken extver=$(sed -n '/#define PHP_PTHREADS_VERSION/{s/.* "//;s/".*$//;p}' php_pthreads.h) -if test "x${extver}" != "x%{version}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}. +if test "x${extver}" != "x%{version}%{?gh_date:dev}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:dev}. exit 1 fi cd .. @@ -92,7 +121,7 @@ EOF %build -cd %{pecl_name}-%{version} +cd ZTS %{_bindir}/zts-phpize %configure \ --with-php-config=%{_bindir}/zts-php-config @@ -102,8 +131,7 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} -make -C %{pecl_name}-%{version} \ - install INSTALL_ROOT=%{buildroot} +make -C ZTS install INSTALL_ROOT=%{buildroot} # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} @@ -112,7 +140,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Documentation -cd %{pecl_name}-%{version} +cd ZTS for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do sed -e 's/\r//' -i $i install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i @@ -140,7 +168,7 @@ fi %check -cd %{pecl_name}-%{version} +cd ZTS %ifnarch x86_64 rm tests/trait-alias-bug.phpt %endif @@ -164,7 +192,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{?_licensedir:%license %{pecl_name}-%{version}/LICENSE} +%{?_licensedir:%license ZTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -173,6 +201,18 @@ rm -rf %{buildroot} %changelog +* Mon Dec 5 2016 Remi Collet <remi@fedoraproject.org> - 3.1.7-0.4.20161111git959ab0f +- refresh with a newer snapshot + +* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 3.1.7-0.3.20160529gitd814b0c +- rebuild with PHP 7.1.0 GA + +* Thu Sep 15 2016 Remi Collet <remi@fedoraproject.org> - 3.1.7-0.2.20160529gitd814b0c +- rebuild for PHP 7.1 new API version + +* Sat Jul 23 2016 Remi Collet <remi@fedoraproject.org> - 3.1.7-0.1.20160529gitd814b0c +- update to 3.1.7dev for PHP 7.1 + * Sat Feb 13 2016 Remi Collet <remi@fedoraproject.org> - 3.1.6-1 - Update to 3.1.6 (stable) |