From 908d0a0f3e3d1e784e6bb147ea07767381f25e61 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 26 Oct 2016 14:25:16 +0200 Subject: php-pecl-dbase: 7.0.0beta1 (php 7) --- php-pecl-dbase-php7.spec | 63 +++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 36 deletions(-) (limited to 'php-pecl-dbase-php7.spec') diff --git a/php-pecl-dbase-php7.spec b/php-pecl-dbase-php7.spec index 2834b73..dc70cd7 100644 --- a/php-pecl-dbase-php7.spec +++ b/php-pecl-dbase-php7.spec @@ -7,40 +7,30 @@ # 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 +%scl_package php-pecl-dbase %endif -%{?scl: %scl_package php-pecl-dbase} %global with_zts 0%{?__ztsphp:1} %global pecl_name dbase -#global versuf -beta -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else +%global prever beta1 %global ini_name 40-%{pecl_name}.ini -%endif %global with_tests 0%{!?_without_tests:1} Summary: dBase database file access functions Name: %{?sub_prefix}php-pecl-dbase -Version: 5.1.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 7.0.0 +Release: 0.1.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# Created from PHP 5.2.17 tarball +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +# Created from svn +# see http://svn.php.net/viewvc?view=revision&revision=340710 Source1: http://pecl.php.net/get/%{pecl_name}-tests-%{version}.tgz -# From sources headers -Source2: http://www.php.net/license/3_01.txt -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -51,8 +41,10 @@ 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} +%if "%{?scl_prefix}" != "%{?sub_prefix}" Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -60,13 +52,15 @@ 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} <= %{version} Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-pecl-%{pecl_name} <= %{version} +Obsoletes: php71w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -95,18 +89,20 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -a1 - -cp %{SOURCE2} LICENSE - -mv %{pecl_name}-%{version} NTS +mv %{pecl_name}-%{version}%{?prever} NTS mv tests NTS/tests +# 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_DBASE_VERSION/{s/.* "//;s/".*$//;p}' php_dbase.h) -if test "x${extver}" != "x%{version}%{?versuf}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?versuf}. +if test "x${extver}" != "x%{version}%{?prever}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi cd .. @@ -144,8 +140,6 @@ make %{?_smp_mflags} %install -rm -rf %{buildroot} - make -C NTS install INSTALL_ROOT=%{buildroot} # install config file @@ -164,7 +158,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 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 -%{!?_licensedir:install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE} %if 0%{?fedora} < 24 @@ -221,13 +214,8 @@ REPORT_EXIT_STATUS=1 \ %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) -%{?_licensedir:%license LICENSE} +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -241,6 +229,9 @@ rm -rf %{buildroot} %changelog +* Wed Oct 26 2016 Remi Collet - 7.0.0-0.1.beta1 +- update to 7.0.0beta1 for PHP 7 + * Tue Mar 8 2016 Remi Collet - 5.1.0-2 - adapt for F24 -- cgit