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