summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-19 19:21:27 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-19 19:21:27 +0200
commitac63c7b60352b5df6efce3508c4566b7b12d9e54 (patch)
tree480a6a0521011806483242e58901b800f008874f
parent63ce7a76198128aec68ab869d100eaa7eddfb568 (diff)
php-pecl-igbinary: allow build against "rh-php56" (for more-php56)
-rw-r--r--php-pecl-igbinary.spec40
1 files changed, 30 insertions, 10 deletions
diff --git a/php-pecl-igbinary.spec b/php-pecl-igbinary.spec
index d4d56f4..0110c82 100644
--- a/php-pecl-igbinary.spec
+++ b/php-pecl-igbinary.spec
@@ -1,4 +1,7 @@
-# spec file for php-pecl-igbinary
+# remirepo spec file for php-pecl-igbinary
+# with SCL stuff, from:
+#
+# Fedora spec file for php-pecl-igbinary
#
# Copyright (c) 2010-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-igbinary}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
@@ -23,13 +34,13 @@
%endif
Summary: Replacement for the standard PHP serializer
-Name: %{?scl_prefix}php-pecl-igbinary
+Name: %{?sub_prefix}php-pecl-igbinary
Version: 1.2.1
%if 0%{?short:1}
Release: 0.11.git%{short}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: https://github.com/%{extname}/%{extname}/archive/%{commit}/%{extname}-%{version}-%{short}.tar.gz
%else
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: http://pecl.php.net/get/%{extname}-%{version}.tgz
%endif
License: BSD
@@ -40,11 +51,8 @@ URL: http://pecl.php.net/package/igbinary
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-devel >= 5.2.0
-# php-pecl-apcu-devel provides php-pecl-apc-devel
-BuildRequires: %{?scl_prefix}php-pecl-apc-devel >= 3.1.7
+BuildRequires: %{?sub_prefix}php-pecl-apcu-devel
-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}}
@@ -222,12 +230,20 @@ REPORT_EXIT_STATUS=1 \
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
+if [ $1 -eq 0 -a -x %{__pecl} ] ; then
%{pecl_uninstall} %{extname} >/dev/null || :
fi
@@ -257,6 +273,10 @@ fi
%changelog
+* Fri Jun 19 2015 Remi Collet <remi@fedoraproject.org> - 1.2.1-2
+- allow build against rh-php56 (as more-php56)
+- drop runtime dependency on pear, new scriptlets
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.2.1-1.1
- Fedora 21 SCL mass rebuild