diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-11-28 16:38:15 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-11-28 16:38:15 +0100 |
commit | 7b440ebfa764cba28a5bdd76cf27d481192a4d45 (patch) | |
tree | c0b23f95a9d96611b39b2ae73c4ca31c255eebd4 /php-ast.spec | |
parent | a34699a9ee494af76147a0836e35e5bf5c7cbd14 (diff) |
php-ast: package approved, switch the spec
Diffstat (limited to 'php-ast.spec')
-rw-r--r-- | php-ast.spec | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/php-ast.spec b/php-ast.spec index 2fb9585..95336da 100644 --- a/php-ast.spec +++ b/php-ast.spec @@ -1,6 +1,3 @@ -# Fedora spec file for php-ast -# Without SCL compatibility stuff, from: -# # remirepo spec file for php-ast # # Copyright (c) 2015-2016 Remi Collet @@ -9,19 +6,26 @@ # # Please, preserve the changelog entries # +%{?scl: %scl_package php-ast} + %global gh_commit abfef40846cb5454dafa1808769fde851ba8dd70 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner nikic %global gh_project php-ast +#global gh_date 20160608 %global pecl_name ast %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} # After 20-tokenizer.ini %global ini_name 40-%{pecl_name}.ini Summary: Abstract Syntax Tree -Name: php-ast +Name: %{?scl_prefix}php-ast Version: 0.1.2 -Release: 2%{?dist} +%if 0%{?gh_date:1} +Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +%else +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +%endif License: BSD Group: Development/Languages URL: https://github.com/%{gh_owner}/%{gh_project} @@ -29,17 +33,35 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit} Patch0: %{gh_project}-upstream.patch -BuildRequires: php-devel > 7 -BuildRequires: php-tokenizer +BuildRequires: %{?scl_prefix}php-devel > 7 +BuildRequires: %{?scl_prefix}php-tokenizer + +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?scl_prefix}php-tokenizer%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} +Obsoletes: php70u-%{pecl_name} <= %{version} +Obsoletes: php70w-%{pecl_name} <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-%{pecl_name} <= %{version} +Obsoletes: php71w-%{pecl_name} <= %{version} +%endif +%endif -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: php-tokenizer%{?_isa} +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter shared private +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif %description This extension exposes the abstract syntax tree generated by PHP 7. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + %prep %setup -qc @@ -130,6 +152,7 @@ REPORT_EXIT_STATUS=1 \ %files +%{!?_licensedir:%global license %%doc} %license NTS/LICENSE %doc NTS/README.md %doc NTS/ast_stub.php @@ -146,13 +169,10 @@ REPORT_EXIT_STATUS=1 \ %changelog -* Fri Nov 25 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-2 +* Fri Nov 25 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-3 - fix LICENSE, drop empty file, from review #1398355 - add upstream patch for php 7.1 -* Thu Nov 24 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-1 -- drop SCL stuff for Fedora review - * Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-2 - rebuild for PHP 7.1 new API version |