]> git.pld-linux.org Git - SPECS.git/blob - ruby-simplecov.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / ruby-simplecov.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # ri/rdoc documentation
4
5 %define pkgname simplecov
6 Summary:        Code coverage for Ruby 1.9+
7 Summary(pl.UTF-8):      Pokrycie kodu dla języka Ruby 1.9+
8 Name:           ruby-%{pkgname}
9 Version:        0.14.1
10 Release:        1
11 License:        MIT
12 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
13 # Source0-md5:  dc307ae2de2bd70c9c64ca3fd5ae61a5
14 Group:          Development/Languages
15 URL:            https://rubygems.org/gems/simplecov
16 BuildRequires:  rpm-rubyprov
17 BuildRequires:  rpmbuild(macros) >= 1.665
18 BuildRequires:  ruby >= 1:1.8.7
19 BuildRequires:  ruby-rdoc
20 Requires:       ruby >= 1:1.8.7
21 Requires:       ruby-docile >= 1.1.0
22 Requires:       ruby-json >= 1.8
23 Requires:       ruby-json < 3
24 Requires:       ruby-simplecov-html >= 0.10.0
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Code coverage for Ruby 1.9+ with a powerful configuration library
30 and automatic merging of coverage across test suites.
31
32 %description -l pl.UTF-8
33 Pokrycie kodu dla języka Ruby 1.9+ z potężną biblioteką konfiguracyjną
34 oraz automatycznym łączeniem pokrycia z różnych zbiorów testów.
35
36 %package rdoc
37 Summary:        HTML documentation for Ruby %{pkgname} module
38 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla moduły języka Ruby %{pkgname}
39 Group:          Documentation
40 Requires:       ruby >= 1:1.8.7-4
41
42 %description rdoc
43 HTML documentation for Ruby %{pkgname} module.
44
45 %description rdoc -l pl.UTF-8
46 Dokumentacja w formacie HTML dla moduły języka Ruby %{pkgname}.
47
48 %package ri
49 Summary:        ri documentation for Ruby %{pkgname} module
50 Summary(pl.UTF-8):      Dokumentacja w formacie ri dla modułu języka Ruby %{pkgname}
51 Group:          Documentation
52 Requires:       ruby
53
54 %description ri
55 ri documentation for Ruby %{pkgname} module.
56
57 %description ri -l pl.UTF-8
58 Dokumentacja w formacie ri dla modułu języka Ruby %{pkgname}.
59
60 %prep
61 %setup -q -n %{pkgname}-%{version}
62
63 %build
64 # write .gemspec
65 %__gem_helper spec
66
67 # make gemspec self-contained
68 ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
69         File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
70         file.puts spec.to_ruby_for_cache
71 end'
72
73 rdoc --ri --op ri lib
74 rdoc --op rdoc lib
75 %{__rm} -r ri/created.rid ri/{Coverage,Rails}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}/%{name}-%{version}}
80
81 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
82 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
83
84 cp -a rdoc/* $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
85
86 # install gemspec
87 install -d $RPM_BUILD_ROOT%{ruby_specdir}
88 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %files
94 %defattr(644,root,root,755)
95 %doc CHANGELOG.md MIT-LICENSE README.md
96 %{ruby_vendorlibdir}/%{pkgname}.rb
97 %{ruby_vendorlibdir}/%{pkgname}
98 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
99
100 %if %{with doc}
101 %files rdoc
102 %defattr(644,root,root,755)
103 %{ruby_rdocdir}/%{name}-%{version}
104
105 %files ri
106 %defattr(644,root,root,755)
107 %{ruby_ridir}/SimpleCov
108 %{ruby_ridir}/lib/simplecov
109 %endif
This page took 0.048264 seconds and 3 git commands to generate.