]> git.pld-linux.org Git - packages/ruby-rspec-expectations.git/blob - ruby-rspec-expectations.spec
silly inversed bcond
[packages/ruby-rspec-expectations.git] / ruby-rspec-expectations.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 # test needs rspec-core, however rspec-core depends on rspec-mocks
5 # runtime part of rspec-mocks does not depend on rspec-core
6
7 %define gem_name        rspec-expectations
8 Summary:        Rspec-2 expectations (should and matchers)
9 Name:           ruby-%{gem_name}
10 Version:        2.13.0
11 Release:        1
12 License:        MIT
13 Group:          Development/Languages
14 Source0:        http://rubygems.org/gems/%{gem_name}-%{version}.gem
15 # Source0-md5:  2873d31ef1f8f65d3a04ac40e27825a1
16 URL:            http://github.com/rspec/rspec-expectations
17 BuildRequires:  rpm-rubyprov
18 BuildRequires:  rpmbuild(macros) >= 1.656
19 %if %{with tests}
20 BuildRequires:  ruby-minitest
21 BuildRequires:  ruby-rspec
22 %endif
23 Requires:       ruby-diff-lcs
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 rspec-expectations adds `should` and `should_not` to every object and
29 includes RSpec::Matchers, a library of standard matchers.
30
31 %package doc
32 Summary:        Documentation for %{name}
33 Group:          Documentation
34 Requires:       %{name} = %{version}-%{release}
35
36 %description doc
37 This package contains documentation for %{name}.
38
39 %prep
40 %setup -q -n %{gem_name}-%{version}
41
42 %build
43 %if %{with tests}
44 ruby -rubygems -Ilib/ -S rspec spec/
45 %endif
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
50 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
51
52 # cleanups
53 rm -f $RPM_BUILD_ROOT%{gem_instdir}/{.document,.gitignore,.travis.yml,.yardopts}
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %files
59 %defattr(644,root,root,755)
60 %doc README.md Changelog.md License.txt
61 %{ruby_vendorlibdir}/rspec-expectations.rb
62 %{ruby_vendorlibdir}/rspec/matchers.rb
63 %{ruby_vendorlibdir}/rspec/matchers
64 %{ruby_vendorlibdir}/rspec/expectations.rb
65 %{ruby_vendorlibdir}/rspec/expectations
66
67 %if 0
68 %files  doc
69 %defattr(644,root,root,755)
70 %endif
This page took 0.078224 seconds and 4 git commands to generate.