]>
Commit | Line | Data |
---|---|---|
f9adf763 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | Summary: A robust Ruby code analyzer, based on the community Ruby style guide | |
6 | Name: rubocop | |
7 | Version: 0.18.1 | |
2c952545 | 8 | Release: 3 |
f9adf763 ER |
9 | License: MIT |
10 | Group: Development/Languages | |
11 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem | |
12 | # Source0-md5: a265af5e5e3272e03c854b3c1635770c | |
13 | Patch0: rpmpath.patch | |
14 | URL: http://github.com/bbatsov/rubocop | |
15 | BuildRequires: rpm-rubyprov | |
16 | BuildRequires: rpmbuild(macros) >= 1.656 | |
17 | BuildRequires: sed >= 4.0 | |
18 | %if %{with tests} | |
19 | BuildRequires: ruby-bundler < 2 | |
20 | BuildRequires: ruby-bundler >= 1.3 | |
21 | BuildRequires: ruby-rake < 11 | |
22 | BuildRequires: ruby-rake >= 10.1 | |
23 | BuildRequires: ruby-rspec < 3 | |
24 | BuildRequires: ruby-rspec >= 2.14 | |
25 | BuildRequires: ruby-simplecov < 1 | |
26 | BuildRequires: ruby-simplecov >= 0.7 | |
27 | BuildRequires: ruby-yard < 1 | |
28 | BuildRequires: ruby-yard >= 0.8 | |
29 | %endif | |
30 | Requires: ruby-json < 2 | |
31 | Requires: ruby-json >= 1.7.7 | |
32 | Requires: ruby-parser < 2.2 | |
33 | Requires: ruby-parser >= 2.1.3 | |
34 | Requires: ruby-powerpack < 0.1 | |
35 | Requires: ruby-powerpack >= 0.0.6 | |
36 | Requires: ruby-rainbow < 3.0 | |
37 | Requires: ruby-rainbow >= 1.99.1 | |
38 | BuildArch: noarch | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | Automatic Ruby code style checking tool. Aims to enforce the | |
43 | community-driven Ruby Style Guide. | |
44 | ||
45 | %prep | |
46 | %setup -q | |
47 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
48 | %patch0 -p1 | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} | |
53 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
54 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
55 | cp -a config $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name} | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %attr(755,root,root) %{_bindir}/rubocop | |
63 | %{ruby_vendorlibdir}/%{name}.rb | |
64 | %{ruby_vendorlibdir}/%{name} |