diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-03-08 13:51:12 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-03-08 13:51:12 +0100 |
commit | c4b1d2aa15c5f8bcaae313a26a4b5251dd3fc278 (patch) | |
tree | fad6832245ba7a27af3c013d0444016961d94667 | |
parent | 539e5fc776a79463644b46776e5d09b25701c24a (diff) |
php-pecl-hidef: F24
-rw-r--r-- | php-pecl-hidef.spec | 66 |
1 files changed, 41 insertions, 25 deletions
diff --git a/php-pecl-hidef.spec b/php-pecl-hidef.spec index ff20ae1..f49b844 100644 --- a/php-pecl-hidef.spec +++ b/php-pecl-hidef.spec @@ -7,9 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-hidef} -%{!?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 hidef @@ -22,7 +19,7 @@ Summary: Constants for real Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.1.13 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -37,17 +34,17 @@ BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear 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: %{?scl_prefix}php-spl%{?_isa} %{?_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 "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -82,6 +79,11 @@ of the usual performance penalties. %setup -q -c mv %{pecl_name}-%{version} NTS +# 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 %{SOURCE1} LICENSE @@ -162,24 +164,12 @@ sed -e 's:@INIDIR@:%{php_ztsinidir}:' %{ini_name} \ >%{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation +# Documentation cd NTS -for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done -for i in LICENSE $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done - - -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : - - -%postun -if [ $1 -eq 0 ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi +%{!?_licensedir:install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE} %check @@ -218,14 +208,34 @@ REPORT_EXIT_STATUS=1 \ %endif +%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 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + + %clean 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 %dir %{php_inidir}/%{pecl_name} @@ -240,6 +250,12 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 0.1.13-6 +- 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.1.13-5.1 - Fedora 21 SCL mass rebuild |