From a6786d424a3bc6063a03e56f7a4e343f9c1a795e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 16 Mar 2014 10:58:46 +0100 Subject: php-pecl-vld: cleanups and apply upstream patch for PHP 5.6 --- php-pecl-vld.spec | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) (limited to 'php-pecl-vld.spec') diff --git a/php-pecl-vld.spec b/php-pecl-vld.spec index 50190bb..bd4d81d 100644 --- a/php-pecl-vld.spec +++ b/php-pecl-vld.spec @@ -6,22 +6,28 @@ # # Please, preserve the changelog entries # -%{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}} -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?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 vld +%global with_zts 0%{?__ztsphp:1} Summary: Dump the internal representation of PHP scripts Name: php-pecl-%{pecl_name} Version: 0.12.0 -Release: 1%{?dist}.1 +Release: 2%{?dist}%{!?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 # https://bugs.php.net/57944 ask license file +Source1: https://raw.github.com/derickr/vld/master/LICENSE + +# https://github.com/derickr/vld/commit/28c5d156fe21dd9e3ddcd318b0bf7dd3b387a28a +# Adding missing PHP 5.6 opcodes. +Patch0: %{pecl_name}-git.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-devel @@ -37,9 +43,25 @@ Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} -# Filter shared private +%if "%{?vendor}" == "Remi Collet" +# Other third party repo stuff +Obsoletes: php53-pecl-%{pecl_name} +Obsoletes: php53u-pecl-%{pecl_name} +Obsoletes: php54-pecl-%{pecl_name} +%if "%{php_version}" > "5.5" +Obsoletes: php55u-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-pecl-%{pecl_name} +%endif +%endif + +%if 0%{?fedora} < 20 +# Filter private shared %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} +%endif + %description The Vulcan Logic Disassembler hooks into the Zend Engine and @@ -50,6 +72,11 @@ dumps all the opcodes (execution units) of a script. %setup -q -c mv %{pecl_name}-%{version} NTS +cd NTS +%patch0 -p1 -b .fromgit +cp %{SOURCE1} LICENSE +cd .. + %if %{with_zts} # Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS @@ -106,6 +133,12 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini %endif +# Test & Documentation +cd NTS +for i in LICENSE $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + %post %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : @@ -137,7 +170,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc NTS/CREDITS +%doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{pecl_name}.ini %{php_extdir}/%{pecl_name}.so @@ -149,5 +182,10 @@ rm -rf %{buildroot} %changelog +* Sun Mar 16 2014 Remi Collet - 0.12.0-2 +- install doc in pecl_docdir +- add missing License file (from github repo) +- apply upstream patch for PHP 5.6 + * Wed Sep 25 2013 Remi Collet - 0.12.0-1 - initial package -- cgit