From 0e2a4dccbb86a0382a88308f8a165f622f96819c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 23 Jun 2015 07:52:52 +0200 Subject: php-pecl-krb5: allow build against rh-php56 (as more-php56) --- php-pecl-krb5.spec | 59 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/php-pecl-krb5.spec b/php-pecl-krb5.spec index 37ec632..66cb089 100644 --- a/php-pecl-krb5.spec +++ b/php-pecl-krb5.spec @@ -1,4 +1,7 @@ -# spec file for php-pecl-krb5 +# remirepo spec file for php-pecl-krb5 +# With SCL stuff, from Fedora: +# +# Fedora spec file for php-pecl-krb5 # # Copyright (c) 2014-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-krb5} %{!?scl: %global _root_includedir %{_includedir}} %{!?scl: %global _root_bindir %{_bindir}} @@ -23,9 +34,9 @@ %endif Summary: Kerberos authentification extension -Name: %{?scl_prefix}php-pecl-%{pecl_name} +Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.0.0 -Release: 5%{?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;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -40,8 +51,6 @@ BuildRequires: pkgconfig(com_err) BuildRequires: %{?scl_prefix}php-devel > 5.2 BuildRequires: %{?scl_prefix}php-pear -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -53,17 +62,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 @@ -82,6 +95,8 @@ Features: + The administrative interface (KADM5) + Support for HTTP Negotiate authentication via GSSAPI +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. + %package devel Summary: Kerberos extension developer files (header) @@ -172,12 +187,20 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%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 +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -228,6 +251,10 @@ rm -rf %{buildroot} %changelog +* Tue Jun 23 2015 Remi Collet - 1.0.0-6 +- allow build against rh-php56 (as more-php56) +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet - 1.0.0-5.1 - Fedora 21 SCL mass rebuild -- cgit