From 550527031eabea15edda7d42e2587e8ae1955213 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 28 Mar 2015 08:29:51 +0100 Subject: php-pecl-uuid: add fix for PHP 7 --- php-pecl-uuid.spec | 54 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'php-pecl-uuid.spec') diff --git a/php-pecl-uuid.spec b/php-pecl-uuid.spec index 4b7f3e2..a85f9c9 100644 --- a/php-pecl-uuid.spec +++ b/php-pecl-uuid.spec @@ -22,7 +22,7 @@ Summary: Universally Unique Identifier extension for PHP Name: %{?scl_prefix}php-pecl-uuid Version: 1.0.3 -Release: 10%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 11%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: LGPLv2+ Group: Development/Languages URL: http://pecl.php.net/package/uuid @@ -38,16 +38,18 @@ Patch0: %{pecl_name}-ereg.patch # Fix build warnings Patch1: %{pecl_name}-build.patch # http://svn.php.net/viewvc?view=revision&revision=328261 +# http://svn.php.net/viewvc?view=revision&revision=336226 # Improves phpinfo() output Patch2: %{pecl_name}-info.patch +# http://svn.php.net/viewvc?view=revision&revision=336225 +# http://svn.php.net/viewvc?view=revision&revision=336227 +Patch3: %{pecl_name}-php7.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear BuildRequires: libuuid-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}} @@ -62,17 +64,17 @@ 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 %endif @@ -90,6 +92,9 @@ A wrapper around Universally Unique Identifier library (libuuid). %prep %setup -q -c +# Don't install/register tests +sed -e 's/role="test"/role="src"/' -i package.xml + mv %{pecl_name}-%{version} NTS cd NTS cp %{SOURCE1} LICENSE @@ -97,6 +102,7 @@ cp %{SOURCE1} LICENSE %patch0 -p3 -b .ereg %patch1 -p3 -b .build %patch2 -p3 -b .info +%patch3 -p3 -b .php7 # Sanity check, really often broken extver=$(sed -n '/#define PHP_UUID_VERSION/{s/.* "//;s/".*$//;p}' php_uuid.h) @@ -149,11 +155,8 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Install the package XML file install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml -# Test & Documentation +# Documentation cd NTS -for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done for i in LICENSE $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -179,12 +182,20 @@ REPORT_EXIT_STATUS=1 \ %endif -%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 @@ -195,8 +206,8 @@ rm -rf %{buildroot} %files %defattr(-, root, root, 0755) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -209,6 +220,11 @@ rm -rf %{buildroot} %changelog +* Sat Mar 28 2015 Remi Collet - 1.0.3-11 +- more upstream patches, fix for PHP 7 +- drop runtime dependency on pear, new scriptlets +- don't provide the test suite + * Wed Dec 24 2014 Remi Collet - 1.0.3-10.1 - Fedora 21 SCL mass rebuild -- cgit