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