]>
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 | # | |
6 | # Conditional build: | |
7 | %bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds | |
8 | %bcond_with tk # Tk bindings | |
9 | %bcond_without batteries # Don't include rubygems, json, rake, minitest | |
10 | %bcond_without default_ruby # use this Ruby as default system Ruby | |
11 | %bcond_with bootstrap # build bootstrap version | |
12 | %bcond_with tests # build without tests | |
13 | ||
14 | # prevent some weird build error: | |
15 | # readlink: unrecognized option '--library=pthread' | |
16 | %define debug 1 | |
17 | ||
18 | %define rel 0.1 | |
19 | %define ruby_version 2.2 | |
20 | %define basever 2.2 | |
21 | %define patchlevel 5 | |
22 | %define pkg_version %{basever}.%{patchlevel} | |
23 | ||
24 | %define ruby_suffix %{!?with_default_ruby:%{ruby_version}} | |
25 | %define doc_version 2_2_5 | |
26 | ||
27 | %define bigdecimal_ver 1.2.6 | |
28 | %define io_console_ver 0.4.3 | |
29 | %define irb_ver 0.9.6 | |
30 | %define json_ver 1.8.1 | |
31 | %define minitest_ver 5.4.3 | |
32 | %define psych_ver 2.0.8 | |
33 | %define rake_ver 10.4.2 | |
34 | %define rdoc_ver 4.2.0 | |
35 | %define rubygems_ver 2.4.5.1 | |
36 | %define test_unit_ver 3.0.8 | |
37 | %define power_assert_ver 0.2.2 | |
38 | ||
39 | %define oname ruby | |
40 | Summary: Ruby - interpreted scripting language | |
41 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ | |
42 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
43 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
44 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
45 | Name: ruby%{ruby_suffix} | |
46 | Version: %{pkg_version} | |
47 | Release: %{rel} | |
48 | Epoch: 1 | |
49 | # Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... | |
50 | # MIT and CCO: ccan/* | |
51 | # zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c | |
52 | # UCD: some of enc/trans/**/*.src | |
53 | License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD | |
54 | Group: Development/Languages | |
55 | # https://www.ruby-lang.org/en/downloads/ | |
56 | Source0: https://ftp.ruby-lang.org/pub/ruby/2.2/%{oname}-%{pkg_version}.tar.xz | |
57 | # Source0-md5: 4b9506c37e908b5b17215b66b2760438 | |
58 | Source1: http://www.ruby-doc.org/download/%{oname}-doc-bundle.tar.gz | |
59 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 | |
60 | Source2: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz | |
61 | # Source2-md5: ac3d547e5ea9ef5a89be161cd967a5e8 | |
62 | Source3: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz | |
63 | # Source3-md5: 12f6b7a5e923fbae0f768d3cf760e88e | |
64 | Source100: ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{oname}-1.8.7-p330.tar.gz | |
65 | # Source100-md5: 50a49edb787211598d08e756e733e42e | |
66 | Source4: rdoc.1 | |
67 | Source5: testrb.1 | |
68 | Source6: operating_system.rb | |
69 | Patch0: %{oname}-lib64.patch | |
70 | #Patch1: %{oname}-ffs.patch | |
71 | Patch2: fix-bison-invocation.patch | |
72 | Patch3: mkmf-verbose.patch | |
73 | Patch4: strip-ccache.patch | |
74 | Patch5: ruby-version.patch | |
75 | Patch6: duplicated-paths.patch | |
76 | # obsolete? | |
77 | Patch8: rubygems-2.0.0-binary-extensions.patch | |
78 | Patch9: custom-rubygems-location.patch | |
79 | Patch12: archlibdir.patch | |
80 | URL: http://www.ruby-lang.org/ | |
81 | BuildRequires: autoconf >= 2.67 | |
82 | BuildRequires: automake | |
83 | BuildRequires: bison >= 1.875 | |
84 | BuildRequires: db-devel | |
85 | BuildRequires: gdbm-devel >= 1.8.3 | |
86 | BuildRequires: gmp-devel | |
87 | BuildRequires: libffi-devel | |
88 | BuildRequires: ncurses-devel | |
89 | BuildRequires: openssl-devel >= 0.9.6 | |
90 | BuildRequires: pkgconfig | |
91 | BuildRequires: readline-devel >= 4.2 | |
92 | BuildRequires: rpm-build >= 5.4.10-49 | |
93 | BuildRequires: sed >= 4.0 | |
94 | BuildRequires: systemtap-sdt-devel | |
95 | BuildRequires: tar >= 1:1.22 | |
96 | BuildRequires: xz | |
97 | BuildRequires: yaml-devel | |
98 | BuildRequires: zlib-devel | |
99 | %if %{without bootstrap} | |
100 | # bootstrap needs ruby binary, erb module | |
101 | BuildRequires: rpm-rubyprov | |
102 | BuildRequires: ruby | |
103 | BuildRequires: ruby-modules | |
104 | %endif | |
105 | %if %{with tk} | |
106 | BuildRequires: tk-devel < 8.7 | |
107 | BuildRequires: tk-devel >= 8.4 | |
108 | %endif | |
109 | Requires(post,postun): /sbin/ldconfig | |
110 | Provides: ruby(ver) = %{ruby_version} | |
111 | Obsoletes: ruby-REXML <= 2.4.0-2 | |
112 | Obsoletes: ruby-doc < 1.8.4 | |
113 | Obsoletes: ruby-fastthread <= 0.6.3 | |
114 | Conflicts: rpm-build-macros < 1.695 | |
115 | Conflicts: ruby-activesupport < 2.3.11-2 | |
116 | Conflicts: ruby-activesupport2 < 2.3.11-2 | |
117 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
118 | ||
119 | %define ruby_ridir %{_datadir}/ri/system | |
120 | %define gem_dir %{_datadir}/gems | |
121 | %define gem_libdir %{_libdir}/gems/%{oname} | |
122 | ||
123 | # location where rubygems is installed | |
124 | %define rubygems_dir %{ruby_libdir} | |
125 | ||
126 | %define ruby_archdir %{_libdir}/%{oname}/%{ruby_version} | |
127 | %define ruby_libarchdir %{_libdir}/%{oname}/%{ruby_version} | |
128 | %define ruby_libdir %{_datadir}/%{oname}/%{ruby_version} | |
129 | ||
130 | # This is the local lib/arch and should not be used for packaging. | |
131 | %define sitedir site_ruby | |
132 | %define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{oname}/%{sitedir}/%{ruby_version} | |
133 | %define ruby_sitelibdir %{_prefix}/local/share/%{oname}/%{sitedir} | |
134 | ||
135 | # This is the general location for libs/archs compatible with all | |
136 | # or most of the Ruby versions available in the PLD repositories. | |
137 | %define vendordir vendor_ruby | |
138 | %define ruby_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version} | |
139 | %define ruby_vendorlibdir %{_datadir}/%{oname}/%{vendordir} | |
140 | ||
141 | # bleh, some nasty (gcc or ruby) bug still not fixed | |
142 | # (SEGV or "unexpected break" on miniruby run during build) | |
143 | %define specflags_ia64 -O0 | |
144 | ||
145 | # ruby needs frame pointers for correct exception handling | |
146 | %define specflags_ia32 -fno-omit-frame-pointer | |
147 | ||
148 | %description | |
149 | Ruby is the interpreted scripting language for quick and easy | |
150 | object-oriented programming. It has many features to process text | |
151 | files and to do system management tasks (as in Perl). It is simple, | |
152 | straight-forward, extensible, and portable. | |
153 | ||
154 | This package contains only shared library and ruby interpreter. To get | |
155 | full-functional ruby environment install ruby-modules package. | |
156 | ||
157 | %description -l ja.UTF-8 | |
158 | Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初 | |
159 | から純粋なオブジェクト指向言語として設計されていますから,オブジェクト | |
160 | 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です. | |
161 | ||
162 | %description -l pl.UTF-8 | |
163 | Ruby to interpretowany język skryptowy, w sam raz dla łatwego i | |
164 | szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji | |
165 | ułatwiających przetwarzanie plików tekstowych i wykonywanie prac | |
166 | związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty, | |
167 | rozszerzalny i przenośny. | |
168 | ||
169 | Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby. | |
170 | Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni | |
171 | funkcjonalnego środowiska ruby. | |
172 | ||
173 | %description -l pt_BR.UTF-8 | |
174 | Ruby é uma linguagem de script interpretada de programação orientada a | |
175 | objeto. Possui diversas características para processamento de texto. É | |
176 | simples, extensível e direta. | |
177 | ||
178 | %package modules | |
179 | Summary: Ruby standard modules and utilities | |
180 | Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby | |
181 | Group: Development/Languages | |
182 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
183 | Suggests: ruby-rubygems | |
184 | Provides: ruby-bigdecimal = %{bigdecimal_ver} | |
185 | Provides: ruby-io-console = %{io_console_ver} | |
186 | # ruby-modules deprecated, rpm5 generates ruby(abi) itself | |
187 | Provides: ruby-modules(ver) = %{ruby_version} | |
188 | # FIXME later | |
189 | Provides: ruby(abi) = %{ruby_version} | |
190 | %requires_ge_to openssl openssl-devel | |
191 | ||
192 | %description modules | |
193 | Ruby standard modules and utilities: | |
194 | - erb - Tiny eRuby | |
195 | - testrb - automatic runner for Test::Unit of Ruby | |
196 | ||
197 | %description modules -l pl.UTF-8 | |
198 | Standardowe moduły i narzędzia Ruby: | |
199 | - erb - mały eRuby | |
200 | - testrb - automatyczny runner dla Ruby Test::Unit | |
201 | ||
202 | %package tk | |
203 | Summary: Ruby/Tk bindings | |
204 | Summary(pl.UTF-8): Wiązania Ruby/Tk | |
205 | Group: Development/Languages | |
206 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
207 | ||
208 | %description tk | |
209 | This package contains Ruby/Tk bindings. | |
210 | ||
211 | %description tk -l pl.UTF-8 | |
212 | Ten pakiet zawiera wiązania Ruby/Tk. | |
213 | ||
214 | %package devel | |
215 | Summary: Ruby development libraries | |
216 | Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby | |
217 | Group: Development/Languages | |
218 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
219 | Requires: gcc | |
220 | Requires: glibc-devel | |
221 | Requires: pkgconfig | |
222 | ||
223 | %description devel | |
224 | Ruby development libraries. | |
225 | ||
226 | %description devel -l pl.UTF-8 | |
227 | Biblioteki programistyczne interpretera języka Ruby. | |
228 | ||
229 | %package static | |
230 | Summary: Ruby static libraries | |
231 | Summary(pl.UTF-8): Biblioteki statyczne Ruby | |
232 | Group: Development/Languages | |
233 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
234 | ||
235 | %description static | |
236 | Ruby static libraries. | |
237 | ||
238 | %description static -l pl.UTF-8 | |
239 | Biblioteki statyczne Ruby. | |
240 | ||
241 | %package doc | |
242 | Summary: Ruby HTML documentation | |
243 | Summary(pl.UTF-8): Dokumentacja HTML do Ruby | |
244 | Group: Documentation | |
245 | %if "%{_rpmversion}" >= "5" | |
246 | BuildArch: noarch | |
247 | %endif | |
248 | ||
249 | %description doc | |
250 | Ruby HTML documentation: FAQ, guide, core and standard library. | |
251 | ||
252 | %description doc -l pl.UTF-8 | |
253 | Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i | |
254 | stdlib. | |
255 | ||
256 | %package doc-ri | |
257 | Summary: Ruby ri documentation | |
258 | Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri | |
259 | Group: Documentation | |
260 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
261 | %if "%{_rpmversion}" >= "5" | |
262 | BuildArch: noarch | |
263 | %endif | |
264 | ||
265 | %description doc-ri | |
266 | Ruby ri documentation. | |
267 | ||
268 | %description doc-ri -l pl.UTF-8 | |
269 | Dokumentacja Ruby w formacie ri. | |
270 | ||
271 | %package examples | |
272 | Summary: Ruby examples | |
273 | Summary(pl.UTF-8): Przykłady dla języka Ruby | |
274 | Group: Development/Languages | |
275 | %if "%{_rpmversion}" >= "5" | |
276 | BuildArch: noarch | |
277 | %endif | |
278 | ||
279 | %description examples | |
280 | Ruby examples. | |
281 | ||
282 | %description examples -l pl.UTF-8 | |
283 | Przykłady programów w języku Ruby. | |
284 | ||
285 | # IMPORTANT: keep irb, rdoc, rubygems, rake, json as last packages as we reset epoch/version/release | |
286 | # and %{version},%{release} macros may not be used directly as they take last | |
287 | # subpackage value not main package one what you intend to use | |
288 | ||
289 | %package irb | |
290 | Summary: The Interactive Ruby | |
291 | Version: %{irb_ver} | |
292 | Release: %{pkg_version}.%{rel} | |
293 | Epoch: 0 | |
294 | Group: Development/Languages | |
295 | Requires: %{name}-modules = 1:%{pkg_version}-%{rel} | |
296 | Provides: irb = %{version}-%{release} | |
297 | Provides: ruby(irb) = %{version}-%{release} | |
298 | %if "%{_rpmversion}" >= "5" | |
299 | BuildArch: noarch | |
300 | %endif | |
301 | ||
302 | %description irb | |
303 | The irb is acronym for Interactive Ruby. It evaluates ruby expression | |
304 | from the terminal. | |
305 | ||
306 | %package rdoc | |
307 | Summary: A tool to generate HTML and command-line documentation for Ruby projects | |
308 | Summary(pl.UTF-8): Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym | |
309 | Version: %{rdoc_ver} | |
310 | Release: %{pkg_version}.%{rel} | |
311 | Epoch: 0 | |
312 | # SIL: lib/rdoc/generator/template/darkfish/css/fonts.css | |
313 | License: GPLv2 and Ruby and MIT and SIL | |
314 | Group: Development/Libraries | |
315 | Requires: %{name}-irb >= %{irb_ver} | |
316 | Requires: %{name}-json >= %{json_ver} | |
317 | Requires: %{name}-modules = 1:%{pkg_version}-%{rel} | |
318 | Obsoletes: rdoc <= 0.9.0 | |
319 | %if "%{_rpmversion}" >= "5" | |
320 | BuildArch: noarch | |
321 | %endif | |
322 | ||
323 | %description rdoc | |
324 | RDoc produces HTML and command-line documentation for Ruby projects. | |
325 | RDoc includes the 'rdoc' and 'ri' tools for generating and displaying | |
326 | online documentation. | |
327 | ||
328 | %description rdoc -l pl.UTF-8 | |
329 | RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku | |
330 | Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i | |
331 | wyświetlania dokumentacji online. | |
332 | ||
333 | %package rubygems | |
334 | Summary: RubyGems - the Ruby standard for packaging Ruby libraries | |
335 | Summary(pl.UTF-8): RubyGems - standard Ruby'ego pakietowania bibliotek | |
336 | Version: %{rubygems_ver} | |
337 | Release: %{pkg_version}.%{rel} | |
338 | Epoch: 0 | |
339 | License: Ruby or MIT | |
340 | Group: Development/Libraries | |
341 | Requires: %{name}-modules = 1:%{pkg_version}-%{rel} | |
342 | Requires: %{name}-rdoc >= %{rdoc_ver} | |
343 | Suggests: %{name}-devel | |
344 | Provides: rubygems = %{rubygems_ver} | |
345 | %if "%{_rpmversion}" >= "5" | |
346 | BuildArch: noarch | |
347 | %endif | |
348 | ||
349 | %description rubygems | |
350 | RubyGems is the Ruby standard for publishing and managing third party | |
351 | libraries. | |
352 | ||
353 | %description rubygems -l pl.UTF-8 | |
354 | RubyGems to standardowe narzędzie języka Ruby do publikowania i | |
355 | zarządzania zewnętrznymi bibliotekami. | |
356 | ||
357 | %package rake | |
358 | Summary: Rake is a Make-like program implemented in Ruby | |
359 | Summary(pl.UTF-8): Program typu Make dla języka Ruby | |
360 | Version: %{rake_ver} | |
361 | Release: %{pkg_version}.%{rel} | |
362 | Epoch: 0 | |
363 | License: MIT | |
364 | Group: Development/Languages | |
365 | Provides: rake = %{rake_ver} | |
366 | Conflicts: ruby-modules < 1:1.9.3.429-2 | |
367 | %if "%{_rpmversion}" >= "5" | |
368 | BuildArch: noarch | |
369 | %endif | |
370 | ||
371 | %description rake | |
372 | Rake is a simple Ruby build program with capabilities similar to make. | |
373 | ||
374 | It has the following features: | |
375 | - Rakefiles (rake's version of Makefiles) are completely defined in | |
376 | standard Ruby syntax. No XML files to edit. No quirky Makefile syntax | |
377 | to worry about (is that a tab or a space?) | |
378 | - Users can specify tasks with prerequisites. | |
379 | - Rake supports rule patterns to synthesize implicit tasks. | |
380 | - Rake is lightweight. It can be distributed with other projects as a | |
381 | single file. Projects that depend upon rake do not require that rake | |
382 | be installed on target systems. | |
383 | ||
384 | %description rake -l pl.UTF-8 | |
385 | Rake to prosty program do budowania w języku Ruby o możliwościach | |
386 | podobnych do make. | |
387 | ||
388 | Ma następujące cechy: | |
389 | - Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane | |
390 | całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować | |
391 | plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to | |
392 | tabulacja czy spacja?). | |
393 | - Użytkownicy mogą określać zadania z ich zależnościami. | |
394 | - Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań. | |
395 | - Rake jest lekki. Może być rozpowszechniany z innymi projektami jako | |
396 | pojedynczy plik. Projekty używające rake'a nie wymagają go | |
397 | zainstalowanego na systemach docelowych. | |
398 | ||
399 | %package json | |
400 | Summary: JSON library for Ruby | |
401 | Summary(pl.UTF-8): Biblioteka JSON dla języka Ruby | |
402 | Version: %{json_ver} | |
403 | Release: %{pkg_version}.%{rel} | |
404 | Epoch: 0 | |
405 | # UCD: ext/json/generator/generator.c | |
406 | License: (Ruby or GPLv2) and UCD | |
407 | Group: Development/Languages | |
408 | Obsoletes: ruby-json-rubyforge | |
409 | Conflicts: ruby-modules < 1:1.9.3.429-3 | |
410 | ||
411 | %description json | |
412 | This is a JSON implementation as a Ruby extension in C. | |
413 | ||
414 | %description json -l pl.UTF-8 | |
415 | Biblioteka JSON dla języka Ruby. | |
416 | ||
417 | %package minitest | |
418 | Summary: Minitest provides a complete suite of testing facilities | |
419 | Version: %{minitest_ver} | |
420 | Release: %{pkg_version}.%{rel} | |
421 | Epoch: 0 | |
422 | License: MIT | |
423 | Group: Development/Libraries | |
424 | %if "%{_rpmversion}" >= "5" | |
425 | BuildArch: noarch | |
426 | %endif | |
427 | ||
428 | %description minitest | |
429 | minitest/unit is a small and incredibly fast unit testing framework. | |
430 | ||
431 | minitest/spec is a functionally complete spec engine. | |
432 | ||
433 | minitest/benchmark is an awesome way to assert the performance of your | |
434 | algorithms in a repeatable manner. | |
435 | ||
436 | minitest/mock by Steven Baker, is a beautifully tiny mock object | |
437 | framework. | |
438 | ||
439 | minitest/pride shows pride in testing and adds coloring to your test | |
440 | output. | |
441 | ||
442 | %package power_assert | |
443 | # The Summary/Description fields are rather poor. | |
444 | # https://github.com/k-tsj/power_assert/issues/3 | |
445 | Summary: Power Assert for Ruby | |
446 | Version: %{power_assert_ver} | |
447 | Release: %{pkg_version}.%{rel} | |
448 | Epoch: 0 | |
449 | License: Ruby or BSD | |
450 | Group: Development/Libraries | |
451 | %if "%{_rpmversion}" >= "5" | |
452 | BuildArch: noarch | |
453 | %endif | |
454 | ||
455 | %description power_assert | |
456 | Power Assert for Ruby. | |
457 | ||
458 | %package test-unit | |
459 | # The Summary/Description fields are rather poor. | |
460 | # https://github.com/test-unit/test-unit/issues/73 | |
461 | Summary: Improved version of Test::Unit bundled in Ruby 1.8.x | |
462 | Version: %{test_unit_ver} | |
463 | Release: %{pkg_version}.%{rel} | |
464 | Epoch: 0 | |
465 | Group: Development/Libraries | |
466 | # lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. | |
467 | # lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. | |
468 | License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) | |
469 | %if "%{_rpmversion}" >= "5" | |
470 | BuildArch: noarch | |
471 | %endif | |
472 | ||
473 | %description test-unit | |
474 | Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby | |
475 | 1.8.x had not been improved but unbundled Test::Unit (test-unit) is | |
476 | improved actively. | |
477 | ||
478 | %prep | |
479 | %setup -q -n %{oname}-%{pkg_version} -a1 -a2 -a3 %{?with_bootstrap:-a100} | |
480 | %patch0 -p1 | |
481 | #%patch1 -p1 | |
482 | %patch2 -p1 | |
483 | %patch3 -p1 | |
484 | %patch4 -p1 | |
485 | #%patch5 -p1 | |
486 | %patch6 -p1 | |
487 | #%patch8 -p1 | |
488 | %patch9 -p1 | |
489 | %patch12 -p1 | |
490 | ||
491 | # must be regenerated with new bison | |
492 | %{__rm} parse.{c,h} | |
493 | ||
494 | # Remove bundled libraries to be sure they are not used. | |
495 | %{__rm} -r ext/psych/yaml | |
496 | %{__rm} -r ext/fiddle/libffi* | |
497 | ||
498 | # Install custom operating_system.rb. | |
499 | install -d lib/rubygems/defaults | |
500 | cp -p %{SOURCE6} lib/rubygems/defaults | |
501 | ||
502 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
503 | ||
504 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
505 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
506 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' | |
507 | ||
508 | # no configure option to disable, so just rm | |
509 | %{!?with_tk:rm -rf ext/tk} | |
510 | ||
511 | %build | |
512 | rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs) | |
513 | if [ $rubygems_ver != %{rubygems_ver} ]; then | |
514 | echo "Set %%define rubygems_ver to $rubygems_ver and re-run." | |
515 | exit 1 | |
516 | fi | |
517 | rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc.rb | xargs) | |
518 | if [ $rdoc_ver != %{rdoc_ver} ]; then | |
519 | echo "Set %%define rdoc_ver to $rdoc_ver and re-run." | |
520 | exit 1 | |
521 | fi | |
522 | ||
523 | cp -f /usr/share/automake/config.sub . | |
524 | ||
525 | # build ruby-1.8.7 first | |
526 | %if %{with bootstrap} | |
527 | cd %{oname}-1.8.7-p330 | |
528 | %configure | |
529 | %{__make} | |
530 | cd .. | |
531 | %endif | |
532 | ||
533 | %{__autoconf} | |
534 | %configure \ | |
535 | %{?with_bootstrap:--with-baseruby=%{oname}-1.8.7-p330/miniruby} \ | |
536 | --program-suffix=%{ruby_suffix} \ | |
537 | --with-archlibdir=%{_libdir} \ | |
538 | --with-rubygemsdir=%{rubygems_dir} \ | |
539 | --with-rubylibprefix=%{ruby_libdir} \ | |
540 | --with-rubyarchprefix=%{ruby_archdir} \ | |
541 | --with-sitedir=%{ruby_sitelibdir} \ | |
542 | --with-sitearchdir=%{ruby_sitearchdir} \ | |
543 | --with-vendordir=%{ruby_vendorlibdir} \ | |
544 | --with-vendorarchdir=%{ruby_vendorarchdir} \ | |
545 | --with-rubyhdrdir=%{_includedir}/%{oname}-%{ruby_version} \ | |
546 | --with-rubyarchhdrdir=%{_includedir}/%{oname}-%{ruby_version} \ | |
547 | --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ | |
548 | --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ | |
549 | --enable-multiarch \ | |
550 | --enable-pthread \ | |
551 | --enable-shared \ | |
552 | --disable-install-doc \ | |
553 | --disable-rubygems \ | |
554 | --with-ruby-version='' \ | |
555 | ||
556 | %{__make} -j1 main \ | |
557 | COPY="cp -p" Q= \ | |
558 | %{?with_bootstrap:BASERUBY="%{oname}-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"} | |
559 | ||
560 | %if %{with doc} | |
561 | %{__make} -j1 rdoc | |
562 | %endif | |
563 | ||
564 | %if %{with tests} | |
565 | # unset these, as testsuite does "git commit" somewhere, which points to pld .spec repo. doh | |
566 | unset GIT_DIR GIT_WORK_TREE | |
567 | ||
568 | unset GIT | |
569 | DISABLE_TESTS="" | |
570 | ||
571 | %ifarch armv7l armv7hl armv7hnl | |
572 | # test_call_double(DL::TestDL) fails on ARM HardFP | |
573 | # http://bugs.ruby-lang.org/issues/6592 | |
574 | DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" | |
575 | %endif | |
576 | ||
577 | # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, | |
578 | # when abrt.rb cannot be required (seems to be easier way then customizing | |
579 | # the test suite). | |
580 | touch abrt.rb | |
581 | ||
582 | # TestSignal#test_hup_me hangs up the test suite. | |
583 | # http://bugs.ruby-lang.org/issues/8997 | |
584 | sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb | |
585 | ||
586 | # Fix "Could not find 'minitest'" error. | |
587 | # http://bugs.ruby-lang.org/issues/9259 | |
588 | sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb | |
589 | ||
590 | # Segmentation fault. | |
591 | # https://bugs.ruby-lang.org/issues/9198 | |
592 | sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb | |
593 | ||
594 | # Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode | |
595 | # not allowed" error. | |
596 | # https://bugs.ruby-lang.org/issues/10229 | |
597 | sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \ | |
598 | next if /wrap/ =~ name' test/openssl/test_cipher.rb | |
599 | ||
600 | # Test is broken due to SSLv3 disabled in Fedora. | |
601 | # https://bugs.ruby-lang.org/issues/10046 | |
602 | sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb | |
603 | ||
604 | %{__make} check TESTS="-v $DISABLE_TESTS" | |
605 | %endif | |
606 | ||
607 | %install | |
608 | rm -rf $RPM_BUILD_ROOT | |
609 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \ | |
610 | $RPM_BUILD_ROOT%{ruby_vendorarchdir} \ | |
611 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \ | |
612 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/data \ | |
613 | ||
614 | %{__make} install %{?with_doc:install-doc -j1} \ | |
615 | DESTDIR=$RPM_BUILD_ROOT | |
616 | ||
617 | # Version is empty if --with-ruby-version is specified. | |
618 | # http://bugs.ruby-lang.org/issues/7807 | |
619 | sed -i -e 's/Version: \${ruby_version}/Version: %{ruby_version}/' $RPM_BUILD_ROOT%{_pkgconfigdir}/%{oname}-%{ruby_version}.pc | |
620 | ||
621 | # Kill bundled certificates, as they should be part of ca-certificates. | |
622 | for cert in \ | |
623 | Class3PublicPrimaryCertificationAuthority.pem \ | |
624 | DigiCertHighAssuranceEVRootCA.pem \ | |
625 | EntrustnetSecureServerCertificationAuthority.pem \ | |
626 | GeoTrustGlobalCA.pem \ | |
627 | AddTrustExternalCARoot.pem \ | |
628 | AddTrustExternalCARoot-2048.pem \ | |
629 | ; do | |
630 | %{__rm} $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/ssl_certs/$cert | |
631 | done | |
632 | ||
633 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version} | |
634 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version} | |
635 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1 | |
636 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/testrb%{ruby_suffix}.1 | |
637 | ||
638 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html | |
639 | ||
640 | # detect this runtime, "make install" is affected by operating_system.rb what is installed in system! | |
641 | gem_dir=$(./miniruby -Ilib -I. -I.ext/common ./tool/runruby.rb -- --disable-gems -r$(basename *-linux*-fake.rb .rb) -r rubygems -e 'puts Gem.default_dir') | |
642 | ||
643 | # Move gems root into common directory, out of Ruby directory structure. | |
644 | install -d $RPM_BUILD_ROOT%{gem_dir} | |
645 | %{__mv} $RPM_BUILD_ROOT${gem_dir}/{gems,specifications} $RPM_BUILD_ROOT%{gem_dir} | |
646 | ||
647 | # Move bundled rubygems to %gem_dir | |
648 | # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems | |
649 | # make symlinks for all packages, so they would work without rubygems | |
650 | # NOTE: when making symlinks, do not symlink paths that could be directories, | |
651 | # as there may came files from other packages as well. actually, unlikely as | |
652 | # the links to got system dir and only ruby may package there (other distro | |
653 | # packages should go to vendor dirs) | |
654 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib | |
655 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/rake* $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib | |
656 | ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake $RPM_BUILD_ROOT%{ruby_libdir} | |
657 | ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake.rb $RPM_BUILD_ROOT%{ruby_libdir} | |
658 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rake-%{rake_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
659 | ||
660 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
661 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/rdoc* $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
662 | ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc $RPM_BUILD_ROOT%{ruby_libdir} | |
663 | ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc.rb $RPM_BUILD_ROOT%{ruby_libdir} | |
664 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rdoc-%{rdoc_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
665 | ||
666 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib | |
667 | install -d $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
668 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib | |
669 | %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
670 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
671 | ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal | |
672 | ln -s %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so | |
673 | ||
674 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib | |
675 | install -d $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
676 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/io $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib | |
677 | %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
678 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/io-console-%{io_console_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
679 | ln -s %{gem_dir}/gems/io-console-%{io_console_ver}/lib/io $RPM_BUILD_ROOT%{ruby_libdir}/io | |
680 | ln -s %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so | |
681 | ||
682 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib | |
683 | install -d $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib | |
684 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/json* $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib | |
685 | %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/json $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib | |
686 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/json-%{json_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
687 | ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json $RPM_BUILD_ROOT%{ruby_libdir}/json | |
688 | ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json.rb $RPM_BUILD_ROOT%{ruby_libdir}/json.rb | |
689 | install -d $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
690 | ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/parser.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
691 | ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/generator.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext | |
692 | ||
693 | ln -s %{gem_dir}/gems/minitest-%{minitest_ver}/lib/minitest $RPM_BUILD_ROOT%{ruby_libdir} | |
694 | ||
695 | install -d $RPM_BUILD_ROOT%{ruby_libdir}/test | |
696 | ln -s %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib/unit $RPM_BUILD_ROOT%{ruby_libdir}/test | |
697 | ||
698 | install -d $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib | |
699 | install -d $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib | |
700 | %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/psych* $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib | |
701 | %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/psych.so $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib/ | |
702 | %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/psych-%{psych_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications | |
703 | ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych $RPM_BUILD_ROOT%{ruby_libdir}/psych | |
704 | ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych.rb $RPM_BUILD_ROOT%{ruby_libdir}/psych.rb | |
705 | ln -s %{gem_libdir}/psych-%{psych_ver}/lib/psych.so $RPM_BUILD_ROOT%{ruby_archdir}/psych.so | |
706 | ||
707 | # Adjust the gemspec files so that the gems will load properly | |
708 | sed -i '/^end$/ i\ | |
709 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
710 | ||
711 | sed -i '/^end$/ i\ | |
712 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
713 | ||
714 | sed -i '/^end$/ i\ | |
715 | s.require_paths = ["lib"]\ | |
716 | s.extensions = ["bigdecimal.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec | |
717 | ||
718 | sed -i '/^end$/ i\ | |
719 | s.require_paths = ["lib"]\ | |
720 | s.extensions = ["io/console.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
721 | ||
722 | sed -i '/^end$/ i\ | |
723 | s.require_paths = ["lib"]\ | |
724 | s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/json-%{json_ver}.gemspec | |
725 | ||
726 | sed -i '/^end$/ i\ | |
727 | s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
728 | ||
729 | # Push the .gemspecs through the RubyGems to let them write the stub headers. | |
730 | # This speeds up loading of libraries and avoids warnings in Spring: | |
731 | # https://github.com/rubygems/rubygems/pull/694 | |
732 | for s in rake-%{rake_ver}.gemspec rdoc-%{rdoc_ver}.gemspec json-%{json_ver}.gemspec; do | |
733 | s="$RPM_BUILD_ROOT%{gem_dir}/specifications/$s" | |
734 | %{__make} runruby TESTRUN_SCRIPT="-rubygems \ | |
735 | -e \"spec = Gem::Specification.load('$s')\" \ | |
736 | -e \"File.write '$s', spec.to_ruby\"" | |
737 | done | |
738 | ||
739 | ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake%{ruby_suffix} | |
740 | ||
741 | %{__sed} -i -e '1s,/usr/bin/env ruby,/usr/bin/ruby,' \ | |
742 | $RPM_BUILD_ROOT%{ruby_libdir}/abbrev.rb \ | |
743 | $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/bin/rake \ | |
744 | $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc \ | |
745 | $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri \ | |
746 | $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{cal,test,time,uumerge}.rb \ | |
747 | $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{drb,logger,openssl,ripper,rss}/*.rb \ | |
748 | $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/webrick/*.cgi | |
749 | ||
750 | # gem non library files | |
751 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/test | |
752 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/{[A-Z]*,.??*,design_rationale.rb} | |
753 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/{doc,sample,test} | |
754 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/[A-Z]* | |
755 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/power_assert-%{power_assert_ver}/test | |
756 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/gems/power_assert-%{power_assert_ver}/{[A-Z]*,.??*,power_assert.gemspec} | |
757 | ||
758 | %if %{without batteries} | |
759 | # packaged separately | |
760 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest} | |
761 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json | |
762 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-* | |
763 | %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{rake,rubygems,json}.rb | |
764 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake} | |
765 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
766 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/{json,minitest,rake}-*.gemspec | |
767 | %{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON} | |
768 | %endif | |
769 | ||
770 | %if %{with doc} | |
771 | # too much .ri | |
772 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri | |
773 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid | |
774 | %endif | |
775 | ||
776 | %clean | |
777 | rm -rf $RPM_BUILD_ROOT | |
778 | ||
779 | %post -p /sbin/ldconfig | |
780 | %postun -p /sbin/ldconfig | |
781 | ||
782 | %files | |
783 | %defattr(644,root,root,755) | |
784 | %doc NEWS LEGAL BSDL README.md README.EXT ChangeLog | |
785 | %attr(755,root,root) %{_bindir}/ruby%{ruby_suffix} | |
786 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* | |
787 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.%{ruby_version} | |
788 | %{_mandir}/man1/ruby%{ruby_suffix}.1* | |
789 | ||
790 | %dir %{_libdir}/%{oname} | |
791 | %dir %{_libdir}/%{oname}/%{vendordir} | |
792 | %dir %{_datadir}/%{oname} | |
793 | ||
794 | %dir %{ruby_libdir} | |
795 | %dir %{ruby_archdir} | |
796 | %dir %{ruby_vendorlibdir} | |
797 | %dir %{ruby_vendorarchdir} | |
798 | ||
799 | %dir %{dirname:%{ruby_ridir}} | |
800 | %dir %{ruby_ridir} | |
801 | %dir %{ruby_rdocdir} | |
802 | ||
803 | # common dirs for ruby vendor modules | |
804 | %dir %{ruby_vendorlibdir}/data | |
805 | %dir %{ruby_vendorlibdir}/net | |
806 | ||
807 | %files devel | |
808 | %defattr(644,root,root,755) | |
809 | %attr(755,root,root) %{_libdir}/libruby.so | |
810 | %{_includedir}/%{oname}-%{ruby_version} | |
811 | %{_pkgconfigdir}/%{oname}-%{ruby_version}.pc | |
812 | %{ruby_libdir}/mkmf.rb | |
813 | ||
814 | %files static | |
815 | %defattr(644,root,root,755) | |
816 | %{_libdir}/libruby-static.a | |
817 | ||
818 | %if %{with tk} | |
819 | %files tk | |
820 | %defattr(644,root,root,755) | |
821 | %doc ext/tk/{ChangeLog.tkextlib,MANUAL_tcltklib.eng,README.fork} | |
822 | %lang(ja) %doc ext/tk/MANUAL_tcltklib.ja | |
823 | %{ruby_libdir}/multi-tk.rb | |
824 | %{ruby_libdir}/remote-tk.rb | |
825 | %{ruby_libdir}/tcltk.rb | |
826 | %{ruby_libdir}/tk*.rb | |
827 | %{ruby_libdir}/tk | |
828 | %{ruby_libdir}/tkextlib | |
829 | %attr(755,root,root) %{ruby_archdir}/tcltklib.so | |
830 | %attr(755,root,root) %{ruby_archdir}/tkutil.so | |
831 | %endif | |
832 | ||
833 | %files irb | |
834 | %defattr(644,root,root,755) | |
835 | %attr(755,root,root) %{_bindir}/irb%{ruby_suffix} | |
836 | %{ruby_libdir}/irb.rb | |
837 | %{ruby_libdir}/irb | |
838 | %{_mandir}/man1/irb%{ruby_suffix}.1* | |
839 | ||
840 | %files rdoc | |
841 | %defattr(644,root,root,755) | |
842 | %attr(755,root,root) %{_bindir}/rdoc%{ruby_suffix} | |
843 | %attr(755,root,root) %{_bindir}/ri%{ruby_suffix} | |
844 | %{_mandir}/man1/rdoc%{ruby_suffix}.1* | |
845 | %{ruby_libdir}/rdoc | |
846 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} | |
847 | %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib | |
848 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin | |
849 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc | |
850 | %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
851 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri | |
852 | ||
853 | %if %{with batteries} | |
854 | %files rubygems | |
855 | %defattr(644,root,root,755) | |
856 | %attr(755,root,root) %{_bindir}/gem%{ruby_suffix} | |
857 | %{rubygems_dir}/rubygems | |
858 | %{rubygems_dir}/rubygems.rb | |
859 | %{rubygems_dir}/ubygems.rb | |
860 | %{rubygems_dir}/rbconfig | |
861 | ||
862 | %files rake | |
863 | %defattr(644,root,root,755) | |
864 | %attr(755,root,root) %{_bindir}/rake%{ruby_suffix} | |
865 | %{_mandir}/man1/rake%{ruby_suffix}.1* | |
866 | %{ruby_libdir}/rake | |
867 | %{ruby_libdir}/rake.rb | |
868 | %dir %{gem_dir}/gems/rake-%{rake_ver} | |
869 | %{gem_dir}/gems/rake-%{rake_ver}/lib | |
870 | %dir %{gem_dir}/gems/rake-%{rake_ver}/bin | |
871 | %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake | |
872 | %{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
873 | ||
874 | %files json | |
875 | %defattr(644,root,root,755) | |
876 | %{ruby_libdir}/json | |
877 | %dir %{ruby_archdir}/json | |
878 | %dir %{ruby_archdir}/json/ext | |
879 | %attr(755,root,root) %{ruby_archdir}/json/ext/*.so | |
880 | ||
881 | %dir %{gem_libdir}/json-%{json_ver} | |
882 | %dir %{gem_libdir}/json-%{json_ver}/lib | |
883 | %dir %{gem_libdir}/json-%{json_ver}/lib/json | |
884 | %dir %{gem_libdir}/json-%{json_ver}/lib/json/ext | |
885 | %attr(755,root,root) %{gem_libdir}/json-%{json_ver}/lib/json/ext/generator.so | |
886 | %attr(755,root,root) %{gem_libdir}/json-%{json_ver}/lib/json/ext/parser.so | |
887 | ||
888 | %{gem_dir}/gems/json-%{json_ver} | |
889 | %{gem_dir}/specifications/json-%{json_ver}.gemspec | |
890 | %endif | |
891 | ||
892 | %files power_assert | |
893 | %defattr(644,root,root,755) | |
894 | %dir %{gem_dir}/gems/power_assert-%{power_assert_ver} | |
895 | %{gem_dir}/gems/power_assert-%{power_assert_ver}/lib | |
896 | %{gem_dir}/specifications/power_assert-%{power_assert_ver}.gemspec | |
897 | ||
898 | %files minitest | |
899 | %defattr(644,root,root,755) | |
900 | %{ruby_libdir}/minitest | |
901 | %{gem_dir}/gems/minitest-%{minitest_ver} | |
902 | %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
903 | ||
904 | %files test-unit | |
905 | %defattr(644,root,root,755) | |
906 | %dir %{gem_dir}/gems/test-unit-%{test_unit_ver} | |
907 | %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib | |
908 | %{gem_dir}/specifications/test-unit-%{test_unit_ver}.gemspec | |
909 | %{_mandir}/man1/testrb%{ruby_suffix}.1* | |
910 | ||
911 | %files modules | |
912 | %defattr(644,root,root,755) | |
913 | %attr(755,root,root) %{_bindir}/erb%{ruby_suffix} | |
914 | %{ruby_libdir}/cgi | |
915 | #%{ruby_libdir}/date | |
916 | %{ruby_libdir}/digest | |
917 | #%{ruby_libdir}/dl | |
918 | %{ruby_libdir}/drb | |
919 | %{ruby_libdir}/fiddle | |
920 | %{ruby_libdir}/io | |
921 | %{ruby_libdir}/matrix | |
922 | %{ruby_libdir}/net | |
923 | %{ruby_libdir}/openssl | |
924 | %{ruby_libdir}/optparse | |
925 | %{ruby_libdir}/racc | |
926 | %{ruby_libdir}/rbconfig | |
927 | %{ruby_libdir}/rexml | |
928 | %{ruby_libdir}/rinda | |
929 | %{ruby_libdir}/ripper | |
930 | %{ruby_libdir}/rss | |
931 | %{ruby_libdir}/shell | |
932 | %{ruby_libdir}/syslog | |
933 | %{ruby_libdir}/test | |
934 | %{ruby_libdir}/uri | |
935 | %{ruby_libdir}/webrick | |
936 | %{ruby_libdir}/xmlrpc | |
937 | %{ruby_libdir}/yaml | |
938 | ||
939 | %{ruby_libdir}/English.rb | |
940 | %{ruby_libdir}/abbrev.rb | |
941 | %{ruby_libdir}/base64.rb | |
942 | %{ruby_libdir}/benchmark.rb | |
943 | %{ruby_libdir}/cgi.rb | |
944 | %{ruby_libdir}/cmath.rb | |
945 | #%{ruby_libdir}/complex.rb | |
946 | %{ruby_libdir}/csv.rb | |
947 | %{ruby_libdir}/date.rb | |
948 | %{ruby_libdir}/debug.rb | |
949 | %{ruby_libdir}/delegate.rb | |
950 | %{ruby_libdir}/digest.rb | |
951 | #%{ruby_libdir}/dl.rb | |
952 | %{ruby_libdir}/drb.rb | |
953 | %{ruby_libdir}/e2mmap.rb | |
954 | %{ruby_libdir}/erb.rb | |
955 | %{ruby_libdir}/expect.rb | |
956 | %{ruby_libdir}/fiddle.rb | |
957 | %{ruby_libdir}/fileutils.rb | |
958 | %{ruby_libdir}/find.rb | |
959 | %{ruby_libdir}/forwardable.rb | |
960 | %{ruby_libdir}/getoptlong.rb | |
961 | #%{ruby_libdir}/gserver.rb | |
962 | %{ruby_libdir}/ipaddr.rb | |
963 | %{ruby_libdir}/json.rb | |
964 | %{ruby_libdir}/kconv.rb | |
965 | %{ruby_libdir}/logger.rb | |
966 | %{ruby_libdir}/mathn.rb | |
967 | %{ruby_libdir}/matrix.rb | |
968 | %{ruby_libdir}/monitor.rb | |
969 | %{ruby_libdir}/mutex_m.rb | |
970 | %{ruby_libdir}/observer.rb | |
971 | %{ruby_libdir}/open-uri.rb | |
972 | %{ruby_libdir}/open3.rb | |
973 | %{ruby_libdir}/openssl.rb | |
974 | %{ruby_libdir}/optparse.rb | |
975 | %{ruby_libdir}/ostruct.rb | |
976 | %{ruby_libdir}/pathname.rb | |
977 | %{ruby_libdir}/pp.rb | |
978 | %{ruby_libdir}/prettyprint.rb | |
979 | %{ruby_libdir}/prime.rb | |
980 | %{ruby_libdir}/profile.rb | |
981 | %{ruby_libdir}/profiler.rb | |
982 | %{ruby_libdir}/pstore.rb | |
983 | %{ruby_libdir}/psych.rb | |
984 | #%{ruby_libdir}/rational.rb | |
985 | %{ruby_libdir}/rdoc.rb | |
986 | %{ruby_libdir}/resolv-replace.rb | |
987 | %{ruby_libdir}/resolv.rb | |
988 | %{ruby_libdir}/ripper.rb | |
989 | %{ruby_libdir}/rss.rb | |
990 | %{ruby_libdir}/scanf.rb | |
991 | %{ruby_libdir}/securerandom.rb | |
992 | %{ruby_libdir}/set.rb | |
993 | %{ruby_libdir}/shell.rb | |
994 | %{ruby_libdir}/shellwords.rb | |
995 | %{ruby_libdir}/singleton.rb | |
996 | %{ruby_libdir}/socket.rb | |
997 | %{ruby_libdir}/sync.rb | |
998 | %{ruby_libdir}/tempfile.rb | |
999 | %{ruby_libdir}/thwait.rb | |
1000 | %{ruby_libdir}/time.rb | |
1001 | %{ruby_libdir}/timeout.rb | |
1002 | %{ruby_libdir}/tmpdir.rb | |
1003 | %{ruby_libdir}/tracer.rb | |
1004 | %{ruby_libdir}/tsort.rb | |
1005 | %{ruby_libdir}/un.rb | |
1006 | %{ruby_libdir}/uri.rb | |
1007 | %{ruby_libdir}/weakref.rb | |
1008 | %{ruby_libdir}/webrick.rb | |
1009 | %{ruby_libdir}/xmlrpc.rb | |
1010 | %{ruby_libdir}/yaml.rb | |
1011 | ||
1012 | %if %{with batteries} | |
1013 | %exclude %{ruby_libdir}/rubygems.rb | |
1014 | %exclude %{ruby_libdir}/ubygems.rb | |
1015 | %exclude %{ruby_libdir}/rbconfig/datadir.rb | |
1016 | #%exclude %{ruby_libdir}/rbconfig/obsolete.rb | |
1017 | %endif | |
1018 | %exclude %{ruby_libdir}/irb.rb | |
1019 | %exclude %{ruby_libdir}/mkmf.rb | |
1020 | %exclude %{ruby_libdir}/rake.rb | |
1021 | ||
1022 | %{ruby_archdir}/rbconfig.rb | |
1023 | %attr(755,root,root) %{ruby_archdir}/bigdecimal.so | |
1024 | %attr(755,root,root) %{ruby_archdir}/continuation.so | |
1025 | %attr(755,root,root) %{ruby_archdir}/coverage.so | |
1026 | %attr(755,root,root) %{ruby_archdir}/date_core.so | |
1027 | %attr(755,root,root) %{ruby_archdir}/dbm.so | |
1028 | %attr(755,root,root) %{ruby_archdir}/digest.so | |
1029 | #%attr(755,root,root) %{ruby_archdir}/dl.so | |
1030 | %attr(755,root,root) %{ruby_archdir}/etc.so | |
1031 | %attr(755,root,root) %{ruby_archdir}/fcntl.so | |
1032 | %attr(755,root,root) %{ruby_archdir}/fiber.so | |
1033 | %attr(755,root,root) %{ruby_archdir}/fiddle.so | |
1034 | %attr(755,root,root) %{ruby_archdir}/gdbm.so | |
1035 | %attr(755,root,root) %{ruby_archdir}/nkf.so | |
1036 | %attr(755,root,root) %{ruby_archdir}/objspace.so | |
1037 | %attr(755,root,root) %{ruby_archdir}/openssl.so | |
1038 | %attr(755,root,root) %{ruby_archdir}/pathname.so | |
1039 | %attr(755,root,root) %{ruby_archdir}/psych.so | |
1040 | %attr(755,root,root) %{ruby_archdir}/pty.so | |
1041 | %attr(755,root,root) %{ruby_archdir}/readline.so | |
1042 | %attr(755,root,root) %{ruby_archdir}/ripper.so | |
1043 | %attr(755,root,root) %{ruby_archdir}/thread.so | |
1044 | %attr(755,root,root) %{ruby_archdir}/sdbm.so | |
1045 | %attr(755,root,root) %{ruby_archdir}/socket.so | |
1046 | %attr(755,root,root) %{ruby_archdir}/stringio.so | |
1047 | %attr(755,root,root) %{ruby_archdir}/strscan.so | |
1048 | %attr(755,root,root) %{ruby_archdir}/syslog.so | |
1049 | %attr(755,root,root) %{ruby_archdir}/zlib.so | |
1050 | ||
1051 | %dir %{ruby_archdir}/digest | |
1052 | %attr(755,root,root) %{ruby_archdir}/digest/*.so | |
1053 | #%dir %{ruby_archdir}/dl | |
1054 | #%attr(755,root,root) %{ruby_archdir}/dl/callback.so | |
1055 | %dir %{ruby_archdir}/enc | |
1056 | %attr(755,root,root) %{ruby_archdir}/enc/*.so | |
1057 | %dir %{ruby_archdir}/enc/trans | |
1058 | %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so | |
1059 | %dir %{ruby_archdir}/io | |
1060 | %attr(755,root,root) %{ruby_archdir}/io/*.so | |
1061 | %dir %{ruby_archdir}/mathn | |
1062 | %attr(755,root,root) %{ruby_archdir}/mathn/*.so | |
1063 | %dir %{ruby_archdir}/racc | |
1064 | %attr(755,root,root) %{ruby_archdir}/racc/*.so | |
1065 | %dir %{ruby_archdir}/rbconfig | |
1066 | %attr(755,root,root) %{ruby_archdir}/rbconfig/sizeof.so | |
1067 | ||
1068 | # bigdecimal | |
1069 | %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec | |
1070 | %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver} | |
1071 | %dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver} | |
1072 | %dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib | |
1073 | %attr(755,root,root) %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so | |
1074 | %{ruby_libdir}/bigdecimal | |
1075 | ||
1076 | %dir %{_libdir}/gems | |
1077 | %dir %{_libdir}/gems/%{oname} | |
1078 | ||
1079 | # io-console | |
1080 | %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
1081 | %{gem_dir}/gems/io-console-%{io_console_ver} | |
1082 | %dir %{gem_libdir}/io-console-%{io_console_ver} | |
1083 | %dir %{gem_libdir}/io-console-%{io_console_ver}/lib | |
1084 | %dir %{gem_libdir}/io-console-%{io_console_ver}/lib/io | |
1085 | %attr(755,root,root) %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so | |
1086 | ||
1087 | %{gem_dir}/specifications/psych-%{psych_ver}.gemspec | |
1088 | %{gem_dir}/gems/psych-%{psych_ver} | |
1089 | %{ruby_libdir}/psych | |
1090 | %dir %{gem_libdir}/psych-%{psych_ver} | |
1091 | %dir %{gem_libdir}/psych-%{psych_ver}/lib | |
1092 | %attr(755,root,root) %{gem_libdir}/psych-%{psych_ver}/lib/psych.so | |
1093 | ||
1094 | %dir %{gem_dir} | |
1095 | %dir %{gem_dir}/gems | |
1096 | %dir %{gem_dir}/specifications | |
1097 | %dir %{gem_dir}/specifications/default | |
1098 | %{_mandir}/man1/erb%{ruby_suffix}.1* | |
1099 | %{_mandir}/man1/ri%{ruby_suffix}.1* | |
1100 | ||
1101 | %files doc | |
1102 | %defattr(644,root,root,755) | |
1103 | %doc ruby-doc-bundle/* | |
1104 | %{?with_doc:%doc ruby_%{doc_version}_stdlib} | |
1105 | %{?with_doc:%doc ruby_%{doc_version}_core} | |
1106 | ||
1107 | %if %{with doc} | |
1108 | %files doc-ri | |
1109 | %defattr(644,root,root,755) | |
1110 | %{ruby_ridir}/* | |
1111 | %endif | |
1112 | ||
1113 | %files examples | |
1114 | %defattr(644,root,root,755) | |
1115 | %{_examplesdir}/%{oname}-%{pkg_version} |