]>
Commit | Line | Data |
---|---|---|
0f340f85 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build ri/rdoc | |
4 | ||
f0f02d8f | 5 | %define pkgname text-format |
e68c24ae | 6 | Summary: A Ruby port of Text::Format |
9d21782e | 7 | Summary(pl.UTF-8): Port Text::Format dla języka Ruby |
f0f02d8f | 8 | Name: ruby-%{pkgname} |
510eed25 | 9 | Version: 1.0.0 |
0f340f85 | 10 | Release: 4 |
72ad9e96 | 11 | License: GPL |
12 | Group: Development/Libraries | |
510eed25 JR |
13 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
14 | # Source0-md5: 7b08f134e605da252c23afedbb481beb | |
0f340f85 ER |
15 | URL: https://rubygems.org/gems/text-format |
16 | BuildRequires: rpm-rubyprov | |
17 | BuildRequires: rpmbuild(macros) >= 1.665 | |
f0f02d8f | 18 | Provides: ruby-Text-Format |
0f340f85 ER |
19 | Obsoletes: ruby-Text-Format |
20 | BuildArch: noarch | |
72ad9e96 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
e68c24ae JB |
24 | Text::Format provides strong text formatting capabilities to Ruby. |
25 | Based on Perl's Text::Format 0.52, it offers all of the functionality | |
13e756c0 | 26 | of that module and new capabilities besides. |
e68c24ae | 27 | |
292fe192 JR |
28 | %description -l pl.UTF-8 |
29 | Text::Format udostępnia potężne możliwości formatowania tekstu w | |
30 | języku Ruby. Jest oparty na perlowym Text::Format 0.52 i oferuje całą | |
31 | funkcjonalność tego modułu, a przy okazji nowe funkcje. | |
72ad9e96 | 32 | |
510eed25 | 33 | %package rdoc |
b87a0b1d JR |
34 | Summary: HTML documentation for %{pkgname} |
35 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
510eed25 JR |
36 | Group: Documentation |
37 | Requires: ruby >= 1:1.8.7-4 | |
38 | ||
39 | %description rdoc | |
b87a0b1d JR |
40 | HTML documentation for %{pkgname}. |
41 | ||
42 | %description rdoc -l pl.UTF-8 | |
43 | Dokumentacja w formacie HTML dla %{pkgname}. | |
44 | ||
45 | %package ri | |
46 | Summary: ri documentation for %{pkgname} | |
47 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
48 | Group: Documentation | |
49 | Requires: ruby | |
50 | ||
51 | %description ri | |
52 | ri documentation for %{pkgname}. | |
53 | ||
54 | %description ri -l pl.UTF-8 | |
55 | Dokumentacji w formacie ri dla %{pkgname}. | |
510eed25 | 56 | |
72ad9e96 | 57 | %prep |
0f340f85 ER |
58 | %setup -q -n %{pkgname}-%{version} |
59 | # tgz | |
72ad9e96 | 60 | |
61 | %build | |
0f340f85 | 62 | %if %{with doc} |
72ad9e96 | 63 | rdoc --inline-source --op rdoc lib |
64 | rdoc --ri --op ri lib | |
0f340f85 ER |
65 | rm ri/created.rid |
66 | rm ri/cache.ri | |
67 | %endif | |
72ad9e96 | 68 | |
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
0f340f85 ER |
71 | install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
72 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
72ad9e96 | 73 | |
0f340f85 ER |
74 | %if %{with doc} |
75 | install -d $RPM_BUILD_ROOT{%{ruby_ridir},%{ruby_rdocdir}/%{name}-%{version}} | |
dd1a3f5a | 76 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
510eed25 | 77 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} |
0f340f85 | 78 | %endif |
72ad9e96 | 79 | |
80 | %clean | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %files | |
84 | %defattr(644,root,root,755) | |
0f340f85 ER |
85 | %dir %{ruby_vendorlibdir}/text |
86 | %{ruby_vendorlibdir}/text/format.rb | |
87 | %{ruby_vendorlibdir}/text/format | |
510eed25 | 88 | |
0f340f85 | 89 | %if %{with doc} |
510eed25 JR |
90 | %files rdoc |
91 | %defattr(644,root,root,755) | |
92 | %{ruby_rdocdir}/%{name}-%{version} | |
b87a0b1d JR |
93 | |
94 | %files ri | |
95 | %defattr(644,root,root,755) | |
510eed25 | 96 | %{ruby_ridir}/Text |
0f340f85 | 97 | %endif |