[packages/phpcs] up to 2.7.0
glen
glen at pld-linux.org
Tue Oct 4 13:09:46 CEST 2016
commit e1239feb66b31c65d0610098e57ae563925842c1
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Oct 4 14:04:42 2016 +0300
up to 2.7.0
peardeps.patch | 17 +----------------
phpcs.spec | 31 +++++++++++++++----------------
2 files changed, 16 insertions(+), 32 deletions(-)
---
diff --git a/phpcs.spec b/phpcs.spec
index b9e6f88..07d88c0 100644
--- a/phpcs.spec
+++ b/phpcs.spec
@@ -2,22 +2,21 @@
# - save config to /etc:
# $ phpcs --config-set default_standard PEAR
# PHP Warning: file_put_contents(/usr/share/pear/data/PHP_CodeSniffer/CodeSniffer.conf): failed to open stream: Permission denied in /usr/share/pear/PHP/CodeSniffer.php on line 1532
-%define status stable
%define pearname PHP_CodeSniffer
%define php_min_version 5.2.1
%include /usr/lib/rpm/macros.php
Summary: PHP_CodeSniffer tokenises PHP code and detects violations of a defined set of coding standards
Summary(pl.UTF-8): PHP_CodeSniffer analizuje kod PHP pod kątem naruszeń zdefiniowanych standardów kodowania
Name: phpcs
-Version: 2.3.4
-Release: 0.1
+Version: 2.7.0
+Release: 1
License: BSD License
Group: Development/Languages/PHP
Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz
-# Source0-md5: 7484f6b440a3037aa267141fada2edbc
+# Source0-md5: 40e5d70ab9aa4cc1a15091ddcc14c609
Patch0: case-sensitive.patch
Patch1: peardeps.patch
-URL: http://pear.php.net/package/PHP_CodeSniffer/
+URL: https://github.com/squizlabs/PHP_CodeSniffer
BuildRequires: php-pear-PEAR
BuildRequires: rpm-php-pearprov >= 4.4.2-11
BuildRequires: rpmbuild(macros) >= 1.580
@@ -25,6 +24,7 @@ Requires: php(core) >= %{php_min_version}
Requires: php(ctype)
Requires: php(tokenizer)
Requires: php-pear
+Suggests: php(simplexml)
Suggests: php(xmlwriter)
Suggests: php-phpunit-PHP_Timer
Provides: php-pear-PHP_CodeSniffer = 1:%{version}-%{release}
@@ -40,13 +40,11 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautoreq %{?_noautophp}
%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
-essential development tool that ensures that your code remains clean
-and consistent. It can even help prevent some common semantic errors
-made by developers.
-
-In PEAR status of this package is: %{status}.
+PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script
+that tokenizes PHP, JavaScript and CSS files to detect violations of a
+defined coding standard, and a second phpcbf script to automatically
+correct coding standard violations. PHP_CodeSniffer is an essential
+development tool that ensures your code remains clean and consistent.
%description -l pl.UTF-8
PHP_CodeSniffer jest skryptem PHP5 służącym do rozkładu tekstu kodu
@@ -55,28 +53,29 @@ kodowania. Jest to istotne narzędzie, dzięki któremu można zapewnić
czystość i spójność kodu. Może także pomóc w zapobieganiu popełniania
przez programistów pewnych częstych błędów semantycznych.
-Ta klasa ma w PEAR status: %{status}.
-
%prep
%pear_package_setup
%patch0 -p1
%patch1 -p1
+mv .%{_bindir}/scripts .
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{php_pear_dir},%{_bindir}}
%pear_package_install
-install -p .%{_bindir}/phpcs $RPM_BUILD_ROOT%{_bindir}
+install -p .%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc install.log
+%doc install.log scripts
%{php_pear_dir}/.registry/*.reg
%attr(755,root,root) %{_bindir}/phpcs
+%attr(755,root,root) %{_bindir}/phpcbf
%{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
index 489143f..9ed0496 100644
--- a/peardeps.patch
+++ b/peardeps.patch
@@ -1,18 +1,3 @@
---- 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-2.0.0/usr/share/pear/PHP/CodeSniffer/CLI.php~ 2014-12-18 15:33:47.000000000 +0200
+++ PHP_CodeSniffer-2.0.0/usr/share/pear/PHP/CodeSniffer/CLI.php 2014-12-18 15:35:53.698306987 +0200
@@ -80,11 +80,7 @@
@@ -37,7 +22,7 @@
- } else {
- include_once 'PHP/CodeSniffer/Reporting.php';
- }
-+ include_once 'PHP/CodeSniffer/Reporting.php';
++ include_once 'PHP/CodeSniffer/Reporting.php';
PHP_CodeSniffer_Reporting::startTiming();
$this->checkRequirements();
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/phpcs.git/commitdiff/e1239feb66b31c65d0610098e57ae563925842c1
More information about the pld-cvs-commit
mailing list