From 3e65a2c7c00f66bbd523b9189ee8272020faaff6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 22 Jul 2014 10:07:34 +0200 Subject: php-pecl-ssdeep: switch back to our spec (package approved) --- php-pecl-ssdeep.spec | 59 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 16 deletions(-) (limited to 'php-pecl-ssdeep.spec') diff --git a/php-pecl-ssdeep.spec b/php-pecl-ssdeep.spec index 6a6f330..7c5e599 100644 --- a/php-pecl-ssdeep.spec +++ b/php-pecl-ssdeep.spec @@ -6,40 +6,59 @@ # # Please, preserve the changelog entries # +%{?scl: %scl_package php-pecl-ssdeep} +%{!?scl: %global _root_prefix %{_prefix}} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name ssdeep -%if 0%{?fedora} < 21 +%if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else %global ini_name 40-%{pecl_name}.ini %endif Summary: Wrapper for libfuzzy library -Name: php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.0.4 -Release: 1%{?dist} +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} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -BuildRequires: php-devel > 5.2 -BuildRequires: php-pear +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: %{?scl_prefix}php-devel > 5.2 +BuildRequires: %{?scl_prefix}php-pear BuildRequires: ssdeep-devel > 2.5 Requires(post): %{__pecl} Requires(postun): %{__pecl} -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} +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(%{pecl_name})%{?_isa} = %{version} + +%if "%{?vendor}" == "Remi Collet" +# Other third party repo stuff +%if "%{php_version}" > "5.4" +Obsoletes: php53-pecl-%{pecl_name} +Obsoletes: php53u-pecl-%{pecl_name} +Obsoletes: php54-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.5" +Obsoletes: php55u-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-pecl-%{pecl_name} +%endif +%endif -Provides: php-%{pecl_name} = %{version} -Provides: php-%{pecl_name}%{?_isa} = %{version} -Provides: php-pecl(%{pecl_name}) = %{version} -Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} %if 0%{?fedora} < 20 && 0%{?rhel} < 7 # Filter shared private @@ -84,7 +103,7 @@ EOF cd NTS %{_bindir}/phpize %configure \ - --with-ssdeep=%{_prefix} \ + --with-ssdeep=%{_root_prefix} \ --with-php-config=%{_bindir}/php-config \ --with-libdir=%{_lib} make %{?_smp_mflags} @@ -93,7 +112,7 @@ make %{?_smp_mflags} cd ../ZTS %{_bindir}/zts-phpize %configure \ - --with-ssdeep=%{_prefix} \ + --with-ssdeep=%{_root_prefix} \ --with-php-config=%{_bindir}/zts-php-config \ --with-libdir=%{_lib} make %{?_smp_mflags} @@ -101,6 +120,8 @@ make %{?_smp_mflags} %install +rm -rf %{buildroot} + make -C NTS install INSTALL_ROOT=%{buildroot} # install config file @@ -164,7 +185,12 @@ REPORT_EXIT_STATUS=1 \ %endif +%clean +rm -rf %{buildroot} + + %files +%defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name} %doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -178,11 +204,12 @@ REPORT_EXIT_STATUS=1 \ %changelog -* Tue Jun 3 2014 Remi Collet - 1.0.4-1 +* Thu Apr 17 2014 Remi Collet - 1.0.4-2 +- add numerical prefix to extension configuration file (php 5.6) + +* Wed Jan 22 2014 Remi Collet - 1.0.4-1 - Update to 1.0.4 (stable) - drop upstream patch -- add numerical prefix to extension configuration file -- cleanup for review * Wed Jan 22 2014 Remi Collet - 1.0.3-1 - initial package, version 1.0.3 (stable) \ No newline at end of file -- cgit