]>
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 |
4e2d7fc4 | 6 | %define php_min_version 5.4.0 |
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 |
4e2d7fc4 | 11 | Version: 3.4.0 |
00dc0c8c | 12 | Release: 2 |
778798ff AG |
13 | License: BSD License |
14 | Group: Development/Languages/PHP | |
d924e9c4 | 15 | Source0: https://pear.php.net/get/%{pearname}-%{version}.tgz |
4e2d7fc4 | 16 | # Source0-md5: daedf0015977e8d398f381bb2e05ae6b |
00dc0c8c | 17 | Patch0: case-sensitive.patch |
e1239feb | 18 | URL: https://github.com/squizlabs/PHP_CodeSniffer |
778798ff AG |
19 | BuildRequires: php-pear-PEAR |
20 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
265f8ea3 | 21 | BuildRequires: rpmbuild(macros) >= 1.580 |
32e16ce7 | 22 | Requires: php(core) >= %{php_min_version} |
942e78c0 | 23 | Requires: php(ctype) |
b46949e6 ER |
24 | Requires: php(date) |
25 | Requires: php(dom) | |
26 | Requires: php(iconv) | |
27 | Requires: php(pcre) | |
28 | Requires: php(simplexml) | |
29 | Requires: php(spl) | |
76dc2967 | 30 | Requires: php(tokenizer) |
b46949e6 | 31 | Requires: php(xmlwriter) |
778798ff | 32 | Requires: php-pear |
a9c35b2c ER |
33 | Provides: php-pear-PHP_CodeSniffer = 1:%{version}-%{release} |
34 | Obsoletes: php-pear-PHP_CodeSniffer | |
27ff6e7c | 35 | Obsoletes: php-pear-PHP_CodeSniffer-tests |
778798ff AG |
36 | BuildArch: noarch |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
e1239feb ER |
40 | PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script |
41 | that tokenizes PHP, JavaScript and CSS files to detect violations of a | |
42 | defined coding standard, and a second phpcbf script to automatically | |
43 | correct coding standard violations. PHP_CodeSniffer is an essential | |
44 | development tool that ensures your code remains clean and consistent. | |
778798ff | 45 | |
41bc6861 | 46 | %description -l pl.UTF-8 |
778798ff AG |
47 | PHP_CodeSniffer jest skryptem PHP5 służącym do rozkładu tekstu kodu |
48 | PHP w celu wykrycia naruszeń pewnych zdefiniowanych standardów | |
49 | kodowania. Jest to istotne narzędzie, dzięki któremu można zapewnić | |
2f70d42d JB |
50 | czystość i spójność kodu. Może także pomóc w zapobieganiu popełniania |
51 | przez programistów pewnych częstych błędów semantycznych. | |
778798ff | 52 | |
778798ff AG |
53 | %prep |
54 | %pear_package_setup | |
00dc0c8c | 55 | %patch0 -p1 |
e1239feb | 56 | |
778798ff AG |
57 | %install |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | install -d $RPM_BUILD_ROOT{%{php_pear_dir},%{_bindir}} | |
60 | %pear_package_install | |
61 | ||
e1239feb | 62 | install -p .%{_bindir}/* $RPM_BUILD_ROOT%{_bindir} |
778798ff AG |
63 | |
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
4e2d7fc4 | 69 | %doc install.log |
778798ff AG |
70 | %{php_pear_dir}/.registry/*.reg |
71 | %attr(755,root,root) %{_bindir}/phpcs | |
e1239feb | 72 | %attr(755,root,root) %{_bindir}/phpcbf |
bc564463 | 73 | %{php_pear_dir}/PHP/CodeSniffer |
4f652145 | 74 | %{php_pear_dir}/data/PHP_CodeSniffer |