From ad22b5e032271b8ce15435c7a904ad24150d6673 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Mar 2016 17:23:49 +0100 Subject: php-pecl-sqlite: F24 --- php-pecl-sqlite.spec | 63 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/php-pecl-sqlite.spec b/php-pecl-sqlite.spec index 34e726b..47c0e07 100644 --- a/php-pecl-sqlite.spec +++ b/php-pecl-sqlite.spec @@ -7,10 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-ssdeep} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?php_incldir: %global php_incldir %{_includedir}/php} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} %global pecl_name sqlite %global svnver 332053 @@ -29,7 +25,7 @@ Summary: Extension for the SQLite V2 Embeddable SQL Database Engine Name: %{?scl_prefix}php-pecl-sqlite Version: 2.0.0 -Release: 0.8.svn%{svnver}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 0.9.svn%{svnver}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Group: Development/Languages License: PHP URL: http://pecl.php.net/package/%{pecl_name} @@ -47,25 +43,22 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-pdo BuildRequires: sqlite2-devel -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-pdo%{?_isa} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{extver} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{extver} - # Was provided by php until 5.4.0 -%if "%{php_version}" > "5.4" -Obsoletes: %{?scl_prefix}php-sqlite < 5.4.0 -Provides: %{?scl_prefix}php-sqlite = 5.4.0 -Provides: %{?scl_prefix}php-sqlite%{?_isa} = 5.4.0 -Obsoletes: %{?scl_prefix}php-sqlite2 < 5.4.0 -Provides: %{?scl_prefix}php-sqlite2 = 5.4.0 -Provides: %{?scl_prefix}php-sqlite2%{?_isa} = 5.4.0 -%endif +Obsoletes: %{?scl_prefix}php-%{pecl_name} < 5.4.0 +Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version} +Obsoletes: %{?scl_prefix}php-%{pecl_name}2 < 5.4.0 +Provides: %{?scl_prefix}php-%{pecl_name}2 = 1:%{version} +Provides: %{?scl_prefix}php-%{pecl_name}2%{?_isa} = 1:%{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" && 0%{!?scl:1} # Other third party repo stuff @@ -108,6 +101,8 @@ Notice: this extension is deprecated, you should consider Documentation: http://php.net/sqlite +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 -c -q @@ -123,6 +118,10 @@ sed -i \ mv %{pecl_name}-%{version} NTS %endif +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml + cd NTS # Check version extver=$(sed -n '/#define PHP_SQLITE_MODULE_VERSION/{s/.*\t"//;s/".*$//;p}' sqlite.c) @@ -205,7 +204,7 @@ cd NTS TEST_PHP_EXECUTABLE=%{__php} \ REPORT_EXIT_STATUS=1 \ NO_INTERACTION=1 \ -%{__php} run-tests.php \ +%{__php} -n run-tests.php \ -n -q \ -d extension=pdo.so \ -d extension=$PWD/modules/%{pecl_name}.so @@ -224,7 +223,7 @@ cd ../ZTS TEST_PHP_EXECUTABLE=%{__ztsphp} \ REPORT_EXIT_STATUS=1 \ NO_INTERACTION=1 \ -%{__ztsphp} run-tests.php \ +%{__ztsphp} -n run-tests.php \ -n -q \ -d extension=pdo.so \ -d extension=$PWD/modules/%{pecl_name}.so @@ -236,20 +235,29 @@ NO_INTERACTION=1 \ rm -rf %{buildroot} -%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 - %{pecl_uninstall} %{pecl_name} >/dev/null || : +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : fi +%endif %files %defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %{pecl_xmldir}/%{name}.xml @@ -261,6 +269,11 @@ fi %changelog +* Tue Mar 8 2016 Remi Collet - 2.0.0-0.9.svn332053 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets +- don't install/register tests + * Wed Dec 24 2014 Remi Collet - 2.0.0-0.8.svn332053 - Fedora 21 SCL mass rebuild -- cgit