]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - include ext/ in docs | |
3 | # - replace ri with fastri | |
4 | # - patch ri to search multiple indexes (one per package), so RPMs can install ri docs | |
5 | # - fix inconsistencies with versioned vs not-versioned dirs (see dirname hacks in configure) | |
6 | # - fix requires/provides 'ruby(abi) = ' | |
7 | # - nil this macro: %ruby_mod_ver_requires_eq "Requires: ruby-modules(ver) = " | |
8 | # - fix tk build | |
9 | # - %ruby_version is empty and rpm error then | |
10 | # - vendor packages get installed to /usr/share/ruby/vendor_ruby/PACKAGE, which | |
11 | # will be installed fine on ruby < 2.0, but not usable as path not in include | |
12 | # path, how to force vendor packages built with ruby 2.0 pull ruby 2.0? | |
13 | # for packages with gem deps it's simple: ruby-listen-2.7.1-0.2.noarch marks ruby-modules-2.0.0.451-0.17.x86_64 (cap /usr/share/gems/specifications) | |
14 | # | |
15 | # Conditional build: | |
16 | %bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds | |
17 | %bcond_without tk # skip building package with Tk bindings | |
18 | %bcond_without batteries # Don't include rubygems, json, rake, minitest | |
19 | %bcond_without default_ruby # use this Ruby as default system Ruby | |
20 | %bcond_with bootstrap # build bootstrap version | |
21 | ||
22 | %define rel 0.18 | |
23 | %define ruby_version 2.0 | |
24 | %define basever 2.0.0 | |
25 | %define patchlevel 481 | |
26 | ||
27 | %define ruby_suffix %{!?with_default_ruby:%{ruby_version}} | |
28 | %define doc_version 2_0_0 | |
29 | ||
30 | %define bigdecimal_ver 1.2.0 | |
31 | %define io_console_ver 0.4.2 | |
32 | %define irb_ver 0.9.6 | |
33 | %define json_ver 1.7.7 | |
34 | %define minitest_ver 4.3.2 | |
35 | %define psych_ver 2.0.0 | |
36 | %define rake_ver 0.9.6 | |
37 | %define rdoc_ver 4.0.0 | |
38 | %define rubygems_ver 2.0.14 | |
39 | %define test_unit_ver 2.0.0.0 | |
40 | ||
41 | %define oname ruby | |
42 | Summary: Ruby - interpreted scripting language | |
43 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ | |
44 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
45 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
46 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
47 | Name: ruby%{ruby_suffix} | |
48 | Version: %{basever}.%{patchlevel} | |
49 | Release: %{rel} | |
50 | Epoch: 1 | |
51 | # Public Domain for example for: include/ruby/st.h, strftime.c, ... | |
52 | License: (Ruby or BSD) and Public Domain | |
53 | Group: Development/Languages | |
54 | Source0: ftp://ftp.ruby-lang.org/pub/ruby/2.0/%{oname}-%{basever}-p%{patchlevel}.tar.bz2 | |
55 | # Source0-md5: ea406a8d415a1a5d8365596d4288f3da | |
56 | Source1: http://www.ruby-doc.org/download/%{oname}-doc-bundle.tar.gz | |
57 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 | |
58 | Source2: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz | |
59 | # Source2-md5: e93307804295a43512cafbf660a4cbe0 | |
60 | Source3: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz | |
61 | # Source3-md5: 900186f317b51edfbb2f5317f8855719 | |
62 | Source100: ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{oname}-1.8.7-p330.tar.gz | |
63 | # Source100-md5: 50a49edb787211598d08e756e733e42e | |
64 | Source4: rdoc.1 | |
65 | Source5: testrb.1 | |
66 | Source6: operating_system.rb | |
67 | Patch0: %{oname}-lib64.patch | |
68 | Patch1: %{oname}-ffs.patch | |
69 | Patch2: fix-bison-invocation.patch | |
70 | # http://redmine.ruby-lang.org/issues/5231 | |
71 | #Patch3: disable-versioned-paths.patch | |
72 | # TODO: Should be submitted upstream? | |
73 | #Patch4: arch-specific-dir.patch | |
74 | # http://redmine.ruby-lang.org/issues/5281 | |
75 | #Patch5: site-and-vendor-arch-flags.patch | |
76 | # Make mkmf verbose by default | |
77 | Patch6: mkmf-verbose.patch | |
78 | Patch7: strip-ccache.patch | |
79 | Patch8: duplicated-paths.patch | |
80 | Patch9: DESTDIR.patch | |
81 | Patch10: empty-ruby-version.patch | |
82 | Patch11: rubygems-2.0.0-binary-extensions.patch | |
83 | Patch12: custom-rubygems-location.patch | |
84 | URL: http://www.ruby-lang.org/ | |
85 | BuildRequires: autoconf >= 2.60 | |
86 | BuildRequires: automake | |
87 | BuildRequires: bison >= 1.875 | |
88 | BuildRequires: db-devel | |
89 | BuildRequires: gdbm-devel >= 1.8.3 | |
90 | BuildRequires: libffi-devel | |
91 | BuildRequires: ncurses-devel | |
92 | BuildRequires: openssl-devel | |
93 | BuildRequires: pkgconfig | |
94 | BuildRequires: readline-devel >= 4.2 | |
95 | BuildRequires: rpm-build >= 5.4.10-49 | |
96 | # bootstrap needs ruby binary, erb module | |
97 | %{!?with_bootstrap:BuildRequires: rpm-rubyprov} | |
98 | %{!?with_bootstrap:BuildRequires: ruby-modules} | |
99 | %{!?with_bootstrap:BuildRequires: ruby} | |
100 | BuildRequires: sed >= 4.0 | |
101 | BuildRequires: yaml-devel | |
102 | %if %{with tk} | |
103 | BuildRequires: tk-devel | |
104 | %endif | |
105 | Requires(post,postun): /sbin/ldconfig | |
106 | Provides: ruby(ver) = %{ruby_version} | |
107 | Obsoletes: ruby-REXML <= 2.4.0-2 | |
108 | Obsoletes: ruby-doc < 1.8.4 | |
109 | Obsoletes: ruby-fastthread <= 0.6.3 | |
110 | Conflicts: rpm-build-macros < 1.692 | |
111 | Conflicts: ruby-activesupport < 2.3.11-2 | |
112 | Conflicts: ruby-activesupport2 < 2.3.11-2 | |
113 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
114 | ||
115 | %define ruby_ridir %{_datadir}/ri/%{ruby_version}/system | |
116 | %define gem_dir %{_datadir}/gems | |
117 | %define gem_libdir %{_libdir}/gems/%{oname} | |
118 | ||
119 | # location where rubygems is installed | |
120 | %define rubygems_dir %{ruby_libdir} | |
121 | ||
122 | %define ruby_archdir %{_libdir}/%{oname}/%{ruby_version} | |
123 | %define ruby_libarchdir %{_libdir}/%{oname}/%{ruby_version} | |
124 | %define ruby_libdir %{_datadir}/%{oname}/%{ruby_version} | |
125 | ||
126 | # This is the local lib/arch and should not be used for packaging. | |
127 | %define sitedir site_ruby | |
128 | %define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{oname}/%{sitedir}/%{ruby_version} | |
129 | %define ruby_sitelibdir %{_prefix}/local/share/%{oname}/%{sitedir} | |
130 | ||
131 | # This is the general location for libs/archs compatible with all | |
132 | # or most of the Ruby versions available in the PLD repositories. | |
133 | %define vendordir vendor_ruby | |
134 | %define ruby_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version} | |
135 | %define ruby_vendorlibdir %{_datadir}/%{oname}/%{vendordir} | |
136 | ||
137 | # TODO: drop legacy loadpaths after all ruby modules rebuilt in Th | |
138 | %define legacy_libdir %{_libdir}/%{oname}/%{ruby_version} | |
139 | %define legacy_archdir %{_libdir}/%{oname}/%{ruby_version}/%{_target_cpu}-linux | |
140 | %define legacy_sitedir %{_libdir}/%{oname}/%{sitedir} | |
141 | %define legacy_sitelibdir %{_libdir}/%{oname}/%{sitedir}/%{ruby_version} | |
142 | %define legacy_sitearchdir %{_libdir}/%{oname}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux | |
143 | %define legacy_vendordir %{_libdir}/%{oname}/%{vendordir} | |
144 | %define legacy_vendorlibdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version} | |
145 | %define legacy_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux | |
146 | ||
147 | %define legacy_siteloadpath %{legacy_sitelibdir}\\0%{legacy_sitearchdir}\\0%{legacy_sitedir} | |
148 | %define legacy_vendorloadpath %{legacy_vendorarchdir} | |
149 | %define legacy_loadpath %{legacy_archdir} | |
150 | %define legacy_loadpaths %{legacy_siteloadpath}\\0%{legacy_vendorloadpath}\\0%{legacy_loadpath} | |
151 | ||
152 | # bleh, some nasty (gcc or ruby) bug still not fixed | |
153 | # (SEGV or "unexpected break" on miniruby run during build) | |
154 | %define specflags_ia64 -O0 | |
155 | ||
156 | # ruby needs frame pointers for correct exception handling | |
157 | %define specflags_ia32 -fno-omit-frame-pointer | |
158 | ||
159 | %description | |
160 | Ruby is the interpreted scripting language for quick and easy | |
161 | object-oriented programming. It has many features to process text | |
162 | files and to do system management tasks (as in Perl). It is simple, | |
163 | straight-forward, extensible, and portable. | |
164 | ||
165 | This package contains only shared library and ruby interpreter. To get | |
166 | full-functional ruby environment install ruby-modules package. | |
167 | ||
168 | %description -l ja.UTF-8 | |
169 | Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初 | |
170 | から純粋なオブジェクト指向言語として設計されていますから,オブジェクト | |
171 | 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です. | |
172 | ||
173 | %description -l pl.UTF-8 | |
174 | Ruby to interpretowany język skryptowy, w sam raz dla łatwego i | |
175 | szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji | |
176 | ułatwiających przetwarzanie plików tekstowych i wykonywanie prac | |
177 | związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty, | |
178 | rozszerzalny i przenośny. | |
179 | ||
180 | Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby. | |
181 | Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni | |
182 | funkcjonalnego środowiska ruby. | |
183 | ||
184 | %description -l pt_BR.UTF-8 | |
185 | Ruby é uma linguagem de script interpretada de programação orientada a | |
186 | objeto. Possui diversas características para processamento de texto. É | |
187 | simples, extensível e direta. | |
188 | ||
189 | %package modules | |
190 | Summary: Ruby standard modules and utilities | |
191 | Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby | |
192 | Group: Development/Languages | |
193 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
194 | Suggests: ruby-rubygems | |
195 | Provides: ruby-bigdecimal = %{bigdecimal_ver} | |
196 | Provides: ruby-io-console = %{io_console_ver} | |
197 | # ruby-modules deprecated, rpm5 generates ruby(abi) itself | |
198 | Provides: ruby-modules(ver) = %{ruby_version} | |
199 | %if %{with batteries} | |
200 | Provides: ruby-minitest = %{minitest_ver} | |
201 | Obsoletes: ruby-minitest <= 1.5.0 | |
202 | %endif | |
203 | # FIXME later | |
204 | Provides: ruby(abi) = %{ruby_version} | |
205 | ||
206 | %description modules | |
207 | Ruby standard modules and utilities: | |
208 | - erb - Tiny eRuby | |
209 | - testrb - automatic runner for Test::Unit of Ruby | |
210 | ||
211 | %description modules -l pl.UTF-8 | |
212 | Standardowe moduły i narzędzia Ruby: | |
213 | - erb - mały eRuby | |
214 | - testrb - automatyczny runner dla Ruby Test::Unit | |
215 | ||
216 | %package tk | |
217 | Summary: Ruby/Tk bindings | |
218 | Summary(pl.UTF-8): Wiązania Ruby/Tk | |
219 | Group: Development/Languages | |
220 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
221 | ||
222 | %description tk | |
223 | This package contains Ruby/Tk bindings. | |
224 | ||
225 | %description tk -l pl.UTF-8 | |
226 | Ten pakiet zawiera wiązania Ruby/Tk. | |
227 | ||
228 | %package devel | |
229 | Summary: Ruby development libraries | |
230 | Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby | |
231 | Group: Development/Languages | |
232 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
233 | Requires: gcc | |
234 | Requires: glibc-devel | |
235 | Requires: pkgconfig | |
236 | ||
237 | %description devel | |
238 | Ruby development libraries. | |
239 | ||
240 | %description devel -l pl.UTF-8 | |
241 | Biblioteki programistyczne interpretera języka Ruby. | |
242 | ||
243 | %package static | |
244 | Summary: Ruby static libraries | |
245 | Summary(pl.UTF-8): Biblioteki statyczne Ruby | |
246 | Group: Development/Languages | |
247 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
248 | ||
249 | %description static | |
250 | Ruby static libraries. | |
251 | ||
252 | %description static -l pl.UTF-8 | |
253 | Biblioteki statyczne Ruby. | |
254 | ||
255 | %package doc | |
256 | Summary: Ruby HTML documentation | |
257 | Summary(pl.UTF-8): Dokumentacja HTML do Ruby | |
258 | Group: Documentation | |
259 | %if "%{_rpmversion}" >= "5" | |
260 | BuildArch: noarch | |
261 | %endif | |
262 | ||
263 | %description doc | |
264 | Ruby HTML documentation: FAQ, guide, core and standard library. | |
265 | ||
266 | %description doc -l pl.UTF-8 | |
267 | Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i | |
268 | stdlib. | |
269 | ||
270 | %package doc-ri | |
271 | Summary: Ruby ri documentation | |
272 | Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri | |
273 | Group: Documentation | |
274 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
275 | %if "%{_rpmversion}" >= "5" | |
276 | BuildArch: noarch | |
277 | %endif | |
278 | ||
279 | %description doc-ri | |
280 | Ruby ri documentation. | |
281 | ||
282 | %description doc-ri -l pl.UTF-8 | |
283 | Dokumentacja Ruby w formacie ri. | |
284 | ||
285 | %package examples | |
286 | Summary: Ruby examples | |
287 | Summary(pl.UTF-8): Przykłady dla języka Ruby | |
288 | Group: Development/Languages | |
289 | %if "%{_rpmversion}" >= "5" | |
290 | BuildArch: noarch | |
291 | %endif | |
292 | ||
293 | %description examples | |
294 | Ruby examples. | |
295 | ||
296 | %description examples -l pl.UTF-8 | |
297 | Przykłady programów w języku Ruby. | |
298 | ||
299 | # IMPORTANT: keep irb, rdoc, rubygems, rake, json as last packages as we reset epoch/version/release | |
300 | # and %{version},%{release} macros may not be used directly as they take last | |
301 | # subpackage value not main package one what you intend to use | |
302 | ||
303 | %package irb | |
304 | Summary: The Interactive Ruby | |
305 | Version: %{irb_ver} | |
306 | Release: %{basever}.%{patchlevel}.%{rel} | |
307 | Epoch: 0 | |
308 | Group: Development/Languages | |
309 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} | |
310 | Provides: irb = %{version}-%{release} | |
311 | Provides: ruby(irb) = %{version}-%{release} | |
312 | %if "%{_rpmversion}" >= "5" | |
313 | BuildArch: noarch | |
314 | %endif | |
315 | ||
316 | %description irb | |
317 | The irb is acronym for Interactive Ruby. It evaluates ruby expression | |
318 | from the terminal. | |
319 | ||
320 | %package rdoc | |
321 | Summary: A tool to generate HTML and command-line documentation for Ruby projects | |
322 | Summary(pl.UTF-8): Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym | |
323 | Version: %{rdoc_ver} | |
324 | Release: %{basever}.%{patchlevel}.%{rel} | |
325 | Epoch: 0 | |
326 | License: GPL v2 and Ruby and MIT | |
327 | Group: Development/Libraries | |
328 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} | |
329 | Obsoletes: rdoc <= 0.9.0 | |
330 | %if "%{_rpmversion}" >= "5" | |
331 | BuildArch: noarch | |
332 | %endif | |
333 | ||
334 | %description rdoc | |
335 | RDoc produces HTML and command-line documentation for Ruby projects. | |
336 | RDoc includes the 'rdoc' and 'ri' tools for generating and displaying | |
337 | online documentation. | |
338 | ||
339 | %description rdoc -l pl.UTF-8 | |
340 | RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku | |
341 | Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i | |
342 | wyświetlania dokumentacji online. | |
343 | ||
344 | %package rubygems | |
345 | Summary: RubyGems - the Ruby standard for packaging Ruby libraries | |
346 | Summary(pl.UTF-8): RubyGems - standard Ruby'ego pakietowania bibliotek | |
347 | Version: %{rubygems_ver} | |
348 | Release: %{basever}.%{patchlevel}.%{rel} | |
349 | Epoch: 0 | |
350 | License: Ruby or MIT | |
351 | Group: Development/Libraries | |
352 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} | |
353 | Requires: %{name}-rdoc >= %{rdoc_ver} | |
354 | Suggests: %{name}-devel | |
355 | Provides: rubygems = %{rubygems_ver} | |
356 | %if "%{_rpmversion}" >= "5" | |
357 | BuildArch: noarch | |
358 | %endif | |
359 | ||
360 | %description rubygems | |
361 | RubyGems is the Ruby standard for publishing and managing third party | |
362 | libraries. | |
363 | ||
364 | %description rubygems -l pl.UTF-8 | |
365 | RubyGems to standardowe narzędzie języka Ruby do publikowania i | |
366 | zarządzania zewnętrznymi bibliotekami. | |
367 | ||
368 | %package rake | |
369 | Summary: Rake is a Make-like program implemented in Ruby | |
370 | Summary(pl.UTF-8): Program typu Make dla języka Ruby | |
371 | Version: %{rake_ver} | |
372 | Release: %{basever}.%{patchlevel}.%{rel} | |
373 | Epoch: 0 | |
374 | License: MIT | |
375 | Group: Development/Languages | |
376 | Provides: rake = %{rake_ver} | |
377 | Conflicts: ruby-modules < 1:1.9.3.429-2 | |
378 | %if "%{_rpmversion}" >= "5" | |
379 | BuildArch: noarch | |
380 | %endif | |
381 | ||
382 | %description rake | |
383 | Rake is a simple Ruby build program with capabilities similar to make. | |
384 | ||
385 | It has the following features: | |
386 | - Rakefiles (rake's version of Makefiles) are completely defined in | |
387 | standard Ruby syntax. No XML files to edit. No quirky Makefile syntax | |
388 | to worry about (is that a tab or a space?) | |
389 | - Users can specify tasks with prerequisites. | |
390 | - Rake supports rule patterns to synthesize implicit tasks. | |
391 | - Rake is lightweight. It can be distributed with other projects as a | |
392 | single file. Projects that depend upon rake do not require that rake | |
393 | be installed on target systems. | |
394 | ||
395 | %description rake -l pl.UTF-8 | |
396 | Rake to prosty program do budowania w języku Ruby o możliwościach | |
397 | podobnych do make. | |
398 | ||
399 | Ma następujące cechy: | |
400 | - Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane | |
401 | całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować | |
402 | plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to | |
403 | tabulacja czy spacja?). | |
404 | - Użytkownicy mogą określać zadania z ich zależnościami. | |
405 | - Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań. | |
406 | - Rake jest lekki. Może być rozpowszechniany z innymi projektami jako | |
407 | pojedynczy plik. Projekty używające rake'a nie wymagają go | |
408 | zainstalowanego na systemach docelowych. | |
409 | ||
410 | %package json | |
411 | Summary: JSON library for Ruby | |
412 | Summary(pl.UTF-8): Biblioteka JSON dla języka Ruby | |
413 | Version: %{json_ver} | |
414 | Release: %{basever}.%{patchlevel}.%{rel} | |
415 | Epoch: 0 | |
416 | License: MIT | |
417 | Group: Development/Languages | |
418 | Obsoletes: ruby-json-rubyforge | |
419 | Conflicts: ruby-modules < 1:1.9.3.429-3 | |
420 | ||
421 | %description json | |
422 | This is a JSON implementation as a Ruby extension in C. | |
423 | ||
424 | %description json -l pl.UTF-8 | |
425 | Biblioteka JSON dla języka Ruby. | |
426 | ||
427 | %prep | |
428 | %if %{with bootstrap} | |
429 | %setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100 | |
430 | %else | |
431 | %setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3 | |
432 | %endif | |
433 | %patch0 -p1 | |
434 | %patch1 -p1 | |
435 | %patch2 -p1 | |
436 | #%patch3 -p1 | |
437 | #%patch4 -p1 | |
438 | #%patch5 -p1 | |
439 | %patch6 -p1 | |
440 | %patch7 -p1 | |
441 | %patch8 -p1 | |
442 | %patch9 -p1 | |
443 | %patch10 -p1 | |
444 | %patch11 -p1 | |
445 | %patch12 -p1 | |
446 | ||
447 | # must be regenerated with new bison | |
448 | %{__rm} parse.{c,h} | |
449 | ||
450 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
451 | ||
452 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
453 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
454 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' | |
455 | ||
456 | %build | |
457 | rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs) | |
458 | if [ $rubygems_ver != %{rubygems_ver} ]; then | |
459 | echo "Set %%define rubygems_ver to $rubygems_ver and re-run." | |
460 | exit 1 | |
461 | fi | |
462 | rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc.rb | xargs) | |
463 | if [ $rdoc_ver != %{rdoc_ver} ]; then | |
464 | echo "Set %%define rdoc_ver to $rdoc_ver and re-run." | |
465 | exit 1 | |
466 | fi | |
467 | ||
468 | cp -f /usr/share/automake/config.sub . | |
469 | ||
470 | # build ruby-1.8.7 first | |
471 | %if %{with bootstrap} | |
472 | cd %{oname}-1.8.7-p330 | |
473 | %configure | |
474 | %{__make} | |
475 | cd .. | |
476 | %endif | |
477 | ||
478 | %{__autoconf} | |
479 | %configure \ | |
480 | %{?with_bootstrap:--with-baseruby=%{oname}-1.8.7-p330/miniruby} \ | |
481 | --program-suffix=%{ruby_suffix} \ | |
482 | --with-rubygemsdir=%{rubygems_dir} \ | |
483 | --with-rubylibprefix=%{ruby_libdir} \ | |
484 | --with-rubyarchprefix=%{ruby_archdir} \ | |
485 | --with-sitedir=%{ruby_sitelibdir} \ | |
486 | --with-sitearchdir=%{ruby_sitearchdir} \ | |
487 | --with-vendordir=%{ruby_vendorlibdir} \ | |
488 | --with-vendorarchdir=%{ruby_vendorarchdir} \ | |
489 | --with-rubyhdrdir=%{_includedir}/%{oname}-%{ruby_version} \ | |
490 | --with-rubyarchhdrdir=%{_includedir}/%{oname}-%{ruby_version} \ | |
491 | --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ | |
492 | --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ | |
493 | --enable-shared \ | |
494 | --enable-pthread \ | |
495 | --enable-multiarch \ | |
496 | --disable-rubygems \ | |
497 | --disable-install-doc \ | |
498 | --with-ruby-version='' | |
499 | ||
500 | %{__make} -j1 main \ | |
501 | COPY="cp -p" Q= \ | |
502 | %{?with_bootstrap:BASERUBY="%{oname}-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"} | |
503 | ||
504 | %if %{with doc} | |
505 | %{__make} -j1 rdoc | |
506 | %endif | |
507 | ||
508 | %install | |
509 | rm -rf $RPM_BUILD_ROOT | |
510 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \ | |
511 | $RPM_BUILD_ROOT%{ruby_vendorarchdir} \ | |
512 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \ | |
513 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/data \ | |
514 | ||
515 | %{__make} install %{?with_doc:install-doc} \ | |
516 | DESTDIR=$RPM_BUILD_ROOT | |
517 | ||
518 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel} | |
519 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel} | |
520 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1 | |
521 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/testrb%{ruby_suffix}.1 | |
522 | ||
523 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html | |
524 | ||
525 | # detect this runtime, "make install" is affected by operating_system.rb what is installed in system! | |
526 | # TODO: use freshly built ruby&rubygems | |
527 | gem_dir=$(ruby -r rubygems -e 'puts Gem.default_dir') | |
528 | ||
529 | # Move gems root into common directory, out of Ruby directory structure. | |
530 | install -d $RPM_BUILD_ROOT%{gem_dir} | |
531 | mv $RPM_BUILD_ROOT${gem_dir}/{gems,specifications} $RPM_BUILD_ROOT%{gem_dir} | |
532 | ||
533 | # Move bundled rubygems to %gem_dir | |
534 | # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems | |
535 | # make symlinks for all packages, so they would work without rubygems | |
536 | # NOTE: when making symlinks, do not symlink paths that could be directories, | |
537 | # as there may came files from other packages as well. actually, unlikely as | |
538 | # the links to got system dir and only ruby may package there (other distro | |
539 | # packages should go to vendo dirs) | |
540 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib | |
541 | mv $RPM_BUILD_ROOT%{ruby_libdir}/rake* $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib | |
542 | ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake $RPM_BUILD_ROOT%{ruby_libdir} | |
543 | ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake.rb $RPM_BUILD_ROOT%{ruby_libdir} | |
544 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rake-%{rake_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
545 | ||
546 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
547 | mv $RPM_BUILD_ROOT%{ruby_libdir}/rdoc* $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
548 | ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc $RPM_BUILD_ROOT%{ruby_libdir} | |
549 | ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc.rb $RPM_BUILD_ROOT%{ruby_libdir} | |
550 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rdoc-%{rdoc_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
551 | ||
552 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib | |
553 | install -d $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
554 | mv $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib | |
555 | mv $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
556 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
557 | ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal | |
558 | ln -s %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so | |
559 | ||
560 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib | |
561 | install -d $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
562 | mv $RPM_BUILD_ROOT%{ruby_libdir}/io $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib | |
563 | mv $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
564 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/io-console-%{io_console_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
565 | ln -s %{gem_dir}/gems/io-console-%{io_console_ver}/lib/io $RPM_BUILD_ROOT%{ruby_libdir}/io | |
566 | ln -s %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so | |
567 | ||
568 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib | |
569 | install -d $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib | |
570 | mv $RPM_BUILD_ROOT%{ruby_libdir}/json* $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib | |
571 | mv $RPM_BUILD_ROOT%{ruby_libarchdir}/json $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib | |
572 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/json-%{json_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
573 | ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json $RPM_BUILD_ROOT%{ruby_libdir}/json | |
574 | ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json.rb $RPM_BUILD_ROOT%{ruby_libdir}/json.rb | |
575 | install -d $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
576 | ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/parser.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
577 | ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/generator.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
578 | ||
579 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/lib | |
580 | mv $RPM_BUILD_ROOT%{ruby_libdir}/minitest $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/lib | |
581 | ln -s %{gem_dir}/gems/minitest-%{minitest_ver}/lib/minitest $RPM_BUILD_ROOT%{ruby_libdir} | |
582 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/minitest-%{minitest_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
583 | ||
584 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/lib | |
585 | install -d $RPM_BUILD_ROOT%{ruby_libdir}/test | |
586 | mv $RPM_BUILD_ROOT%{ruby_libdir}/test/unit $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/lib | |
587 | ln -s %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib/unit $RPM_BUILD_ROOT%{ruby_libdir}/test | |
588 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/test-unit-%{test_unit_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
589 | ||
590 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib | |
591 | install -d $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib | |
592 | mv $RPM_BUILD_ROOT%{ruby_libdir}/psych* $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib | |
593 | mv $RPM_BUILD_ROOT%{ruby_libarchdir}/psych.so $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib/ | |
594 | mv $RPM_BUILD_ROOT%{gem_dir}/specifications/default/psych-%{psych_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
595 | ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych $RPM_BUILD_ROOT%{ruby_libdir}/psych | |
596 | ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych.rb $RPM_BUILD_ROOT%{ruby_libdir}/psych.rb | |
597 | ln -s %{gem_libdir}/psych-%{psych_ver}/lib/psych.so $RPM_BUILD_ROOT%{ruby_archdir}/psych.so | |
598 | ||
599 | # Adjust the gemspec files so that the gems will load properly | |
600 | sed -i '/^end$/ i\ | |
601 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
602 | ||
603 | sed -i '/^end$/ i\ | |
604 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
605 | ||
606 | sed -i '/^end$/ i\ | |
607 | s.require_paths = ["lib"]\ | |
608 | s.extensions = ["bigdecimal.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec | |
609 | ||
610 | sed -i '/^end$/ i\ | |
611 | s.require_paths = ["lib"]\ | |
612 | s.extensions = ["io/console.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
613 | ||
614 | sed -i '/^end$/ i\ | |
615 | s.require_paths = ["lib"]\ | |
616 | s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/json-%{json_ver}.gemspec | |
617 | ||
618 | sed -i '/^end$/ i\ | |
619 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
620 | ||
621 | # Install custom operating_system.rb. | |
622 | install -d $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/defaults | |
623 | cp -p %{SOURCE6} $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/defaults | |
624 | ||
625 | ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake%{ruby_suffix} | |
626 | ||
627 | %if %{without batteries} | |
628 | # packaged separately | |
629 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest} | |
630 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json | |
631 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-* | |
632 | %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{rake,rubygems,json}.rb | |
633 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake} | |
634 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
635 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/{json,minitest,rake}-*.gemspec | |
636 | %{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON} | |
637 | %endif | |
638 | ||
639 | %if %{with doc} | |
640 | # too much .ri | |
641 | #%{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri | |
642 | #%{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid | |
643 | %endif | |
644 | ||
645 | %clean | |
646 | rm -rf $RPM_BUILD_ROOT | |
647 | ||
648 | %post -p /sbin/ldconfig | |
649 | %postun -p /sbin/ldconfig | |
650 | ||
651 | %files | |
652 | %defattr(644,root,root,755) | |
653 | %doc NEWS LEGAL README README.EXT ChangeLog | |
654 | %attr(755,root,root) %{_bindir}/ruby%{ruby_suffix} | |
655 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* | |
656 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.%{ruby_version} | |
657 | %{_mandir}/man1/ruby%{ruby_suffix}.1* | |
658 | ||
659 | %dir %{_libdir}/%{oname} | |
660 | %dir %{_libdir}/%{oname}/%{vendordir} | |
661 | %dir %{_datadir}/%{oname} | |
662 | ||
663 | %dir %{ruby_libdir} | |
664 | %dir %{ruby_archdir} | |
665 | %dir %{ruby_vendorlibdir} | |
666 | %dir %{ruby_vendorarchdir} | |
667 | ||
668 | %dir %{_datadir}/ri | |
669 | %dir %{_datadir}/ri/%{ruby_version} | |
670 | %dir %{ruby_ridir} | |
671 | %dir %{ruby_rdocdir} | |
672 | ||
673 | # common dirs for ruby vendor modules | |
674 | %dir %{ruby_vendorlibdir}/data | |
675 | %dir %{ruby_vendorlibdir}/net | |
676 | ||
677 | %if 0 | |
678 | # legacy dirs. when everything rebuilt in Th not using these dirs. drop them | |
679 | %dir %{legacy_archdir} | |
680 | %dir %{legacy_sitedir} | |
681 | %dir %{legacy_sitelibdir} | |
682 | %dir %{legacy_sitearchdir} | |
683 | %dir %{legacy_vendorarchdir} | |
684 | %dir %{legacy_libdir}/tasks | |
685 | %dir %{legacy_archdir}/racc | |
686 | %endif | |
687 | ||
688 | %files devel | |
689 | %defattr(644,root,root,755) | |
690 | %attr(755,root,root) %{_libdir}/libruby.so | |
691 | %{_includedir}/%{oname}-%{ruby_version} | |
692 | %{_pkgconfigdir}/ruby-%{ruby_version}.pc | |
693 | %{ruby_libdir}/mkmf.rb | |
694 | ||
695 | %files static | |
696 | %defattr(644,root,root,755) | |
697 | %{_libdir}/libruby-static.a | |
698 | ||
699 | %if %{with tk} | |
700 | %files tk | |
701 | %defattr(644,root,root,755) | |
702 | %{ruby_libdir}/tcltk.rb | |
703 | %{ruby_libdir}/tk*.rb | |
704 | %{ruby_libdir}/tk | |
705 | %{ruby_libdir}/tkextlib | |
706 | %attr(755,root,root) %{ruby_archdir}/t*.so | |
707 | %endif | |
708 | ||
709 | %files irb | |
710 | %defattr(644,root,root,755) | |
711 | %attr(755,root,root) %{_bindir}/irb%{ruby_suffix} | |
712 | %{ruby_libdir}/irb.rb | |
713 | %{ruby_libdir}/irb | |
714 | %{_mandir}/man1/irb%{ruby_suffix}.1* | |
715 | ||
716 | %files rdoc | |
717 | %defattr(644,root,root,755) | |
718 | %attr(755,root,root) %{_bindir}/rdoc%{ruby_suffix} | |
719 | %attr(755,root,root) %{_bindir}/ri%{ruby_suffix} | |
720 | %{_mandir}/man1/rdoc%{ruby_suffix}.1* | |
721 | %{ruby_libdir}/rdoc | |
722 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} | |
723 | %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
724 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin | |
725 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc | |
726 | %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
727 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri | |
728 | ||
729 | %if %{with batteries} | |
730 | %files rubygems | |
731 | %defattr(644,root,root,755) | |
732 | %attr(755,root,root) %{_bindir}/gem%{ruby_suffix} | |
733 | %dir %{rubygems_dir} | |
734 | %{rubygems_dir}/rubygems | |
735 | %{rubygems_dir}/rubygems.rb | |
736 | %{rubygems_dir}/ubygems.rb | |
737 | %{rubygems_dir}/rbconfig | |
738 | ||
739 | %files rake | |
740 | %defattr(644,root,root,755) | |
741 | %attr(755,root,root) %{_bindir}/rake%{ruby_suffix} | |
742 | %{_mandir}/man1/rake%{ruby_suffix}.1* | |
743 | %{ruby_libdir}/rake | |
744 | %dir %{gem_dir}/gems/rake-%{rake_ver} | |
745 | %{gem_dir}/gems/rake-%{rake_ver}/lib | |
746 | %dir %{gem_dir}/gems/rake-%{rake_ver}/bin | |
747 | %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake | |
748 | %{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
749 | ||
750 | %files json | |
751 | %defattr(644,root,root,755) | |
752 | %{ruby_libdir}/json | |
753 | %dir %{ruby_archdir}/json | |
754 | %dir %{ruby_archdir}/json/ext | |
755 | %attr(755,root,root) %{ruby_archdir}/json/ext/*.so | |
756 | ||
757 | %dir %{gem_libdir}/json-%{json_ver} | |
758 | %dir %{gem_libdir}/json-%{json_ver}/lib | |
759 | %dir %{gem_libdir}/json-%{json_ver}/lib/json | |
760 | %dir %{gem_libdir}/json-%{json_ver}/lib/json/ext | |
761 | %attr(755,root,root) %{gem_libdir}/json-%{json_ver}/lib/json/ext/generator.so | |
762 | %attr(755,root,root) %{gem_libdir}/json-%{json_ver}/lib/json/ext/parser.so | |
763 | ||
764 | %{gem_dir}/gems/json-%{json_ver} | |
765 | %{gem_dir}/specifications/json-%{json_ver}.gemspec | |
766 | %endif | |
767 | ||
768 | %files modules | |
769 | %defattr(644,root,root,755) | |
770 | %attr(755,root,root) %{_bindir}/erb%{ruby_suffix} | |
771 | %{ruby_libdir}/cgi | |
772 | %{ruby_libdir}/date | |
773 | %{ruby_libdir}/digest | |
774 | %{ruby_libdir}/dl | |
775 | %{ruby_libdir}/drb | |
776 | %{ruby_libdir}/fiddle | |
777 | %{ruby_libdir}/io | |
778 | %{ruby_libdir}/matrix | |
779 | %{ruby_libdir}/net | |
780 | %{ruby_libdir}/openssl | |
781 | %{ruby_libdir}/optparse | |
782 | %{ruby_libdir}/racc | |
783 | %{ruby_libdir}/rbconfig | |
784 | %{ruby_libdir}/rexml | |
785 | %{ruby_libdir}/rinda | |
786 | %{ruby_libdir}/ripper | |
787 | %{ruby_libdir}/rss | |
788 | %{ruby_libdir}/shell | |
789 | #%{ruby_libdir}/syck | |
790 | %{ruby_libdir}/syslog | |
791 | %{ruby_libdir}/test | |
792 | %{ruby_libdir}/uri | |
793 | %{ruby_libdir}/webrick | |
794 | %{ruby_libdir}/xmlrpc | |
795 | %{ruby_libdir}/yaml | |
796 | %{ruby_libdir}/[A-Za-s]*.rb | |
797 | %{ruby_libdir}/tempfile.rb | |
798 | %{ruby_libdir}/thread.rb | |
799 | %{ruby_libdir}/thwait.rb | |
800 | %{ruby_libdir}/time.rb | |
801 | %{ruby_libdir}/timeout.rb | |
802 | %{ruby_libdir}/tmpdir.rb | |
803 | %{ruby_libdir}/tracer.rb | |
804 | %{ruby_libdir}/tsort.rb | |
805 | %{ruby_libdir}/[u-z]*.rb | |
806 | %if %{with batteries} | |
807 | %exclude %{ruby_libdir}/rubygems.rb | |
808 | %exclude %{ruby_libdir}/ubygems.rb | |
809 | %exclude %{ruby_libdir}/rbconfig/datadir.rb | |
810 | %exclude %{ruby_libdir}/rbconfig/obsolete.rb | |
811 | %endif | |
812 | %exclude %{ruby_libdir}/irb.rb | |
813 | %exclude %{ruby_libdir}/mkmf.rb | |
814 | %attr(755,root,root) %{ruby_archdir}/[a-s]*.so | |
815 | %attr(755,root,root) %{ruby_archdir}/[u-z]*.so | |
816 | %dir %{ruby_archdir}/digest | |
817 | %attr(755,root,root) %{ruby_archdir}/digest/*.so | |
818 | %dir %{ruby_archdir}/dl | |
819 | %attr(755,root,root) %{ruby_archdir}/dl/callback.so | |
820 | %dir %{ruby_archdir}/enc | |
821 | %attr(755,root,root) %{ruby_archdir}/enc/*.so | |
822 | %dir %{ruby_archdir}/enc/trans | |
823 | %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so | |
824 | %dir %{ruby_archdir}/io | |
825 | %attr(755,root,root) %{ruby_archdir}/io/*.so | |
826 | %dir %{ruby_archdir}/mathn | |
827 | %attr(755,root,root) %{ruby_archdir}/mathn/*.so | |
828 | %dir %{ruby_archdir}/racc | |
829 | %attr(755,root,root) %{ruby_archdir}/racc/*.so | |
830 | %{ruby_archdir}/rbconfig.rb | |
831 | ||
832 | # bigdecimal | |
833 | %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec | |
834 | %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver} | |
835 | %dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver} | |
836 | %dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
837 | %attr(755,root,root) %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so | |
838 | %{ruby_libdir}/bigdecimal | |
839 | ||
840 | %dir %{_libdir}/gems | |
841 | %dir %{_libdir}/gems/%{oname} | |
842 | ||
843 | # io-console | |
844 | %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
845 | %{gem_dir}/gems/io-console-%{io_console_ver} | |
846 | %dir %{gem_libdir}/io-console-%{io_console_ver} | |
847 | %dir %{gem_libdir}/io-console-%{io_console_ver}/lib | |
848 | %dir %{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
849 | %attr(755,root,root) %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so | |
850 | ||
851 | %if %{with batteries} | |
852 | # minitest | |
853 | %{ruby_libdir}/minitest | |
854 | %{gem_dir}/gems/minitest-%{minitest_ver} | |
855 | %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
856 | %endif | |
857 | ||
858 | %{gem_dir}/specifications/psych-%{psych_ver}.gemspec | |
859 | %{gem_dir}/gems/psych-%{psych_ver} | |
860 | %{ruby_libdir}/psych | |
861 | %dir %{gem_libdir}/psych-%{psych_ver} | |
862 | %dir %{gem_libdir}/psych-%{psych_ver}/lib | |
863 | %attr(755,root,root) %{gem_libdir}/psych-%{psych_ver}/lib/psych.so | |
864 | ||
865 | # test-unit | |
866 | %{gem_dir}/specifications/test-unit-%{test_unit_ver}.gemspec | |
867 | %dir %{gem_dir}/gems/test-unit-%{test_unit_ver} | |
868 | %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib | |
869 | %dir %{gem_dir}/gems/test-unit-%{test_unit_ver}/bin | |
870 | %attr(755,root,root) %{gem_dir}/gems/test-unit-%{test_unit_ver}/bin/testrb | |
871 | %attr(755,root,root) %{_bindir}/testrb%{ruby_suffix} | |
872 | %{_mandir}/man1/testrb%{ruby_suffix}.1* | |
873 | ||
874 | %dir %{gem_dir} | |
875 | %dir %{gem_dir}/gems | |
876 | %dir %{gem_dir}/specifications | |
877 | %dir %{gem_dir}/specifications/default | |
878 | %{_mandir}/man1/erb%{ruby_suffix}.1* | |
879 | %{_mandir}/man1/ri%{ruby_suffix}.1* | |
880 | ||
881 | %files doc | |
882 | %defattr(644,root,root,755) | |
883 | %doc ruby-doc-bundle/* | |
884 | %{?with_doc:%doc ruby_%{doc_version}_stdlib} | |
885 | %{?with_doc:%doc ruby_%{doc_version}_core} | |
886 | ||
887 | %if %{with doc} | |
888 | %files doc-ri | |
889 | %defattr(644,root,root,755) | |
890 | %{ruby_ridir}/* | |
891 | %endif | |
892 | ||
893 | %files examples | |
894 | %defattr(644,root,root,755) | |
895 | %{_examplesdir}/%{oname}-* |