]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without doc # skip generating docs (which is time-consuming). Intended for speed up test builds | |
4 | %bcond_without emacs # skip building package with ruby-mode for emacs | |
5 | %bcond_without tk # skip building package with Tk bindings | |
6 | %bcond_without batteries # Don't include rubygems, json or rake | |
7 | # | |
8 | %define ruby_ver 1.9 | |
9 | %define stdlibdoc_version 0.10.1 | |
10 | %define patchlevel 0 | |
11 | %define basever 1.9.2 | |
12 | Summary: Ruby - interpreted scripting language | |
13 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ | |
14 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
15 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
16 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
17 | Name: ruby | |
18 | Version: %{basever}.%{patchlevel} | |
19 | Release: 1 | |
20 | Epoch: 1 | |
21 | License: The Ruby License | |
22 | Group: Development/Languages | |
23 | Source0: ftp://ftp.ruby-lang.org/pub/ruby/%{name}-%{basever}-p%{patchlevel}.tar.bz2 | |
24 | # Source0-md5: d8a02cadf57d2571cd4250e248ea7e4b | |
25 | Source1: http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz | |
26 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 | |
27 | Source2: http://www.ruby-doc.org/download/stdlib/%{name}-doc-stdlib-%{stdlibdoc_version}.tgz | |
28 | # Source2-md5: 5437c281b44e7a4af142d2bd35eba407 | |
29 | Source3: rdoc.1 | |
30 | Source4: testrb.1 | |
31 | Source5: %{name}-mode-init.el | |
32 | Patch0: %{name}-mkmf-shared.patch | |
33 | Patch1: %{name}-lib64.patch | |
34 | URL: http://www.ruby-lang.org/ | |
35 | BuildRequires: autoconf | |
36 | BuildRequires: automake | |
37 | BuildRequires: bison | |
38 | BuildRequires: db-devel | |
39 | %{?with_emacs:BuildRequires: emacs} | |
40 | BuildRequires: gdbm-devel >= 1.8.3 | |
41 | BuildRequires: ncurses-devel | |
42 | BuildRequires: openssl-devel | |
43 | BuildRequires: readline-devel >= 4.2 | |
44 | BuildRequires: ruby-modules | |
45 | BuildRequires: sed >= 4.0 | |
46 | %if %{with tk} | |
47 | BuildRequires: tk-devel | |
48 | %endif | |
49 | Requires(post,postun): /sbin/ldconfig | |
50 | Provides: ruby(ver) = %{ruby_ver} | |
51 | Obsoletes: rdoc | |
52 | Obsoletes: ruby-REXML | |
53 | Obsoletes: ruby-doc < 1.8.4 | |
54 | Obsoletes: ruby-fastthread | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | # bleh, some nasty (gcc or ruby) bug still not fixed | |
58 | # (SEGV or "unexpected break" on miniruby run during build) | |
59 | %define specflags_ia64 -O0 | |
60 | ||
61 | # ruby needs frame pointers for correct exception handling | |
62 | %define specflags_ia32 -fno-omit-frame-pointer | |
63 | ||
64 | %description | |
65 | Ruby is the interpreted scripting language for quick and easy | |
66 | object-oriented programming. It has many features to process text | |
67 | files and to do system management tasks (as in Perl). It is simple, | |
68 | straight-forward, extensible, and portable. | |
69 | ||
70 | This package contains only shared library and ruby interpreter. To get | |
71 | full-functional ruby environment install ruby-modules package. | |
72 | ||
73 | %description -l ja.UTF-8 | |
74 | Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初 | |
75 | から純粋なオブジェクト指向言語として設計されていますから,オブジェクト | |
76 | 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | Ruby to interpretowany język skryptowy, w sam raz dla łatwego i | |
80 | szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji | |
81 | ułatwiających przetwarzanie plików tekstowych i wykonywanie prac | |
82 | związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty, | |
83 | rozszerzalny i przenośny. | |
84 | ||
85 | Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby. | |
86 | Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni | |
87 | funkcjonalnego środowiska ruby. | |
88 | ||
89 | %description -l pt_BR.UTF-8 | |
90 | Ruby é uma linguagem de script interpretada de programação orientada a | |
91 | objeto. Possui diversas características para processamento de texto. É | |
92 | simples, extensível e direta. | |
93 | ||
94 | %package modules | |
95 | Summary: Ruby standard modules and utilities | |
96 | Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby | |
97 | Group: Development/Languages | |
98 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
99 | Provides: ruby-modules(ver) = %{ruby_ver} | |
100 | ||
101 | %description modules | |
102 | Ruby standard modules and utilities: | |
103 | - erb - Tiny eRuby | |
104 | - rdoc - documentation tool for source code | |
105 | - irb - interactive Ruby | |
106 | - ri - Ruby interactive reference | |
107 | - testrb - automatic runner for Test::Unit of Ruby | |
108 | ||
109 | %description modules -l pl.UTF-8 | |
110 | Standardowe moduły i narzędzia Ruby: | |
111 | - erb - mały eRuby | |
112 | - rdoc - narzędzie do dokumentowania kodu źródłowego | |
113 | - irb - interaktywny Ruby | |
114 | - ri - interaktywna dokumentacja Ruby | |
115 | - testrb - automatyczny runner dla Ruby Test::Unit | |
116 | ||
117 | %package tk | |
118 | Summary: Ruby/Tk bindings | |
119 | Summary(pl.UTF-8): Wiązania Ruby/Tk | |
120 | Group: Development/Languages | |
121 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
122 | ||
123 | %description tk | |
124 | This pachage contains Ruby/Tk bindings. | |
125 | ||
126 | %description tk -l pl.UTF-8 | |
127 | Ten pakiet zawiera wiązania Ruby/Tk. | |
128 | ||
129 | %package devel | |
130 | Summary: Ruby development libraries | |
131 | Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby | |
132 | Group: Development/Languages | |
133 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
134 | ||
135 | %description devel | |
136 | Ruby development libraries. | |
137 | ||
138 | %description devel -l pl.UTF-8 | |
139 | Biblioteki programistyczne interpretera języka Ruby. | |
140 | ||
141 | %package static | |
142 | Summary: Ruby static libraries | |
143 | Summary(pl.UTF-8): Biblioteki statyczne Ruby | |
144 | Group: Development/Languages | |
145 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
146 | ||
147 | %description static | |
148 | Ruby static libraries. | |
149 | ||
150 | %description static -l pl.UTF-8 | |
151 | Biblioteki statyczne Ruby. | |
152 | ||
153 | %package doc | |
154 | Summary: Ruby HTML documentation | |
155 | Summary(pl.UTF-8): Dokumentacja HTML do Ruby | |
156 | Group: Documentation | |
157 | ||
158 | %description doc | |
159 | Ruby HTML documentation: FAQ, guide, core and standard library. | |
160 | ||
161 | %description doc -l pl.UTF-8 | |
162 | Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i | |
163 | stdlib. | |
164 | ||
165 | %package doc-ri | |
166 | Summary: Ruby ri documentation | |
167 | Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri | |
168 | Group: Documentation | |
169 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
170 | ||
171 | %description doc-ri | |
172 | Ruby ri documentation. | |
173 | ||
174 | %description doc-ri -l pl.UTF-8 | |
175 | Dokumentacja Ruby w formacie ri. | |
176 | ||
177 | %package examples | |
178 | Summary: Ruby examples | |
179 | Summary(pl.UTF-8): Przykłady dla języka Ruby | |
180 | Group: Development/Languages | |
181 | ||
182 | %description examples | |
183 | Ruby examples. | |
184 | ||
185 | %description examples -l pl.UTF-8 | |
186 | Przykłady programów w języku Ruby. | |
187 | ||
188 | %package emacs-mode | |
189 | Summary: Ruby mode and debugger for Emacs | |
190 | Summary(pl.UTF-8): Tryb Ruby i debugger dla Emacsa | |
191 | Group: Development/Tools | |
192 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
193 | Requires: emacs-common | |
194 | ||
195 | %description emacs-mode | |
196 | Ruby mode and debugger for Emacs. | |
197 | ||
198 | %description emacs-mode -l pl.UTF-8 | |
199 | Tryb Ruby i debugger dla Emacsa. | |
200 | ||
201 | %prep | |
202 | %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 | |
203 | %patch0 -p1 | |
204 | %patch1 -p1 | |
205 | ||
206 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
207 | ||
208 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
209 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
210 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' | |
211 | ||
212 | %build | |
213 | cp -f /usr/share/automake/config.sub . | |
214 | ||
215 | %{__autoconf} | |
216 | %configure \ | |
217 | --enable-shared \ | |
218 | --enable-pthread \ | |
219 | --with-ruby-version=minor | |
220 | ||
221 | %{__make} -j1 | |
222 | ||
223 | %if %{with doc} | |
224 | %{__make} -j1 rdoc | |
225 | %endif | |
226 | ||
227 | %install | |
228 | rm -rf $RPM_BUILD_ROOT | |
229 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} | |
230 | ||
231 | %{__make} install \ | |
232 | DESTDIR=$RPM_BUILD_ROOT | |
233 | ||
234 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
235 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1 | |
236 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1 | |
237 | ||
238 | %if %{without batteries} | |
239 | # packaged separately | |
240 | rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rubygems,rake,json,minitest} | |
241 | rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/*-linux*/json | |
242 | rm $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rake,rubygems,json}.rb | |
243 | rm $RPM_BUILD_ROOT%{_bindir}/{gem,rake} | |
244 | rm $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
245 | rm -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_ver}/system/JSON | |
246 | %endif | |
247 | ||
248 | # ruby emacs mode - borrowed from FC-4 | |
249 | %if %{with emacs} | |
250 | install -d $RPM_BUILD_ROOT%{_emacs_lispdir}/{%{name}-mode,site-start.d} | |
251 | cp -a misc/*.el $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode | |
252 | rm -f $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el* | |
253 | install -p %{SOURCE5} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d | |
254 | cat << 'EOF' > path.el | |
255 | (setq load-path (cons "." load-path) byte-compile-warnings nil) | |
256 | EOF | |
257 | emacs --no-site-file -q -batch -l path.el -f batch-byte-compile $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/*.el | |
258 | rm -f path.el* | |
259 | %endif | |
260 | ||
261 | %clean | |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
264 | %post -p /sbin/ldconfig | |
265 | %postun -p /sbin/ldconfig | |
266 | ||
267 | %files | |
268 | %defattr(644,root,root,755) | |
269 | %doc NEWS LEGAL README README.EXT ChangeLog ToDo | |
270 | %attr(755,root,root) %{_bindir}/ruby | |
271 | %if %{with batteries} | |
272 | %attr(755,root,root) %{_bindir}/gem | |
273 | %attr(755,root,root) %{_bindir}/rake | |
274 | %endif | |
275 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* | |
276 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9 | |
277 | %{_mandir}/man1/ruby.1* | |
278 | %if %{with batteries} | |
279 | %{_mandir}/man1/rake.1* | |
280 | %endif | |
281 | %dir %{_libdir}/%{name} | |
282 | %dir %{_libdir}/%{name}/%{ruby_ver} | |
283 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux* | |
284 | %dir %{_libdir}/%{name}/site_ruby | |
285 | %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver} | |
286 | %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}/*-linux* | |
287 | %dir %{_libdir}/%{name}/vendor_ruby | |
288 | %dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver} | |
289 | %dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}/*-linux* | |
290 | %dir %{_datadir}/ri | |
291 | %dir %{_datadir}/ri/%{ruby_ver} | |
292 | %dir %{_datadir}/ri/%{ruby_ver}/system | |
293 | %dir %{ruby_rdocdir} | |
294 | ||
295 | %files devel | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_libdir}/libruby.so | |
298 | %{_includedir}/%{name}-%{ruby_ver} | |
299 | ||
300 | %files static | |
301 | %defattr(644,root,root,755) | |
302 | %{_libdir}/libruby-static.a | |
303 | ||
304 | %if %{with tk} | |
305 | %files tk | |
306 | %defattr(644,root,root,755) | |
307 | %{_libdir}/%{name}/%{ruby_ver}/tcltk.rb | |
308 | %{_libdir}/%{name}/%{ruby_ver}/tk*.rb | |
309 | %{_libdir}/%{name}/%{ruby_ver}/tk | |
310 | %{_libdir}/%{name}/%{ruby_ver}/tkextlib | |
311 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/t*.so | |
312 | %endif | |
313 | ||
314 | %files modules | |
315 | %defattr(644,root,root,755) | |
316 | %attr(755,root,root) %{_bindir}/erb | |
317 | %attr(755,root,root) %{_bindir}/irb | |
318 | %attr(755,root,root) %{_bindir}/rdoc | |
319 | %attr(755,root,root) %{_bindir}/ri | |
320 | %attr(755,root,root) %{_bindir}/testrb | |
321 | %{_libdir}/%{name}/%{ruby_ver}/bigdecimal | |
322 | %{_libdir}/%{name}/%{ruby_ver}/cgi | |
323 | %{_libdir}/%{name}/%{ruby_ver}/date | |
324 | %{_libdir}/%{name}/%{ruby_ver}/digest | |
325 | %{_libdir}/%{name}/%{ruby_ver}/dl | |
326 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl | |
327 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl/callback.so | |
328 | %{_libdir}/%{name}/%{ruby_ver}/drb | |
329 | %{_libdir}/%{name}/%{ruby_ver}/irb | |
330 | %{_libdir}/%{name}/%{ruby_ver}/minitest | |
331 | %{_libdir}/%{name}/%{ruby_ver}/net | |
332 | %{_libdir}/%{name}/%{ruby_ver}/openssl | |
333 | %{_libdir}/%{name}/%{ruby_ver}/optparse | |
334 | %if %{with batteries} | |
335 | %{_libdir}/%{name}/%{ruby_ver}/json | |
336 | %{_libdir}/%{name}/%{ruby_ver}/rake | |
337 | %{_libdir}/%{name}/%{ruby_ver}/rubygems | |
338 | %endif | |
339 | %{_libdir}/%{name}/%{ruby_ver}/racc | |
340 | %{_libdir}/%{name}/%{ruby_ver}/rbconfig | |
341 | %{_libdir}/%{name}/%{ruby_ver}/rdoc | |
342 | %{_libdir}/%{name}/%{ruby_ver}/rexml | |
343 | %{_libdir}/%{name}/%{ruby_ver}/rinda | |
344 | %{_libdir}/%{name}/%{ruby_ver}/ripper | |
345 | %{_libdir}/%{name}/%{ruby_ver}/rss | |
346 | %{_libdir}/%{name}/%{ruby_ver}/shell | |
347 | %{_libdir}/%{name}/%{ruby_ver}/syck | |
348 | %{_libdir}/%{name}/%{ruby_ver}/test | |
349 | %{_libdir}/%{name}/%{ruby_ver}/uri | |
350 | %{_libdir}/%{name}/%{ruby_ver}/webrick | |
351 | %{_libdir}/%{name}/%{ruby_ver}/xmlrpc | |
352 | %{_libdir}/%{name}/%{ruby_ver}/yaml | |
353 | %{_libdir}/%{name}/%{ruby_ver}/[A-Za-s]*.rb | |
354 | %{_libdir}/%{name}/%{ruby_ver}/tempfile.rb | |
355 | %{_libdir}/%{name}/%{ruby_ver}/thread.rb | |
356 | %{_libdir}/%{name}/%{ruby_ver}/thwait.rb | |
357 | %{_libdir}/%{name}/%{ruby_ver}/time.rb | |
358 | %{_libdir}/%{name}/%{ruby_ver}/timeout.rb | |
359 | %{_libdir}/%{name}/%{ruby_ver}/tmpdir.rb | |
360 | %{_libdir}/%{name}/%{ruby_ver}/tracer.rb | |
361 | %{_libdir}/%{name}/%{ruby_ver}/tsort.rb | |
362 | %{_libdir}/%{name}/%{ruby_ver}/[u-z]*.rb | |
363 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest | |
364 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc | |
365 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans | |
366 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io | |
367 | %if %{with batteries} | |
368 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json | |
369 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json/ext | |
370 | %attr(755,root,root) %{ruby_archdir}/json/ext/*.so | |
371 | %endif | |
372 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn | |
373 | %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc | |
374 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[a-s]*.so | |
375 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[u-z]*.so | |
376 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest/*.so | |
377 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/*.so | |
378 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans/*.so | |
379 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io/*.so | |
380 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn/*.so | |
381 | %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc/*.so | |
382 | %{_libdir}/%{name}/%{ruby_ver}/*-linux*/rbconfig.rb | |
383 | %{_mandir}/man1/erb.1* | |
384 | %{_mandir}/man1/irb.1* | |
385 | %{_mandir}/man1/rdoc.1* | |
386 | %{_mandir}/man1/ri.1* | |
387 | %{_mandir}/man1/testrb.1* | |
388 | %attr(755,root,root) %{ruby_archdir}/dl/callback.so | |
389 | %{_libdir}/ruby/gems/1.9/specifications/minitest.gemspec | |
390 | %{_libdir}/ruby/gems/1.9/specifications/rake.gemspec | |
391 | %{_libdir}/ruby/gems/1.9/specifications/rdoc.gemspec | |
392 | ||
393 | %files doc | |
394 | %defattr(644,root,root,755) | |
395 | %doc ruby-doc-bundle/* | |
396 | %{?with_doc:%doc ruby-doc-stdlib-%{stdlibdoc_version}/stdlib} | |
397 | ||
398 | %if %{with doc} | |
399 | %files doc-ri | |
400 | %defattr(644,root,root,755) | |
401 | %{_datadir}/ri/%{ruby_ver}/system/* | |
402 | %endif | |
403 | ||
404 | %files examples | |
405 | %defattr(644,root,root,755) | |
406 | %{_examplesdir}/%{name}-%{version} | |
407 | ||
408 | %if %{with emacs} | |
409 | %files emacs-mode | |
410 | %defattr(644,root,root,755) | |
411 | %doc misc/* | |
412 | %dir %{_emacs_lispdir}/%{name}-mode | |
413 | %{_emacs_lispdir}/%{name}-mode/*.elc | |
414 | %{_emacs_lispdir}/site-start.d/*.el | |
415 | %endif |