From a0fd56a83d064154c44b15521f6badd2afed4afa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Dec 2015 18:03:13 +0100 Subject: php-smbclient: restore our spec (package approved) --- php-smbclient.spec | 64 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 16 deletions(-) (limited to 'php-smbclient.spec') diff --git a/php-smbclient.spec b/php-smbclient.spec index ca51ff7..e1298b6 100644 --- a/php-smbclient.spec +++ b/php-smbclient.spec @@ -1,6 +1,3 @@ -# Fedora spec file for php-smbclient -# with SCL compatibility removed, from -# # remirepo spec file for php-smbclient # # Copyright (c) 2015 Remi Collet @@ -9,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 %global gh_commit 8b9587df1a0859074eae6133c5210451d6527e38 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) @@ -17,6 +21,8 @@ %global gh_date 20150909 %global prever -rc1 +%{?scl: %scl_package php-smbclient} +%{!?scl: %global pkg_name %{name}} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} @@ -31,34 +37,55 @@ # Test suite requires a Samba server and configuration file %global with_tests 0%{?_with_tests:1} -Name: php-smbclient +Name: %{?sub_prefix}php-smbclient Version: 0.8.0 -Release: 0.3.rc1%{?dist} +Release: 0.4.rc1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP wrapper for libsmbclient Group: Development/Languages License: BSD URL: https://github.com/eduardok/libsmbclient-php -Source0: %{name}-%{version}-%{gh_short}.tgz +Source0: %{pkg_name}-%{version}-%{gh_short}.tgz # git snapshot as upstream doesn't provide test suite Source1: makesrc.sh %if %{with_tests} Source2: %{gh_project}-phpunit.xml %endif -BuildRequires: php-devel +BuildRequires: %{?scl_prefix}php-devel BuildRequires: libsmbclient-devel > 3.6 %if %{with_tests} BuildRequires: php-composer(phpunit/phpunit) BuildRequires: samba %endif -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -# Rename (and "php -m" reports both smbclient and libsmbclient) -Obsoletes: php-libsmbclient < 0.8.0-0.2 -Provides: php-libsmbclient = %{version}-%{release} -Provides: php-libsmbclient%{?_isa} = %{version}-%{release} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} +# Rename +Obsoletes: %{?sub_prefix}php-libsmbclient < 0.8.0-0.2 +Provides: %{?sub_prefix}php-libsmbclient = %{version}-%{release} +Provides: %{?sub_prefix}php-libsmbclient%{?_isa} = %{version}-%{release} + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} +# Other third party repo stuff +Obsoletes: php53-%{ext_name} <= %{version} +Obsoletes: php53u-%{ext_name} <= %{version} +Obsoletes: php54-%{ext_name} <= %{version} +Obsoletes: php54w-%{ext_name} <= %{version} +%if "%{php_version}" > "5.5" +Obsoletes: php55u-%{ext_name} <= %{version} +Obsoletes: php55w-%{ext_name} <= %{version} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-%{ext_name} <= %{version} +Obsoletes: php56w-%{ext_name} <= %{version} +%endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-%{ext_name} <= %{version} +Obsoletes: php70w-%{ext_name} <= %{version} +%endif +%endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 # Filter private shared @@ -72,6 +99,8 @@ Provides: php-libsmbclient%{?_isa} = %{version}-%{release} library to provide Samba related functions and 'smb' streams to PHP programs. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{scl_vendor})}. + %prep %setup -q -c @@ -163,13 +192,16 @@ cp %{SOURCE2} phpunit.xml %changelog -* Thu Sep 17 2015 Remi Collet - 0.8.0-0.3.rc1 -- cleanup SCL compatibility for Fedora +* Tue Oct 13 2015 Remi Collet - 0.8.0-0.4.rc1 +- rebuild for PHP 7.0.0RC5 new API version + +* Fri Sep 18 2015 Remi Collet - 0.8.0-0.3.rc1 +- F23 rebuild with rh_layout * Wed Sep 16 2015 Remi Collet - 0.8.0-0.2.rc1 - update to 0.8.0-rc1 - rename from php-libsmbclient to php-smbclient - https://github.com/eduardok/libsmbclient-php/pull/26 +- https://github.com/eduardok/libsmbclient-php/pull/26 rename * Thu Sep 3 2015 Remi Collet - 0.8.0-0.1.20150909gita65127d - update to 0.8.0-dev -- cgit