[packages/php-pear-PHP_CodeSniffer] - help pear dependecy generator generate proper deps

glen glen at pld-linux.org
Wed Oct 17 22:12:27 CEST 2012


commit adbd773a485424c0210d49f8a69f3b3826637a34
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Oct 17 23:11:33 2012 +0300

    - help pear dependecy generator generate proper deps

 peardeps.patch                | 30 ++++++++++++++++++++++++++++++
 php-pear-PHP_CodeSniffer.spec |  9 +++------
 2 files changed, 33 insertions(+), 6 deletions(-)
---
diff --git a/php-pear-PHP_CodeSniffer.spec b/php-pear-PHP_CodeSniffer.spec
index 9c3ffa0..599ca6e 100644
--- a/php-pear-PHP_CodeSniffer.spec
+++ b/php-pear-PHP_CodeSniffer.spec
@@ -10,27 +10,24 @@ Summary:	PHP_CodeSniffer tokenises PHP code and detects violations of a defined
 Summary(pl.UTF-8):	PHP_CodeSniffer analizuje kod PHP pod kątem naruszeń zdefiniowanych standardów kodowania
 Name:		php-pear-%{pearname}
 Version:	1.4.0
-Release:	1
+Release:	2
 Epoch:		1
 License:	BSD License
 Group:		Development/Languages/PHP
 Source0:	http://pear.php.net/get/%{pearname}-%{version}.tgz
 # Source0-md5:	a299051c1dfa3d10ca198d0523e557e7
 Patch0:		case-sensitive.patch
+Patch1:		peardeps.patch
 URL:		http://pear.php.net/package/PHP_CodeSniffer/
 BuildRequires:	php-pear-PEAR
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.580
 Requires:	php(core) >= %{php_min_version}
 Requires:	php-pear
-Suggests:	php-pear-PHP_Timer
-Suggests:	php-phpunit-PHP_Timer
 Obsoletes:	php-pear-PHP_CodeSniffer-tests
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_noautoreq pear(PHP/CodeSniffer/../CodeSniffer.php) pear($dir/{$standard}CodingStandard.php) pear(PHP/Timer.*)
-
 %description
 PHP_CodeSniffer is a PHP5 script that tokenises and "sniffs" PHP code
 to detect violations of a defined set of coding standards. It is an
@@ -52,6 +49,7 @@ Ta klasa ma w PEAR status: %{status}.
 %prep
 %pear_package_setup
 %patch0 -p1
+%patch1 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -75,5 +73,4 @@ fi
 %attr(755,root,root) %{_bindir}/phpcs
 %{php_pear_dir}/PHP/CodeSniffer
 %{php_pear_dir}/PHP/CodeSniffer.php
-
 %{php_pear_dir}/data/PHP_CodeSniffer
diff --git a/peardeps.patch b/peardeps.patch
new file mode 100644
index 0000000..7a7afb5
--- /dev/null
+++ b/peardeps.patch
@@ -0,0 +1,30 @@
+--- PHP_CodeSniffer-1.4.0/./usr/share/pear/PHP/CodeSniffer/CLI.php~	2012-10-17 23:08:34.000000000 +0300
++++ PHP_CodeSniffer-1.4.0/./usr/share/pear/PHP/CodeSniffer/CLI.php	2012-10-17 23:09:36.113714250 +0300
+@@ -12,11 +12,7 @@
+  * @link      http://pear.php.net/package/PHP_CodeSniffer
+  */
+ 
+-if (is_file(dirname(__FILE__).'/../CodeSniffer.php') === true) {
+-    include_once dirname(__FILE__).'/../CodeSniffer.php';
+-} else {
+-    include_once 'PHP/CodeSniffer.php';
+-}
++include_once 'PHP/CodeSniffer.php';
+ 
+ /**
+  * A class to process command line phpcs scripts.
+--- PHP_CodeSniffer-1.4.0/./usr/share/pear/PHP/CodeSniffer/Reporting.php~	2012-10-17 23:08:34.000000000 +0300
++++ PHP_CodeSniffer-1.4.0/./usr/share/pear/PHP/CodeSniffer/Reporting.php	2012-10-17 23:09:49.330982079 +0300
+@@ -14,11 +14,7 @@
+  * @link      http://pear.php.net/package/PHP_CodeSniffer
+  */
+ 
+-if (is_file(dirname(__FILE__).'/../CodeSniffer.php') === true) {
+-    include_once dirname(__FILE__).'/../CodeSniffer.php';
+-} else {
+-    include_once 'PHP/CodeSniffer.php';
+-}
++include_once 'PHP/CodeSniffer.php';
+ 
+ /**
+  * A class to manage reporting.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pear-PHP_CodeSniffer.git/commitdiff/5d2cc751dd97f4fecb830e278346223d643b3736



More information about the pld-cvs-commit mailing list