[packages/phpunit] up to 3.7.38, use github export as source

glen glen at pld-linux.org
Tue Nov 10 15:42:45 CET 2015


commit 90c44e813dfce673fcc680fb1796d7d588c977dd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 10 16:42:06 2015 +0200

    up to 3.7.38, use github export as source

 autoload.patch | 20 ++++++++++++++++++++
 phpunit.spec   | 23 ++++++++++++-----------
 2 files changed, 32 insertions(+), 11 deletions(-)
---
diff --git a/phpunit.spec b/phpunit.spec
index 954e2dd..04e86a2 100644
--- a/phpunit.spec
+++ b/phpunit.spec
@@ -5,12 +5,14 @@
 Summary:	%{pearname} - regression testing framework for unit tests
 Summary(pl.UTF-8):	%{pearname} - zestaw testów regresyjnych
 Name:		phpunit
-Version:	3.7.35
-Release:	2
+# we use 3.7-lts version
+Version:	3.7.38
+Release:	1
 License:	BSD
 Group:		Development/Languages/PHP
-Source0:	http://pear.phpunit.de/get/PHPUnit-%{version}.tgz
-# Source0-md5:	dabdff3e1503f6f5dc97ece1a5c15bee
+Source0:	https://github.com/sebastianbergmann/phpunit/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	d7452511b562cc582f204da0b180ff42
+Patch0:		autoload.patch
 URL:		http://www.phpunit.de/
 BuildRequires:	php-channel(components.ez.no)
 BuildRequires:	php-channel(pear.phpunit.de)
@@ -65,21 +67,20 @@ który można znaleźć pod adresem <http://www.junit.org/>.
 Ta klasa ma w PEAR status: %{status}.
 
 %prep
-%pear_package_setup
+%setup -q
+%patch0 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{php_pear_dir}
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -p usr/bin/phpunit $RPM_BUILD_ROOT%{_bindir}
-%pear_package_install
+install -d $RPM_BUILD_ROOT{%{php_pear_dir},%{_bindir}}
+cp -a PHPUnit $RPM_BUILD_ROOT%{php_pear_dir}
+install -p phpunit.php $RPM_BUILD_ROOT%{_bindir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc install.log optional-packages.txt
-%{php_pear_dir}/.registry/.channel.pear.phpunit.de/*.reg
+%doc README.md LICENSE
 %attr(755,root,root) %{_bindir}/phpunit
 %{php_pear_dir}/PHPUnit
diff --git a/autoload.patch b/autoload.patch
new file mode 100644
index 0000000..c92ea3c
--- /dev/null
+++ b/autoload.patch
@@ -0,0 +1,20 @@
+--- phpunit-3.7.35/phpunit.php~	2015-11-10 16:39:54.000000000 +0200
++++ phpunit-3.7.35/phpunit.php	2015-11-10 16:39:57.907131109 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env php
++#!/usr/bin/php
+ <?php
+ /* PHPUnit
+  *
+@@ -37,10 +37,6 @@
+ 
+ define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main');
+ 
+-if (strpos('@php_bin@', '@php_bin') === 0) {
+-    require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'PHPUnit' . DIRECTORY_SEPARATOR . 'Autoload.php';
+-} else {
+-    require '@php_dir@' . DIRECTORY_SEPARATOR . 'PHPUnit' . DIRECTORY_SEPARATOR . 'Autoload.php';
+-}
++require '/usr/share/pear/PHPUnit/Autoload.php';
+ 
+ PHPUnit_TextUI_Command::main();
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/phpunit.git/commitdiff/90c44e813dfce673fcc680fb1796d7d588c977dd



More information about the pld-cvs-commit mailing list