]>
Commit | Line | Data |
---|---|---|
b47a85b6 ER |
1 | # |
2 | # Conditional build: | |
47746d49 | 3 | %bcond_with tests # build without 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} |
b47a85b6 | 12 | Version: 2.13.1 |
282832a2 | 13 | Release: 3 |
b47a85b6 ER |
14 | License: MIT |
15 | Group: Development/Languages | |
282832a2 | 16 | Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem |
b47a85b6 ER |
17 | # Source0-md5: 648122b9ca2f7e3df3ca16d930d87668 |
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 | |
54 | grep -rl '^#![ \t]*%{_bindir}' ./lib| \ | |
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 ER |
74 | |
75 | # Rename autospec to avoid conflict with rspec 1.3 | |
76 | # (anyway this script doesn't seem to be useful) | |
77 | mv $RPM_BUILD_ROOT%{_bindir}/autospec{,2} | |
78 | ||
b47a85b6 ER |
79 | %clean |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.md Changelog.md License.txt | |
85 | %attr(755,root,root) %{_bindir}/autospec2 | |
86 | %attr(755,root,root) %{_bindir}/rspec | |
87 | %dir %{ruby_vendorlibdir}/autotest | |
88 | %{ruby_vendorlibdir}/autotest/discover.rb | |
89 | %{ruby_vendorlibdir}/autotest/rspec2.rb | |
afe3e6b1 | 90 | %dir %{ruby_vendorlibdir}/rspec |
b47a85b6 ER |
91 | %{ruby_vendorlibdir}/rspec/autorun.rb |
92 | %{ruby_vendorlibdir}/rspec/core.rb | |
93 | %{ruby_vendorlibdir}/rspec/core | |
282832a2 | 94 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |