From ec5930b012b335e67fe25b4b61f4f7a3ddec8899 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Mar 2016 15:13:30 +0100 Subject: php-pecl-qb: F24 (no build) --- php-pecl-qb.spec | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/php-pecl-qb.spec b/php-pecl-qb.spec index c106484..ac26752 100644 --- a/php-pecl-qb.spec +++ b/php-pecl-qb.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-qb +# remirepo spec file for php-pecl-qb # # Copyright (c) 2014-2016 Remi Collet # License: CC-BY-SA @@ -23,7 +23,7 @@ Summary: Accelerator designed mainly for graphic work Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 2.4.0 %global tarver 2.4.0 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -33,15 +33,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel 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} -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" # Other third party repo stuff @@ -83,11 +83,18 @@ and regular PHP code is basically seamless. A key design objective of QB is to let developers harness greater processing power than what baseline PHP offers without the risk involved in adopting a brand new platform. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + %prep %setup -q -c mv %{pecl_name}-%{tarver} NTS +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml + cd NTS # Sanity check, really often broken extver=$(sed -n '/#define PHP_QB_VERSION/{s/.*[[:space:]]"//;s/".*$//;p}' php_qb.h) @@ -137,23 +144,30 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 ZTS/%{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation -for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done -for i in LICENSE CHANGELOG README CREDITS $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') +# Documentation +for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +%if 0%{?fedora} < 24 +# 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 +%endif %check @@ -185,8 +199,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -199,6 +213,12 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet - 2.4.0-2 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets +- fix license management +- don't install/register tests + * Mon Jul 21 2014 Remi Collet - 2.4.0-1 - Update to 2.4.0 (stable) - ignore test results -- cgit