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