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