diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-03-08 16:35:06 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-03-08 16:35:06 +0100 |
commit | a3004a5e27c77c8c4a5b0ab8cb6629018e7d872e (patch) | |
tree | d965f0bfe84218bd8c024356136fba92d1f33272 | |
parent | 46eff2e9da00aa30aa8070bf03de6c92cf201f24 (diff) |
php-pecl-spl-types: F24
-rw-r--r-- | php-pecl-spl-types.spec | 74 |
1 files changed, 46 insertions, 28 deletions
diff --git a/php-pecl-spl-types.spec b/php-pecl-spl-types.spec index a99dde8..0f9bf4f 100644 --- a/php-pecl-spl-types.spec +++ b/php-pecl-spl-types.spec @@ -7,9 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-spl-types} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name SPL_Types @@ -23,7 +20,7 @@ Summary: Standard PHP Library, Types Addon Name: %{?scl_prefix}php-pecl-spl-types Version: 0.4.0 -Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 7%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -39,35 +36,34 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-spl BuildRequires: pcre-devel -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: php-spl%{?_isa} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} -Provides: %{?scl_prefix}php-%{ext_name} = %{version} -Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-%{ext_name} = %{version} +Provides: %{?scl_prefix}php-%{ext_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-spl-types = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-spl-types%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Package have been renamed Obsoletes: php-pecl-SPL-Types < 0.4.0-2 -Provides: php-pecl-SPL-Types = %{version}-%{release} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} +Obsoletes: php53-pecl-spl-types <= %{version} +Obsoletes: php53u-pecl-spl-types <= %{version} +Obsoletes: php54-pecl-spl-types <= %{version} +Obsoletes: php54w-pecl-spl-types <= %{version} %if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} +Obsoletes: php55u-pecl-spl-types <= %{version} +Obsoletes: php55w-pecl-spl-types <= %{version} %endif %if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +Obsoletes: php56u-pecl-spl-types <= %{version} +Obsoletes: php56w-pecl-spl-types <= %{version} %endif %endif @@ -82,13 +78,20 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %description SPL Types is a collection of special type handling classes. +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 -q -c mv %{pecl_name}-%{version} NTS -cp -p %{SOURCE1} LICENSE + +# 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 +cp -p %{SOURCE1} LICENSE #http://svn.php.net/viewvc?view=revision&revision=331720 find . -type f -exec chmod -x {} \; @@ -150,23 +153,31 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation -install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE -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 +%{!?_licensedir:install -Dpm 644 NTS/LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE} -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +%if 0%{?fedora} < 24 +# 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 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi +%endif %check @@ -206,9 +217,10 @@ 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} %{php_extdir}/%{ext_name}.so @@ -219,6 +231,12 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 0.4.0-7 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets +- fix license management +- don't install/register tests + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.4.0-6.1 - Fedora 21 SCL mass rebuild |