summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-24 11:20:06 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-24 11:20:06 +0200
commit7c5993606611ef7859fda8982ddd21d0e83e3c70 (patch)
treee6a9e4580f90cef51b062cc7bcd0bcfc1c010ef2
parent7ca894ff6fc2ff8fe04d45dc2dc909e622a9bf46 (diff)
php-pecl-yar: rebuild for "rh-php56"
-rw-r--r--php-pecl-yar.spec34
1 files changed, 27 insertions, 7 deletions
diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec
index b042f1f..c93137b 100644
--- a/php-pecl-yar.spec
+++ b/php-pecl-yar.spec
@@ -6,6 +6,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-yar}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
@@ -22,9 +30,9 @@
%endif
Summary: Light, concurrent RPC framework
-Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.2.4
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 2%{?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}
@@ -34,7 +42,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: curl-devel
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
-BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
+BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
@@ -83,7 +91,7 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
Yar (Yet another RPC framework) is a light, concurrent RPC framework,
supports multi package protocols (json, msgpack).
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}.
%prep
@@ -181,12 +189,20 @@ do install -Dpm 644 $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
@@ -230,6 +246,10 @@ rm -rf %{buildroot}
%changelog
+* Wed Jun 24 2015 Remi Collet <remi@fedoraproject.org> - 1.2.4-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.4-1.1
- Fedora 21 SCL mass rebuild