]>
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 |
0b1956f4 | 5 | # - fix inconsistencies with versioned vs not-versioned dirs (see dirname hacks in configure) |
44802bd7 | 6 | # - custom-rubygems-location.patch |
198b2d1a | 7 | # |
2acc5f17 | 8 | # Conditional build: |
bc991d5a | 9 | %bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds |
bc991d5a | 10 | %bcond_without tk # skip building package with Tk bindings |
05f75f09 | 11 | %bcond_without batteries # Don't include rubygems, json, rake, minitest |
92ff5331 | 12 | %bcond_with bootstrap # build bootstrap version |
fa311386 | 13 | |
63b8d212 | 14 | %define rel 2 |
31058abe | 15 | %define ruby_version 1.9 |
af4f9d38 | 16 | %define basever 1.9.3 |
1da1aa9b | 17 | %define patchlevel 429 |
ee1a9db5 | 18 | %define doc_version 1_9_3 |
fa311386 | 19 | %define json_ver 1.5.5 |
fc97a6ea | 20 | %define rake_ver 0.9.2.2 |
116a558f | 21 | # when increasing rubygems_ver, please remove "11." prefix in rubygems package release |
fc97a6ea JR |
22 | %define rubygems_ver 1.8.11 |
23 | %define minitest_ver 2.5.1 | |
116a558f | 24 | # when increasing rdoc_ver, please remove "11." prefix in rdoc package release |
fa311386 | 25 | %define rdoc_ver 3.9.5 |
ee1edb11 ER |
26 | %define bigdecimal_ver 1.1.0 |
27 | %define io_console_ver 0.3 | |
6e2f9b3c | 28 | Summary: Ruby - interpreted scripting language |
3c3949cf ER |
29 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ |
30 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
31 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
32 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
4ab119cd | 33 | Name: ruby |
6cd63ddf | 34 | Version: %{basever}.%{patchlevel} |
116a558f | 35 | Release: %{rel} |
01204e8f | 36 | Epoch: 1 |
267654e7 ER |
37 | # Public Domain for example for: include/ruby/st.h, strftime.c, ... |
38 | License: (Ruby or BSD) and Public Domain | |
6eb17ef6 | 39 | Group: Development/Languages |
71734240 | 40 | Source0: ftp://ftp.ruby-lang.org/pub/ruby/1.9/%{name}-%{basever}-p%{patchlevel}.tar.bz2 |
1da1aa9b | 41 | # Source0-md5: c2b2de5ef15ea9b1aaa3152f9112af1b |
ef29702a | 42 | Source1: http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz |
775b0723 | 43 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 |
af4f9d38 | 44 | Source2: http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz |
775b0723 | 45 | # Source2-md5: ec622612428672c432b6f65dd31a84b5 |
af4f9d38 | 46 | Source3: http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz |
775b0723 | 47 | # Source3-md5: 1892aadde51d36106c513bced2193dff |
92ff5331 | 48 | Source100: ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz |
49 | # Source100-md5: 50a49edb787211598d08e756e733e42e | |
af4f9d38 | 50 | Source4: rdoc.1 |
af4f9d38 | 51 | Source5: testrb.1 |
fc97a6ea JR |
52 | Patch0: %{name}-lib64.patch |
53 | Patch1: %{name}-ffs.patch | |
360c41c0 | 54 | Patch2: fix-bison-invocation.patch |
d78ec589 ER |
55 | # http://redmine.ruby-lang.org/issues/5231 |
56 | Patch3: disable-versioned-paths.patch | |
57 | # TODO: Should be submitted upstream? | |
58 | Patch4: arch-specific-dir.patch | |
59 | # http://redmine.ruby-lang.org/issues/5281 | |
60 | Patch5: site-and-vendor-arch-flags.patch | |
b5465d0c ER |
61 | # Make mkmf verbose by default |
62 | Patch6: mkmf-verbose.patch | |
7c36cd5d | 63 | URL: http://www.ruby-lang.org/ |
19b741fe | 64 | BuildRequires: autoconf >= 2.60 |
53c95475 | 65 | BuildRequires: automake |
cc4f6b84 | 66 | BuildRequires: bison |
f0eb2dd9 | 67 | BuildRequires: db-devel |
e9f2c6fe | 68 | BuildRequires: gdbm-devel >= 1.8.3 |
9ae7df75 | 69 | BuildRequires: libffi-devel |
1968db6d | 70 | BuildRequires: ncurses-devel |
f33fb184 | 71 | BuildRequires: openssl-devel |
74c8af09 | 72 | BuildRequires: pkgconfig |
933aeb0e | 73 | BuildRequires: readline-devel >= 4.2 |
d25d71f0 | 74 | BuildRequires: rpm-build >= 5.4.10-49 |
c60d9276 ER |
75 | # boostrap needs ruby binary, erb module |
76 | %{!?with_bootstrap:BuildRequires: ruby-modules} | |
0edf5e88 | 77 | %{!?with_bootstrap:BuildRequires: ruby} |
7911cce0 | 78 | BuildRequires: sed >= 4.0 |
92ff5331 | 79 | BuildRequires: yaml-devel |
15ecb21e | 80 | %if %{with tk} |
e14a2f74 | 81 | BuildRequires: tk-devel |
15ecb21e | 82 | %endif |
f0eb2dd9 | 83 | Requires(post,postun): /sbin/ldconfig |
31058abe | 84 | Provides: ruby(ver) = %{ruby_version} |
ee1edb11 | 85 | Obsoletes: ruby-REXML <= 2.4.0-2 |
bb5582fa | 86 | Obsoletes: ruby-doc < 1.8.4 |
ee1edb11 | 87 | Obsoletes: ruby-fastthread <= 0.6.3 |
a2963aa1 JR |
88 | Conflicts: ruby-activesupport < 2.3.11-2 |
89 | Conflicts: ruby-activesupport2 < 2.3.11-2 | |
584b8bcb | 90 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4ab119cd | 91 | |
2db0575e | 92 | %define ruby_ridir %{_datadir}/ri/%{ruby_version}/system |
d78ec589 | 93 | %define gem_dir %{_datadir}/%{name}/gems/%{ruby_version} |
d78ec589 ER |
94 | |
95 | # The RubyGems library has to stay out of Ruby directory three, since the | |
96 | # RubyGems should be share by all Ruby implementations. | |
5c3d5a0e | 97 | %define rubygems_dir %{_datadir}/rubygems |
d78ec589 | 98 | |
0b1956f4 ER |
99 | %define ruby_archdir %{_libdir}/%{name}/%{ruby_version} |
100 | %define ruby_libdir %{_datadir}/%{name}/%{ruby_version} | |
d78ec589 ER |
101 | |
102 | # This is the local lib/arch and should not be used for packaging. | |
5c3d5a0e ER |
103 | %define sitedir site_ruby |
104 | %define ruby_sitedir %{_prefix}/local/share/%{name}/%{sitedir} | |
7e6b5462 | 105 | %define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{name}/%{sitedir}/%{ruby_version} |
0b1956f4 | 106 | %define ruby_sitelibdir %{_prefix}/local/share/%{name}/%{sitedir}/%{ruby_version} |
d78ec589 ER |
107 | |
108 | # This is the general location for libs/archs compatible with all | |
109 | # or most of the Ruby versions available in the PLD repositories. | |
5c3d5a0e ER |
110 | %define vendordir vendor_ruby |
111 | %define ruby_vendordir %{_datadir}/%{name}/%{vendordir} | |
7e6b5462 | 112 | %define ruby_vendorarchdir %{_libdir}/%{name}/%{vendordir}/%{ruby_version} |
5c3d5a0e | 113 | %define ruby_vendorlibdir %{_datadir}/%{name}/%{vendordir}/%{ruby_version} |
d78ec589 ER |
114 | |
115 | # TODO: drop legacy loadpaths after all ruby modules rebuilt in Th | |
5c3d5a0e | 116 | %define legacy_libdir %{_libdir}/%{name}/%{ruby_version} |
3349e6ba | 117 | %define legacy_archdir %{_libdir}/%{name}/%{ruby_version}/%{_target_cpu}-linux |
5c3d5a0e ER |
118 | %define legacy_sitedir %{_libdir}/%{name}/%{sitedir} |
119 | %define legacy_sitelibdir %{_libdir}/%{name}/%{sitedir}/%{ruby_version} | |
3349e6ba | 120 | %define legacy_sitearchdir %{_libdir}/%{name}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux |
5c3d5a0e ER |
121 | %define legacy_vendordir %{_libdir}/%{name}/%{vendordir} |
122 | %define legacy_vendorlibdir %{_libdir}/%{name}/%{vendordir}/%{ruby_version} | |
3349e6ba | 123 | %define legacy_vendorarchdir %{_libdir}/%{name}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux |
5c3d5a0e ER |
124 | |
125 | %define legacy_siteloadpath %{legacy_sitelibdir}\\0%{legacy_sitearchdir}\\0%{legacy_sitedir} | |
b02dabe9 | 126 | %define legacy_vendorloadpath %{legacy_vendorarchdir} |
5c3d5a0e ER |
127 | %define legacy_loadpath %{legacy_archdir} |
128 | %define legacy_loadpaths %{legacy_siteloadpath}\\0%{legacy_vendorloadpath}\\0%{legacy_loadpath} | |
d78ec589 | 129 | |
8ea447c1 | 130 | # bleh, some nasty (gcc or ruby) bug still not fixed |
cc2dcaa2 | 131 | # (SEGV or "unexpected break" on miniruby run during build) |
8ea447c1 JB |
132 | %define specflags_ia64 -O0 |
133 | ||
88546731 | 134 | # ruby needs frame pointers for correct exception handling |
b66203d6 | 135 | %define specflags_ia32 -fno-omit-frame-pointer |
88546731 | 136 | |
4ab119cd | 137 | %description |
138 | Ruby is the interpreted scripting language for quick and easy | |
139 | object-oriented programming. It has many features to process text | |
140 | files and to do system management tasks (as in Perl). It is simple, | |
141 | straight-forward, extensible, and portable. | |
142 | ||
9fd96af7 | 143 | This package contains only shared library and ruby interpreter. To get |
144 | full-functional ruby environment install ruby-modules package. | |
145 | ||
a0a47c48 JR |
146 | %description -l ja.UTF-8 |
147 | Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初 | |
148 | から純粋なオブジェクト指向言語として設計されていますから,オブジェクト | |
15467dc7 | 149 | 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です. |
7c36cd5d | 150 | |
a0a47c48 JR |
151 | %description -l pl.UTF-8 |
152 | Ruby to interpretowany język skryptowy, w sam raz dla łatwego i | |
153 | szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji | |
154 | ułatwiających przetwarzanie plików tekstowych i wykonywanie prac | |
155 | związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty, | |
156 | rozszerzalny i przenośny. | |
6e2f9b3c | 157 | |
a0a47c48 JR |
158 | Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby. |
159 | Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni | |
160 | funkcjonalnego środowiska ruby. | |
9fd96af7 | 161 | |
a0a47c48 JR |
162 | %description -l pt_BR.UTF-8 |
163 | Ruby é uma linguagem de script interpretada de programação orientada a | |
164 | objeto. Possui diversas características para processamento de texto. É | |
165 | simples, extensível e direta. | |
7c36cd5d | 166 | |
9fd96af7 | 167 | %package modules |
168 | Summary: Ruby standard modules and utilities | |
3c3949cf | 169 | Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby |
9fd96af7 | 170 | Group: Development/Languages |
171 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
b688e9a5 | 172 | Suggests: ruby-rubygems |
ee1edb11 ER |
173 | Provides: ruby-bigdecimal = %{bigdecimal_ver} |
174 | Provides: ruby-io-console = %{io_console_ver} | |
05f75f09 ER |
175 | # ruby-modules deprecated, rpm5 generates ruby(abi) itself |
176 | Provides: ruby-modules(ver) = %{ruby_version} | |
177 | %if %{with batteries} | |
ee1edb11 ER |
178 | Provides: ruby-json = %{json_ver} |
179 | Provides: ruby-minitest = %{minitest_ver} | |
05f75f09 | 180 | Obsoletes: ruby-json <= 1.5.4 |
ee1edb11 | 181 | Obsoletes: ruby-minitest <= 1.5.0 |
05f75f09 | 182 | %endif |
9fd96af7 | 183 | |
184 | %description modules | |
185 | Ruby standard modules and utilities: | |
186 | - erb - Tiny eRuby | |
9fd96af7 | 187 | - irb - interactive Ruby |
7911cce0 | 188 | - testrb - automatic runner for Test::Unit of Ruby |
9fd96af7 | 189 | |
a0a47c48 JR |
190 | %description modules -l pl.UTF-8 |
191 | Standardowe moduły i narzędzia Ruby: | |
192 | - erb - mały eRuby | |
9fd96af7 | 193 | - irb - interaktywny Ruby |
7911cce0 | 194 | - testrb - automatyczny runner dla Ruby Test::Unit |
9fd96af7 | 195 | |
265d0efe | 196 | %package tk |
197 | Summary: Ruby/Tk bindings | |
3c3949cf | 198 | Summary(pl.UTF-8): Wiązania Ruby/Tk |
e65aac33 | 199 | Group: Development/Languages |
69b51dc9 | 200 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
265d0efe | 201 | |
202 | %description tk | |
e65aac33 | 203 | This pachage contains Ruby/Tk bindings. |
204 | ||
a0a47c48 JR |
205 | %description tk -l pl.UTF-8 |
206 | Ten pakiet zawiera wiązania Ruby/Tk. | |
265d0efe | 207 | |
e14a2f74 | 208 | %package devel |
e14a2f74 | 209 | Summary: Ruby development libraries |
3c3949cf | 210 | Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby |
9434194f | 211 | Group: Development/Languages |
9fd96af7 | 212 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
92f362b7 ER |
213 | Requires: gcc |
214 | Requires: glibc-devel | |
b5465d0c | 215 | Requires: pkgconfig |
e14a2f74 | 216 | |
217 | %description devel | |
9434194f JB |
218 | Ruby development libraries. |
219 | ||
a0a47c48 JR |
220 | %description devel -l pl.UTF-8 |
221 | Biblioteki programistyczne interpretera języka Ruby. | |
e14a2f74 | 222 | |
87b9c30a | 223 | %package static |
224 | Summary: Ruby static libraries | |
3c3949cf | 225 | Summary(pl.UTF-8): Biblioteki statyczne Ruby |
87b9c30a | 226 | Group: Development/Languages |
f89d855e | 227 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
87b9c30a | 228 | |
229 | %description static | |
230 | Ruby static libraries. | |
231 | ||
a0a47c48 | 232 | %description static -l pl.UTF-8 |
87b9c30a | 233 | Biblioteki statyczne Ruby. |
234 | ||
754b419a | 235 | %package doc |
9fd96af7 | 236 | Summary: Ruby HTML documentation |
3c3949cf | 237 | Summary(pl.UTF-8): Dokumentacja HTML do Ruby |
9fd96af7 | 238 | Group: Documentation |
00595cdb ER |
239 | %if "%{_rpmversion}" >= "5" |
240 | BuildArch: noarch | |
241 | %endif | |
9fd96af7 | 242 | |
243 | %description doc | |
244 | Ruby HTML documentation: FAQ, guide, core and standard library. | |
245 | ||
a0a47c48 | 246 | %description doc -l pl.UTF-8 |
d99a4382 | 247 | Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i |
248 | stdlib. | |
69b51dc9 | 249 | |
9fd96af7 | 250 | %package doc-ri |
251 | Summary: Ruby ri documentation | |
3c3949cf | 252 | Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri |
9fd96af7 | 253 | Group: Documentation |
69b51dc9 | 254 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
00595cdb ER |
255 | %if "%{_rpmversion}" >= "5" |
256 | BuildArch: noarch | |
257 | %endif | |
9fd96af7 | 258 | |
259 | %description doc-ri | |
260 | Ruby ri documentation. | |
261 | ||
a0a47c48 | 262 | %description doc-ri -l pl.UTF-8 |
9fd96af7 | 263 | Dokumentacja Ruby w formacie ri. |
264 | ||
265 | %package examples | |
266 | Summary: Ruby examples | |
3c3949cf | 267 | Summary(pl.UTF-8): Przykłady dla języka Ruby |
9fd96af7 | 268 | Group: Development/Languages |
00595cdb ER |
269 | %if "%{_rpmversion}" >= "5" |
270 | BuildArch: noarch | |
271 | %endif | |
9fd96af7 | 272 | |
273 | %description examples | |
274 | Ruby examples. | |
275 | ||
a0a47c48 JR |
276 | %description examples -l pl.UTF-8 |
277 | Przykłady programów w języku Ruby. | |
9fd96af7 | 278 | |
63b8d212 | 279 | # IMPORTANT: keep rdoc, rubygems, rake as last packages as we reset epoch/version/release |
116a558f ER |
280 | # and %{version},%{release} macros may not be used directly as they take last |
281 | # subpackage value not main package one what you intend to use | |
63b8d212 | 282 | |
2db0575e ER |
283 | %package rdoc |
284 | Summary: A tool to generate HTML and command-line documentation for Ruby projects | |
3349e6ba | 285 | Summary(pl.UTF-8): Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym |
2db0575e | 286 | Version: %{rdoc_ver} |
116a558f ER |
287 | # remove "11." when rdoc_ver is increased |
288 | Release: 11.%{basever}.%{patchlevel}.%{rel} | |
2db0575e ER |
289 | Epoch: 0 |
290 | License: GPL v2 and Ruby and MIT | |
291 | Group: Development/Libraries | |
116a558f | 292 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} |
ee1edb11 | 293 | Obsoletes: rdoc <= 0.9.0 |
00595cdb ER |
294 | %if "%{_rpmversion}" >= "5" |
295 | BuildArch: noarch | |
296 | %endif | |
2db0575e ER |
297 | |
298 | %description rdoc | |
299 | RDoc produces HTML and command-line documentation for Ruby projects. | |
300 | RDoc includes the 'rdoc' and 'ri' tools for generating and displaying | |
301 | online documentation. | |
302 | ||
3349e6ba JB |
303 | %description rdoc -l pl.UTF-8 |
304 | RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku | |
305 | Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i | |
306 | wyświetlania dokumentacji online. | |
307 | ||
44802bd7 | 308 | %package rubygems |
3349e6ba JB |
309 | Summary: RubyGems - the Ruby standard for packaging Ruby libraries |
310 | Summary(pl.UTF-8): RubyGems - standard Ruby'ego pakietowania bibliotek | |
941981c7 | 311 | Version: %{rubygems_ver} |
116a558f ER |
312 | # remove "11." when rubygems_ver is increased |
313 | Release: 11.%{basever}.%{patchlevel}.%{rel} | |
bd4c2526 | 314 | Epoch: 0 |
941981c7 ER |
315 | License: Ruby or MIT |
316 | Group: Development/Libraries | |
116a558f | 317 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} |
941981c7 | 318 | Requires: %{name}-rdoc >= %{rdoc_ver} |
92f362b7 | 319 | Suggests: %{name}-devel |
44802bd7 ER |
320 | Provides: rubygems = %{rubygems_ver} |
321 | %if "%{_rpmversion}" >= "5" | |
322 | BuildArch: noarch | |
323 | %endif | |
324 | ||
325 | %description rubygems | |
326 | RubyGems is the Ruby standard for publishing and managing third party | |
327 | libraries. | |
328 | ||
3349e6ba JB |
329 | %description rubygems -l pl.UTF-8 |
330 | RubyGems to standardowe narzędzie języka Ruby do publikowania i | |
331 | zarządzania zewnętrznymi bibliotekami. | |
332 | ||
63b8d212 ER |
333 | %package rake |
334 | Summary: Rake is a Make-like program implemented in Ruby | |
335 | Summary(pl.UTF-8): Program typu Make dla języka Ruby | |
336 | Version: %{rake_ver} | |
337 | Release: %{basever}.%{patchlevel}.%{rel} | |
338 | Epoch: 0 | |
339 | License: MIT | |
340 | Group: Development/Languages | |
341 | Provides: rake = %{rake_ver} | |
342 | %if "%{_rpmversion}" >= "5" | |
343 | BuildArch: noarch | |
344 | %endif | |
345 | ||
346 | %description rake | |
347 | Rake is a simple Ruby build program with capabilities similar to make. | |
348 | ||
349 | It has the following features: | |
350 | - Rakefiles (rake's version of Makefiles) are completely defined in | |
351 | standard Ruby syntax. No XML files to edit. No quirky Makefile syntax | |
352 | to worry about (is that a tab or a space?) | |
353 | - Users can specify tasks with prerequisites. | |
354 | - Rake supports rule patterns to synthesize implicit tasks. | |
355 | - Rake is lightweight. It can be distributed with other projects as a | |
356 | single file. Projects that depend upon rake do not require that rake | |
357 | be installed on target systems. | |
358 | ||
359 | %description rake -l pl.UTF-8 | |
360 | Rake to prosty program do budowania w języku Ruby o możliwościach | |
361 | podobnych do make. | |
362 | ||
363 | Ma następujące cechy: | |
364 | - Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane | |
365 | całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować | |
366 | plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to | |
367 | tabulacja czy spacja?). | |
368 | - Użytkownicy mogą określać zadania z ich zależnościami. | |
369 | - Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań. | |
370 | - Rake jest lekki. Może być rozpowszechniany z innymi projektami jako | |
371 | pojedynczy plik. Projekty używające rake'a nie wymagają go | |
372 | zainstalowanego na systemach docelowych. | |
373 | ||
4ab119cd | 374 | %prep |
360c41c0 | 375 | %if %{with bootstrap} |
af4f9d38 | 376 | %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100 |
360c41c0 JR |
377 | %else |
378 | %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 | |
379 | %endif | |
933aeb0e | 380 | %patch0 -p1 |
a310037a | 381 | %patch1 -p1 |
360c41c0 | 382 | %patch2 -p1 |
d78ec589 ER |
383 | %patch3 -p1 |
384 | %patch4 -p1 | |
385 | %patch5 -p1 | |
360c41c0 JR |
386 | |
387 | # must be regenerated with new bison | |
388 | %{__rm} parse.{c,h} | |
4ab119cd | 389 | |
b2f04116 JR |
390 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
391 | ||
392 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
393 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
bb5582fa | 394 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' |
e7754311 | 395 | |
4ab119cd | 396 | %build |
8ea447c1 | 397 | cp -f /usr/share/automake/config.sub . |
a5f9b7ff | 398 | |
92ff5331 | 399 | # build ruby-1.8.7 first |
400 | %if %{with bootstrap} | |
401 | cd %{name}-1.8.7-p330 | |
402 | %configure | |
403 | %{__make} | |
404 | cd .. | |
405 | %endif | |
406 | ||
8ea447c1 | 407 | %{__autoconf} |
ecde9c47 | 408 | %configure \ |
92ff5331 | 409 | %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \ |
0b1956f4 ER |
410 | --with-rubylibprefix=%(dirname %{ruby_libdir}) \ |
411 | --with-archdir=%{ruby_archdir} \ | |
412 | --with-sitedir=%(dirname %{ruby_sitelibdir}) \ | |
44d1acb8 | 413 | --with-sitearchdir=%{ruby_sitearchdir} \ |
0b1956f4 | 414 | --with-vendordir=%(dirname %{ruby_vendorlibdir}) \ |
44d1acb8 | 415 | --with-vendorarchdir=%{ruby_vendorarchdir} \ |
d78ec589 | 416 | --with-rubygemsdir=%{rubygems_dir} \ |
31058abe | 417 | --with-search-path="%{legacy_loadpaths}" \ |
3a4dd1f6 | 418 | --enable-shared \ |
374c5b6e | 419 | --enable-pthread \ |
4e930057 | 420 | --disable-rubygems \ |
96c2e1a4 | 421 | --disable-install-doc \ |
15467dc7 | 422 | --with-ruby-version=minor |
4ab119cd | 423 | |
dbf8f91d | 424 | %{__make} -j1 main \ |
2690877c ER |
425 | COPY="cp -p" Q= \ |
426 | %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"} | |
aa58dbf5 | 427 | |
d0f5536d | 428 | %if %{with doc} |
98757242 | 429 | %{__make} -j1 rdoc |
d0f5536d | 430 | %endif |
53830491 | 431 | |
4ab119cd | 432 | %install |
433 | rm -rf $RPM_BUILD_ROOT | |
fc97a6ea | 434 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \ |
7e6b5462 | 435 | $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_ridir}} \ |
f1a7abab | 436 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \ |
7c3b0919 | 437 | $RPM_BUILD_ROOT{%{legacy_archdir}/racc,%{legacy_sitelibdir},%{legacy_sitearchdir},%{legacy_vendorarchdir},%{legacy_libdir}/tasks} \ |
1968db6d | 438 | |
96c2e1a4 | 439 | %{__make} install %{?with_doc:install-doc} \ |
ecde9c47 | 440 | DESTDIR=$RPM_BUILD_ROOT |
d041de24 | 441 | |
9fd96af7 | 442 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
2690877c ER |
443 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1 |
444 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1 | |
18e966a7 | 445 | |
5c3d5a0e | 446 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html |
698147c7 | 447 | |
63b8d212 ER |
448 | ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake |
449 | ||
15467dc7 | 450 | %if %{without batteries} |
b2f04116 | 451 | # packaged separately |
05f75f09 | 452 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest} |
0b1956f4 | 453 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json |
7179288b | 454 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-* |
0b1956f4 | 455 | %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{rake,rubygems,json}.rb |
92ff5331 | 456 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake} |
457 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
7179288b ER |
458 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/{json,minitest,rake}-*.gemspec |
459 | %{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON} | |
15467dc7 | 460 | %endif |
1968db6d | 461 | |
44802bd7 | 462 | %if %{with doc} |
d78ec589 | 463 | # too much .ri |
2db0575e ER |
464 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri |
465 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid | |
15467dc7 | 466 | %endif |
1968db6d | 467 | |
4ab119cd | 468 | %clean |
469 | rm -rf $RPM_BUILD_ROOT | |
470 | ||
d041de24 JR |
471 | %post -p /sbin/ldconfig |
472 | %postun -p /sbin/ldconfig | |
4ab119cd | 473 | |
474 | %files | |
475 | %defattr(644,root,root,755) | |
b2f04116 | 476 | %doc NEWS LEGAL README README.EXT ChangeLog ToDo |
9fd96af7 | 477 | %attr(755,root,root) %{_bindir}/ruby |
529ff870 | 478 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* |
b2f04116 | 479 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9 |
9fd96af7 | 480 | %{_mandir}/man1/ruby.1* |
05f75f09 | 481 | |
68ec864f | 482 | %dir %{_libdir}/%{name} |
7e6b5462 | 483 | %dir %{_libdir}/%{name}/%{vendordir} |
0b1956f4 ER |
484 | %dir %{_datadir}/%{name} |
485 | %dir %{_datadir}/%{name}/%{vendordir} | |
486 | ||
be8e7b24 | 487 | %dir %{ruby_libdir} |
5c3d5a0e | 488 | %dir %{ruby_archdir} |
be8e7b24 | 489 | %dir %{ruby_vendorlibdir} |
be8e7b24 | 490 | %dir %{ruby_vendorarchdir} |
31058abe | 491 | |
68ec864f | 492 | %dir %{_datadir}/ri |
2db0575e ER |
493 | %dir %{_datadir}/ri/%{ruby_version} |
494 | %dir %{ruby_ridir} | |
495 | ||
a43d66d8 | 496 | %dir %{ruby_rdocdir} |
9fd96af7 | 497 | |
f1a7abab ER |
498 | # common dirs for ruby vendor modules |
499 | %dir %{ruby_vendorlibdir}/net | |
500 | ||
de8152d8 ER |
501 | # legacy dirs. when everything rebuilt in Th not using these dirs. drop them |
502 | %dir %{legacy_archdir} | |
503 | %dir %{legacy_sitedir} | |
504 | %dir %{legacy_sitelibdir} | |
505 | %dir %{legacy_sitearchdir} | |
506 | %dir %{legacy_vendorarchdir} | |
293a48c2 | 507 | %dir %{legacy_libdir}/tasks |
7c3b0919 | 508 | %dir %{legacy_archdir}/racc |
de8152d8 | 509 | |
9fd96af7 | 510 | %files devel |
511 | %defattr(644,root,root,755) | |
529ff870 | 512 | %attr(755,root,root) %{_libdir}/libruby.so |
31058abe ER |
513 | %{_includedir}/%{name}-%{ruby_version} |
514 | %{_pkgconfigdir}/ruby-%{ruby_version}.pc | |
b5465d0c | 515 | %{ruby_libdir}/mkmf.rb |
9fd96af7 | 516 | |
517 | %files static | |
518 | %defattr(644,root,root,755) | |
529ff870 | 519 | %{_libdir}/libruby-static.a |
9fd96af7 | 520 | |
15ecb21e | 521 | %if %{with tk} |
9fd96af7 | 522 | %files tk |
523 | %defattr(644,root,root,755) | |
0b1956f4 ER |
524 | %{ruby_libdir}/tcltk.rb |
525 | %{ruby_libdir}/tk*.rb | |
526 | %{ruby_libdir}/tk | |
527 | %{ruby_libdir}/tkextlib | |
528 | %attr(755,root,root) %{ruby_archdir}/t*.so | |
15ecb21e | 529 | %endif |
9fd96af7 | 530 | |
2db0575e | 531 | %files rdoc |
9fd96af7 | 532 | %defattr(644,root,root,755) |
9fd96af7 | 533 | %attr(755,root,root) %{_bindir}/rdoc |
534 | %attr(755,root,root) %{_bindir}/ri | |
2db0575e ER |
535 | %{_mandir}/man1/rdoc.1* |
536 | %{ruby_libdir}/rdoc | |
537 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} | |
538 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin | |
539 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc | |
540 | %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
541 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri | |
542 | ||
44802bd7 ER |
543 | %if %{with batteries} |
544 | %files rubygems | |
941981c7 | 545 | %defattr(644,root,root,755) |
44802bd7 ER |
546 | %attr(755,root,root) %{_bindir}/gem |
547 | %{ruby_libdir}/rubygems | |
548 | %{ruby_libdir}/rubygems.rb | |
549 | %{ruby_libdir}/ubygems.rb | |
63b8d212 ER |
550 | |
551 | %files rake | |
552 | %defattr(644,root,root,755) | |
553 | %attr(755,root,root) %{_bindir}/rake | |
554 | %{_mandir}/man1/rake.1* | |
555 | %{ruby_libdir}/rake | |
556 | %dir %{gem_dir}/gems/rake-%{rake_ver} | |
557 | %dir %{gem_dir}/gems/rake-%{rake_ver}/bin | |
558 | %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake | |
559 | %{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
44802bd7 ER |
560 | %endif |
561 | ||
9fd96af7 | 562 | %files modules |
563 | %defattr(644,root,root,755) | |
564 | %attr(755,root,root) %{_bindir}/erb | |
565 | %attr(755,root,root) %{_bindir}/irb | |
9fd96af7 | 566 | %attr(755,root,root) %{_bindir}/testrb |
0b1956f4 ER |
567 | %{ruby_libdir}/bigdecimal |
568 | %{ruby_libdir}/cgi | |
569 | %{ruby_libdir}/date | |
570 | %{ruby_libdir}/digest | |
571 | %{ruby_libdir}/dl | |
572 | %{ruby_libdir}/drb | |
573 | %{ruby_libdir}/fiddle | |
574 | %{ruby_libdir}/io | |
575 | %{ruby_libdir}/irb | |
576 | %{ruby_libdir}/matrix | |
0b1956f4 ER |
577 | %{ruby_libdir}/net |
578 | %{ruby_libdir}/openssl | |
579 | %{ruby_libdir}/optparse | |
0b1956f4 ER |
580 | %{ruby_libdir}/psych |
581 | %{ruby_libdir}/racc | |
582 | %{ruby_libdir}/rbconfig | |
0b1956f4 ER |
583 | %{ruby_libdir}/rexml |
584 | %{ruby_libdir}/rinda | |
585 | %{ruby_libdir}/ripper | |
586 | %{ruby_libdir}/rss | |
587 | %{ruby_libdir}/shell | |
588 | %{ruby_libdir}/syck | |
589 | %{ruby_libdir}/test | |
590 | %{ruby_libdir}/uri | |
591 | %{ruby_libdir}/webrick | |
592 | %{ruby_libdir}/xmlrpc | |
593 | %{ruby_libdir}/yaml | |
594 | %{ruby_libdir}/[A-Za-s]*.rb | |
595 | %{ruby_libdir}/tempfile.rb | |
596 | %{ruby_libdir}/thread.rb | |
597 | %{ruby_libdir}/thwait.rb | |
598 | %{ruby_libdir}/time.rb | |
599 | %{ruby_libdir}/timeout.rb | |
600 | %{ruby_libdir}/tmpdir.rb | |
601 | %{ruby_libdir}/tracer.rb | |
602 | %{ruby_libdir}/tsort.rb | |
603 | %{ruby_libdir}/[u-z]*.rb | |
7179288b | 604 | %if %{with batteries} |
44802bd7 ER |
605 | %exclude %{ruby_libdir}/rubygems.rb |
606 | %exclude %{ruby_libdir}/ubygems.rb | |
7179288b | 607 | %endif |
b5465d0c | 608 | %exclude %{ruby_libdir}/mkmf.rb |
0b1956f4 ER |
609 | %attr(755,root,root) %{ruby_archdir}/[a-s]*.so |
610 | %attr(755,root,root) %{ruby_archdir}/[u-z]*.so | |
611 | %dir %{ruby_archdir}/digest | |
612 | %attr(755,root,root) %{ruby_archdir}/digest/*.so | |
613 | %dir %{ruby_archdir}/dl | |
614 | %attr(755,root,root) %{ruby_archdir}/dl/callback.so | |
615 | %dir %{ruby_archdir}/enc | |
616 | %attr(755,root,root) %{ruby_archdir}/enc/*.so | |
617 | %dir %{ruby_archdir}/enc/trans | |
618 | %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so | |
619 | %dir %{ruby_archdir}/io | |
620 | %attr(755,root,root) %{ruby_archdir}/io/*.so | |
0b1956f4 ER |
621 | %dir %{ruby_archdir}/mathn |
622 | %attr(755,root,root) %{ruby_archdir}/mathn/*.so | |
623 | %dir %{ruby_archdir}/racc | |
624 | %attr(755,root,root) %{ruby_archdir}/racc/*.so | |
625 | %{ruby_archdir}/rbconfig.rb | |
31058abe | 626 | |
ee1edb11 ER |
627 | %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec |
628 | %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
629 | ||
05f75f09 ER |
630 | %if %{with batteries} |
631 | # json | |
632 | %{ruby_libdir}/json | |
633 | %dir %{ruby_archdir}/json | |
634 | %dir %{ruby_archdir}/json/ext | |
635 | %attr(755,root,root) %{ruby_archdir}/json/ext/*.so | |
636 | %{gem_dir}/specifications/json-%{json_ver}.gemspec | |
637 | ||
638 | # minitest | |
639 | %{ruby_libdir}/minitest | |
640 | %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
05f75f09 ER |
641 | %endif |
642 | ||
31058abe | 643 | # parents of gem_dir |
dbf8f91d | 644 | %dir %{_datadir}/%{name}/gems |
31058abe ER |
645 | #%dir %{_datadir}/%{name}/gems/%{ruby_version} |
646 | %dir %{_datadir}/%{name}/gems/%{ruby_version}/gems | |
647 | ||
d78ec589 | 648 | %dir %{gem_dir} |
d78ec589 | 649 | %dir %{gem_dir}/specifications |
9fd96af7 | 650 | %{_mandir}/man1/erb.1* |
651 | %{_mandir}/man1/irb.1* | |
9fd96af7 | 652 | %{_mandir}/man1/ri.1* |
653 | %{_mandir}/man1/testrb.1* | |
15467dc7 | 654 | |
9fd96af7 | 655 | %files doc |
9434194f | 656 | %defattr(644,root,root,755) |
b2f04116 | 657 | %doc ruby-doc-bundle/* |
af4f9d38 JR |
658 | %{?with_doc:%doc ruby_%{doc_version}_stdlib} |
659 | %{?with_doc:%doc ruby_%{doc_version}_core} | |
87b9c30a | 660 | |
d0f5536d | 661 | %if %{with doc} |
9fd96af7 | 662 | %files doc-ri |
e40bfe06 | 663 | %defattr(644,root,root,755) |
2db0575e | 664 | %{ruby_ridir}/* |
d0f5536d | 665 | %endif |
265d0efe | 666 | |
9fd96af7 | 667 | %files examples |
616a12d8 | 668 | %defattr(644,root,root,755) |
9fd96af7 | 669 | %{_examplesdir}/%{name}-%{version} |