diff options
-rw-r--r-- | php-pecl-xhprof.spec | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/php-pecl-xhprof.spec b/php-pecl-xhprof.spec index 9ab1d2e..5c9ea09 100644 --- a/php-pecl-xhprof.spec +++ b/php-pecl-xhprof.spec @@ -1,4 +1,7 @@ -# spec file for php-pecl-xhprof +# remirepo spec file for php-pecl-xhprof +# with SCL compatibility +# +# Fedora spec file for php-pecl-xhprof # # Copyright (c) 2012-2015 Remi Collet # License: CC-BY-SA @@ -6,6 +9,14 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%endif + %{?scl: %scl_package php-pecl-xhprof} %{!?scl: %global _root_bindir %{_bindir}} %{!?scl: %global _root_sysconfdir %{_sysconfdir}} @@ -21,9 +32,9 @@ %global ini_name 40-%{pecl_name}.ini %endif -Name: %{?scl_prefix}php-pecl-xhprof +Name: %{?sub_prefix}php-pecl-xhprof Version: 0.9.4 -Release: 5%{?gitver:.git%{gitver}}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP extension for XHProf, a Hierarchical Profiler Group: Development/Languages @@ -40,8 +51,6 @@ BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -Requires(post): %{__pecl} -Requires(postun): %{__pecl} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} @@ -51,17 +60,21 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} -Obsoletes: php53u-pecl-%{pecl_name} -Obsoletes: php54-pecl-%{pecl_name} -Obsoletes: php54w-pecl-%{pecl_name} +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} -Obsoletes: php55w-pecl-%{pecl_name} +Obsoletes: php55u-pecl-%{pecl_name} <= %{version} +Obsoletes: php55w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} -Obsoletes: php56w-pecl-%{pecl_name} +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} +Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -80,8 +93,10 @@ implemented in C (as a PHP extension). The HTML based navigational interface is provided in the "xhprof" package. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. + -%package -n %{?scl_prefix}xhprof +%package -n %{?sub_prefix}xhprof Summary: A Hierarchical Profiler for PHP - Web interface Group: Development/Tools %if 0%{?fedora} > 11 || 0%{?rhel} > 5 @@ -89,10 +104,10 @@ BuildArch: noarch %endif Requires: %{name} = %{version}-%{release} -Requires: %{?scl_prefix}php >= 5.2.0 +Requires: %{?scl_prefix}mod_php >= 5.2.0 Requires: %{_root_bindir}/dot -%description -n %{?scl_prefix}xhprof +%description -n %{?sub_prefix}xhprof XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based navigational interface. @@ -222,18 +237,27 @@ done rm -rf %{buildroot} -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# 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 - %{pecl_uninstall} %{pecl_name} >/dev/null || : +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : fi %files %defattr(-,root,root,-) +%{?_licensedir:%license %{pecl_name}-%{version}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %exclude %{pecl_docdir}/%{pecl_name}/examples %exclude %{pecl_docdir}/%{pecl_name}/xhprof_html @@ -248,7 +272,7 @@ fi %endif -%files -n %{?scl_prefix}xhprof +%files -n %{?sub_prefix}xhprof %defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name}/examples %doc %{pecl_docdir}/%{pecl_name}/xhprof_html @@ -258,6 +282,10 @@ fi %changelog +* Tue Jun 23 2015 Remi Collet <remi@fedoraproject.org> - 0.9.4-6 +- allow build against rh-php56 (as more-php56) +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.9.4-5.1 - Fedora 21 SCL mass rebuild |