]> git.pld-linux.org Git - packages/ruby-rspec-core.git/blob - ruby-rspec-core.spec
- up to 3.7.1
[packages/ruby-rspec-core.git] / ruby-rspec-core.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # run tests
4
5 # test needs rspec-core, however rspec-core depends on rspec-mocks
6 # runtime part of rspec-mocks does not depend on rspec-core
7
8 %define pkgname rspec-core
9 Summary:        Rspec-2 runner and formatters
10 Summary(pl.UTF-8):      Kod uruchomieniowy i formatujący dla Rspec-2
11 Name:           ruby-%{pkgname}
12 Version:        3.7.1
13 Release:        1
14 License:        MIT
15 Group:          Development/Languages
16 Source0:        http://rubygems.org/gems/%{pkgname}-%{version}.gem
17 # Source0-md5:  c51cf2be9f07c40c8a51856ef046a067
18 URL:            http://github.com/rspec/rspec-mocks
19 BuildRequires:  rpm-rubyprov
20 BuildRequires:  rpmbuild(macros) >= 1.656
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
28 %endif
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
42 This package contains the runner and formatters for Rspec-2.
43
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.
49
50 %prep
51 %setup -q -n %{pkgname}-%{version}
52
53 # rpmlint
54 grep -rl '^#![ \t]*%{_bindir}' ./exe | \
55         xargs sed -i -e '\@^#![ \t]*/usr/bin@d'
56
57 %build
58 # write .gemspec
59 %__gem_helper spec
60
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
70 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
71 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
72 cp -a exe/* $RPM_BUILD_ROOT%{_bindir}
73 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
79 %defattr(644,root,root,755)
80 %doc README.md Changelog.md LICENSE.md
81 %attr(755,root,root) %{_bindir}/rspec
82 %dir %{ruby_vendorlibdir}/rspec
83 %{ruby_vendorlibdir}/rspec/autorun.rb
84 %{ruby_vendorlibdir}/rspec/core.rb
85 %{ruby_vendorlibdir}/rspec/core
86 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.076194 seconds and 3 git commands to generate.