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