]>
Commit | Line | Data |
---|---|---|
b47a85b6 ER |
1 | # |
2 | # Conditional build: | |
6f6fef88 | 3 | %bcond_with tests # run tests |
b47a85b6 | 4 | |
afe3e6b1 | 5 | # test needs rspec-core, however rspec-core depends on rspec-mocks |
b47a85b6 ER |
6 | # runtime part of rspec-mocks does not depend on rspec-core |
7 | ||
282832a2 | 8 | %define pkgname rspec-core |
b47a85b6 | 9 | Summary: Rspec-2 runner and formatters |
9deb07df | 10 | Summary(pl.UTF-8): Kod uruchomieniowy i formatujący dla Rspec-2 |
282832a2 | 11 | Name: ruby-%{pkgname} |
2d83169f | 12 | Version: 3.7.1 |
6f6fef88 | 13 | Release: 1 |
b47a85b6 ER |
14 | License: MIT |
15 | Group: Development/Languages | |
282832a2 | 16 | Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem |
2d83169f | 17 | # Source0-md5: c51cf2be9f07c40c8a51856ef046a067 |
b47a85b6 ER |
18 | URL: http://github.com/rspec/rspec-mocks |
19 | BuildRequires: rpm-rubyprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.656 | |
afe3e6b1 ER |
21 | %if %{with tests} |
22 | BuildRequires: ruby-ZenTest | |
23 | BuildRequires: ruby-aruba | |
24 | BuildRequires: ruby-nokogiri | |
25 | BuildRequires: ruby-rake | |
26 | BuildRequires: ruby-rspec-expectations | |
27 | BuildRequires: ruby-rspec-mocks | |
b47a85b6 | 28 | %endif |
b47a85b6 ER |
29 | # Make the following installed by default |
30 | # lib/rspec/core/rake_task | |
31 | Requires: ruby-rake | |
32 | Suggests: ruby-ZenTest | |
33 | Suggests: ruby-mocha | |
34 | Suggests: ruby-rr | |
35 | Suggests: ruby-ruby-debug | |
36 | BuildArch: noarch | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | Behaviour Driven Development for Ruby. | |
41 | ||
9deb07df | 42 | This package contains the runner and formatters for Rspec-2. |
b47a85b6 | 43 | |
9deb07df JB |
44 | %description -l pl.UTF-8 |
45 | Programowanie sterowane zachowaniem (Behaviour Driven Development) dla | |
46 | języka Ruby. | |
47 | ||
48 | Ten pakiet zawiera kod uruchomieniowy i formatujący dla Rspec-2. | |
b47a85b6 ER |
49 | |
50 | %prep | |
282832a2 | 51 | %setup -q -n %{pkgname}-%{version} |
b47a85b6 ER |
52 | |
53 | # rpmlint | |
2d83169f | 54 | grep -rl '^#![ \t]*%{_bindir}' ./exe | \ |
b47a85b6 ER |
55 | xargs sed -i -e '\@^#![ \t]*/usr/bin@d' |
56 | ||
57 | %build | |
282832a2 ER |
58 | # write .gemspec |
59 | %__gem_helper spec | |
60 | ||
b47a85b6 ER |
61 | %if %{with tests} |
62 | # Test failure needs investigation... | |
63 | # There are is some missing template for Ruby 2.0.0: | |
64 | # https://github.com/rspec/rspec-core/commits/master/spec/rspec/core/formatters/html_formatted-2.0.0.html | |
65 | ruby -rubygems -Ilib/ -S exe/rspec | |
66 | %endif | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
282832a2 | 70 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}} |
b47a85b6 ER |
71 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
72 | cp -a exe/* $RPM_BUILD_ROOT%{_bindir} | |
282832a2 | 73 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
b47a85b6 | 74 | |
b47a85b6 ER |
75 | %clean |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
2d83169f | 80 | %doc README.md Changelog.md LICENSE.md |
b47a85b6 | 81 | %attr(755,root,root) %{_bindir}/rspec |
afe3e6b1 | 82 | %dir %{ruby_vendorlibdir}/rspec |
b47a85b6 ER |
83 | %{ruby_vendorlibdir}/rspec/autorun.rb |
84 | %{ruby_vendorlibdir}/rspec/core.rb | |
85 | %{ruby_vendorlibdir}/rspec/core | |
282832a2 | 86 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |