]>
Commit | Line | Data |
---|---|---|
dfd0e29c ER |
1 | # TODO |
2 | # - save config to /etc: | |
3 | # $ phpcs --config-set default_standard PEAR | |
4 | # 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 | |
265f8ea3 | 5 | %define pearname PHP_CodeSniffer |
6768ccee | 6 | %define php_min_version 5.2.1 |
265f8ea3 | 7 | %include /usr/lib/rpm/macros.php |
bc564463 ER |
8 | Summary: PHP_CodeSniffer tokenises PHP code and detects violations of a defined set of coding standards |
9 | Summary(pl.UTF-8): PHP_CodeSniffer analizuje kod PHP pod kątem naruszeń zdefiniowanych standardów kodowania | |
a9c35b2c | 10 | Name: phpcs |
e1239feb ER |
11 | Version: 2.7.0 |
12 | Release: 1 | |
778798ff AG |
13 | License: BSD License |
14 | Group: Development/Languages/PHP | |
265f8ea3 | 15 | Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz |
e1239feb | 16 | # Source0-md5: 40e5d70ab9aa4cc1a15091ddcc14c609 |
faf3baa6 | 17 | Patch0: case-sensitive.patch |
adbd773a | 18 | Patch1: peardeps.patch |
e1239feb | 19 | URL: https://github.com/squizlabs/PHP_CodeSniffer |
778798ff AG |
20 | BuildRequires: php-pear-PEAR |
21 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
265f8ea3 | 22 | BuildRequires: rpmbuild(macros) >= 1.580 |
32e16ce7 | 23 | Requires: php(core) >= %{php_min_version} |
942e78c0 | 24 | Requires: php(ctype) |
76dc2967 | 25 | Requires: php(tokenizer) |
778798ff | 26 | Requires: php-pear |
e1239feb | 27 | Suggests: php(simplexml) |
3c3673cd | 28 | Suggests: php(xmlwriter) |
5d2cc751 | 29 | Suggests: php-phpunit-PHP_Timer |
a9c35b2c ER |
30 | Provides: php-pear-PHP_CodeSniffer = 1:%{version}-%{release} |
31 | Obsoletes: php-pear-PHP_CodeSniffer | |
27ff6e7c | 32 | Obsoletes: php-pear-PHP_CodeSniffer-tests |
778798ff AG |
33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
4f2e1277 ER |
36 | # exclude optional php dependencies |
37 | %define _noautophp php-xmlwriter | |
38 | ||
39 | # put it together for rpmbuild | |
40 | %define _noautoreq %{?_noautophp} | |
41 | ||
778798ff | 42 | %description |
e1239feb ER |
43 | PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script |
44 | that tokenizes PHP, JavaScript and CSS files to detect violations of a | |
45 | defined coding standard, and a second phpcbf script to automatically | |
46 | correct coding standard violations. PHP_CodeSniffer is an essential | |
47 | development tool that ensures your code remains clean and consistent. | |
778798ff | 48 | |
41bc6861 | 49 | %description -l pl.UTF-8 |
778798ff AG |
50 | PHP_CodeSniffer jest skryptem PHP5 służącym do rozkładu tekstu kodu |
51 | PHP w celu wykrycia naruszeń pewnych zdefiniowanych standardów | |
52 | kodowania. Jest to istotne narzędzie, dzięki któremu można zapewnić | |
2f70d42d JB |
53 | czystość i spójność kodu. Może także pomóc w zapobieganiu popełniania |
54 | przez programistów pewnych częstych błędów semantycznych. | |
778798ff | 55 | |
778798ff AG |
56 | %prep |
57 | %pear_package_setup | |
faf3baa6 | 58 | %patch0 -p1 |
adbd773a | 59 | %patch1 -p1 |
778798ff | 60 | |
e1239feb ER |
61 | mv .%{_bindir}/scripts . |
62 | ||
778798ff AG |
63 | %install |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | install -d $RPM_BUILD_ROOT{%{php_pear_dir},%{_bindir}} | |
66 | %pear_package_install | |
67 | ||
e1239feb | 68 | install -p .%{_bindir}/* $RPM_BUILD_ROOT%{_bindir} |
778798ff AG |
69 | |
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
e1239feb | 75 | %doc install.log scripts |
778798ff AG |
76 | %{php_pear_dir}/.registry/*.reg |
77 | %attr(755,root,root) %{_bindir}/phpcs | |
e1239feb | 78 | %attr(755,root,root) %{_bindir}/phpcbf |
bc564463 | 79 | %{php_pear_dir}/PHP/CodeSniffer |
778798ff | 80 | %{php_pear_dir}/PHP/CodeSniffer.php |
4f652145 | 81 | %{php_pear_dir}/data/PHP_CodeSniffer |