]>
Commit | Line | Data |
---|---|---|
8c07f82b ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # build without ri/rdoc | |
4 | %bcond_without tests # build without tests | |
5 | ||
09deda0a JR |
6 | %define pkgname rake |
7 | Summary: Rake is a Make-like program implemented in Ruby | |
f6c4ace9 | 8 | Summary(pl.UTF-8): Program typu Make dla języka Ruby |
09deda0a | 9 | Name: ruby-%{pkgname} |
8c07f82b ER |
10 | Version: 10.0.4 |
11 | Release: 1 | |
12 | License: MIT | |
09deda0a | 13 | Group: Development/Languages |
8c07f82b ER |
14 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
15 | # Source0-md5: 510fad70ab126fad98aa3707eed7c417 | |
09deda0a | 16 | URL: http://rubyforge.org/projects/rake/ |
8c07f82b ER |
17 | BuildRequires: rpm-rubyprov |
18 | BuildRequires: rpmbuild(macros) >= 1.656 | |
19 | BuildRequires: sed >= 4.0 | |
20 | %if %{with tests} | |
21 | BuildRequires: ruby-minitest | |
22 | %endif | |
a33fc825 | 23 | Requires: ruby-rubygems |
8c07f82b | 24 | BuildArch: noarch |
09deda0a JR |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
09deda0a | 27 | %description |
f6c4ace9 ER |
28 | Rake is a simple Ruby build program with capabilities similar to make. |
29 | It has the following features: | |
30 | - Rakefiles (rake's version of Makefiles) are completely defined in | |
31 | standard Ruby syntax. No XML files to edit. No quirky Makefile syntax | |
32 | to worry about (is that a tab or a space?) | |
33 | - Users can specify tasks with prerequisites. | |
34 | - Rake supports rule patterns to synthesize implicit tasks. | |
35 | - Rake is lightweight. It can be distributed with other projects as a | |
36 | single file. Projects that depend upon rake do not require that rake | |
37 | be installed on target systems. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Rake to prosty program do budowania w języku Ruby o możliwościach | |
41 | podobnych do make. Ma następujące cechy: | |
42 | - Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane | |
43 | całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować | |
44 | plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to | |
45 | tabulacja czy spacja?). | |
46 | - Użytkownicy mogą określać zadania z ich zależnościami. | |
47 | - Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań. | |
48 | - Rake jest lekki. Może być rozpowszechniany z innymi projektami jako | |
49 | pojedynczy plik. Projekty używające rake'a nie wymagają go | |
50 | zainstalowanego na systemach docelowych. | |
09deda0a JR |
51 | |
52 | %package rdoc | |
1b8a4eae JR |
53 | Summary: HTML documentation for %{pkgname} |
54 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
09deda0a JR |
55 | Group: Documentation |
56 | Requires: ruby >= 1:1.8.7-4 | |
57 | ||
58 | %description rdoc | |
1b8a4eae JR |
59 | HTML documentation for %{pkgname}. |
60 | ||
61 | %description rdoc -l pl.UTF-8 | |
62 | Dokumentacja w formacie HTML dla %{pkgname}. | |
63 | ||
64 | %package ri | |
65 | Summary: ri documentation for %{pkgname} | |
66 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
67 | Group: Documentation | |
68 | Requires: ruby | |
69 | ||
70 | %description ri | |
71 | ri documentation for %{pkgname}. | |
72 | ||
73 | %description ri -l pl.UTF-8 | |
74 | Dokumentacji w formacie ri dla %{pkgname}. | |
09deda0a JR |
75 | |
76 | %prep | |
8c07f82b | 77 | %setup -q -n %{pkgname}-%{version} |
09deda0a | 78 | |
8c07f82b | 79 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
4aa7d307 | 80 | |
09deda0a | 81 | %build |
8c07f82b ER |
82 | %if %{with tests} |
83 | ruby -Ilib ./bin/rake test | |
84 | %endif | |
85 | ||
86 | %if %{with doc} | |
09deda0a JR |
87 | rdoc --ri --op ri lib |
88 | rdoc --op rdoc lib | |
8c07f82b ER |
89 | rm ri/created.rid |
90 | rm ri/cache.ri | |
91 | rm -rf ri/{Object,CompositePublisher,FileUtils,Module,Ssh*,String,Sys,Test,Time} | |
92 | %endif | |
09deda0a JR |
93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
8a895b47 | 96 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ruby_rubylibdir}/tasks,%{ruby_ridir},%{ruby_rdocdir}} |
09deda0a JR |
97 | |
98 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
99 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
100 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
101 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
102 | ||
103 | %clean | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
8c07f82b | 108 | %doc CHANGES README.rdoc TODO |
09deda0a | 109 | %attr(755,root,root) %{_bindir}/rake |
8a895b47 | 110 | %dir %{ruby_rubylibdir}/tasks |
09deda0a JR |
111 | %{ruby_rubylibdir}/rake.rb |
112 | %{ruby_rubylibdir}/rake | |
113 | ||
114 | %files rdoc | |
115 | %defattr(644,root,root,755) | |
116 | %{ruby_rdocdir}/%{name}-%{version} | |
1b8a4eae JR |
117 | |
118 | %files ri | |
119 | %defattr(644,root,root,755) | |
09deda0a | 120 | %{ruby_ridir}/Rake* |