summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-20 18:22:08 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-20 18:22:08 +0200
commit0387927218015fd52d7b4f43143938e90bc264f0 (patch)
tree1010119922b50711f1afc9b3e3c9cf2353f5256e
parentab04b845ff9772a87edd03e66407ada779923386 (diff)
php-pecl-cairo allow build against "rh-php56" (for more-php56)
-rw-r--r--php-pecl-cairo.spec62
1 files changed, 44 insertions, 18 deletions
diff --git a/php-pecl-cairo.spec b/php-pecl-cairo.spec
index 787fa68..5068ccb 100644
--- a/php-pecl-cairo.spec
+++ b/php-pecl-cairo.spec
@@ -1,4 +1,4 @@
-# spec file for php-pecl-cairo
+# remirepo spec file for php-pecl-cairo
#
# Copyright (c) 2012-2015 Remi Collet
# License: CC-BY-SA
@@ -6,6 +6,13 @@
#
# 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-cairo}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
@@ -25,9 +32,9 @@
%global ini_name 40-%{pecl_name}.ini
%endif
-Name: %{?scl_prefix}php-pecl-cairo
+Name: %{?sub_prefix}php-pecl-cairo
Version: 0.3.2
-Release: 9%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 10%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Summary: Cairo Graphics Library Extension
Group: Development/Languages
License: PHP
@@ -45,8 +52,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}
@@ -56,17 +61,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 +91,8 @@ Cairo is a 2D graphics library with support for multiple output devices.
Currently supported output targets include the X Window System, Quartz,
Win32, image buffers, PostScript, PDF, and SVG file output.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}.
+
%package devel
Summary: Cairo Graphics Library Extension developer files
Group: Development/Libraries
@@ -196,22 +207,32 @@ NO_INTERACTION=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
- %{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,-)
%doc %{pecl_docdir}/%{proj_name}
+%{pecl_xmldir}/%{name}.xml
+
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%{pecl_xmldir}/%{name}.xml
+
%if %{with_zts}
%{php_ztsextdir}/%{pecl_name}.so
%config(noreplace) %{php_ztsinidir}/%{ini_name}
@@ -225,7 +246,12 @@ fi
%{php_ztsincldir}/ext/%{pecl_name}
%endif
+
%changelog
+* Sat Jun 20 2015 Remi Collet <remi@fedoraproject.org> - 0.3.2-10
+- 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.3.2-9.1
- Fedora 21 SCL mass rebuild