]>
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 |
9c41e51a | 12 | %bcond_without default_ruby # use this Ruby as default system Ruby |
92ff5331 | 13 | %bcond_with bootstrap # build bootstrap version |
fa311386 | 14 | |
aecb5ebe | 15 | %define rel 1 |
31058abe | 16 | %define ruby_version 1.9 |
af4f9d38 | 17 | %define basever 1.9.3 |
de9418ad | 18 | %define patchlevel 545 |
9c41e51a | 19 | |
99934935 | 20 | %define ruby_suffix %{!?with_default_ruby:%{ruby_version}} |
ee1a9db5 | 21 | %define doc_version 1_9_3 |
fa311386 | 22 | %define json_ver 1.5.5 |
fc97a6ea | 23 | %define rake_ver 0.9.2.2 |
de9418ad | 24 | %define rubygems_ver 1.8.23.2 |
fc97a6ea | 25 | %define minitest_ver 2.5.1 |
116a558f | 26 | # when increasing rdoc_ver, please remove "11." prefix in rdoc package release |
fa311386 | 27 | %define rdoc_ver 3.9.5 |
d8228776 | 28 | %define irb_ver 0.9.6 |
ee1edb11 ER |
29 | %define bigdecimal_ver 1.1.0 |
30 | %define io_console_ver 0.3 | |
9c41e51a | 31 | %define oname ruby |
6e2f9b3c | 32 | Summary: Ruby - interpreted scripting language |
3c3949cf ER |
33 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ |
34 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
35 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
36 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
9c41e51a | 37 | Name: ruby%{ruby_suffix} |
6cd63ddf | 38 | Version: %{basever}.%{patchlevel} |
116a558f | 39 | Release: %{rel} |
01204e8f | 40 | Epoch: 1 |
267654e7 ER |
41 | # Public Domain for example for: include/ruby/st.h, strftime.c, ... |
42 | License: (Ruby or BSD) and Public Domain | |
6eb17ef6 | 43 | Group: Development/Languages |
9c41e51a | 44 | Source0: ftp://ftp.ruby-lang.org/pub/ruby/1.9/%{oname}-%{basever}-p%{patchlevel}.tar.bz2 |
de9418ad | 45 | # Source0-md5: 4743c1dc48491070bae8fc8b423bc1a7 |
9c41e51a | 46 | Source1: http://www.ruby-doc.org/download/%{oname}-doc-bundle.tar.gz |
775b0723 | 47 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 |
9c41e51a | 48 | Source2: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz |
775b0723 | 49 | # Source2-md5: ec622612428672c432b6f65dd31a84b5 |
9c41e51a | 50 | Source3: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz |
775b0723 | 51 | # Source3-md5: 1892aadde51d36106c513bced2193dff |
9c41e51a | 52 | Source100: ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{oname}-1.8.7-p330.tar.gz |
92ff5331 | 53 | # Source100-md5: 50a49edb787211598d08e756e733e42e |
af4f9d38 | 54 | Source4: rdoc.1 |
af4f9d38 | 55 | Source5: testrb.1 |
9c41e51a ER |
56 | Patch0: %{oname}-lib64.patch |
57 | Patch1: %{oname}-ffs.patch | |
360c41c0 | 58 | Patch2: fix-bison-invocation.patch |
d78ec589 ER |
59 | # http://redmine.ruby-lang.org/issues/5231 |
60 | Patch3: disable-versioned-paths.patch | |
61 | # TODO: Should be submitted upstream? | |
62 | Patch4: arch-specific-dir.patch | |
63 | # http://redmine.ruby-lang.org/issues/5281 | |
64 | Patch5: site-and-vendor-arch-flags.patch | |
b5465d0c ER |
65 | # Make mkmf verbose by default |
66 | Patch6: mkmf-verbose.patch | |
87688b10 | 67 | Patch7: strip-ccache.patch |
7c36cd5d | 68 | URL: http://www.ruby-lang.org/ |
19b741fe | 69 | BuildRequires: autoconf >= 2.60 |
53c95475 | 70 | BuildRequires: automake |
f2e66748 | 71 | BuildRequires: bison >= 1.875 |
f0eb2dd9 | 72 | BuildRequires: db-devel |
e9f2c6fe | 73 | BuildRequires: gdbm-devel >= 1.8.3 |
9ae7df75 | 74 | BuildRequires: libffi-devel |
1968db6d | 75 | BuildRequires: ncurses-devel |
f33fb184 | 76 | BuildRequires: openssl-devel |
74c8af09 | 77 | BuildRequires: pkgconfig |
933aeb0e | 78 | BuildRequires: readline-devel >= 4.2 |
d25d71f0 | 79 | BuildRequires: rpm-build >= 5.4.10-49 |
c60d9276 ER |
80 | # boostrap needs ruby binary, erb module |
81 | %{!?with_bootstrap:BuildRequires: ruby-modules} | |
0edf5e88 | 82 | %{!?with_bootstrap:BuildRequires: ruby} |
7911cce0 | 83 | BuildRequires: sed >= 4.0 |
92ff5331 | 84 | BuildRequires: yaml-devel |
15ecb21e | 85 | %if %{with tk} |
e14a2f74 | 86 | BuildRequires: tk-devel |
15ecb21e | 87 | %endif |
f0eb2dd9 | 88 | Requires(post,postun): /sbin/ldconfig |
31058abe | 89 | Provides: ruby(ver) = %{ruby_version} |
ee1edb11 | 90 | Obsoletes: ruby-REXML <= 2.4.0-2 |
bb5582fa | 91 | Obsoletes: ruby-doc < 1.8.4 |
ee1edb11 | 92 | Obsoletes: ruby-fastthread <= 0.6.3 |
a2963aa1 JR |
93 | Conflicts: ruby-activesupport < 2.3.11-2 |
94 | Conflicts: ruby-activesupport2 < 2.3.11-2 | |
584b8bcb | 95 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4ab119cd | 96 | |
2db0575e | 97 | %define ruby_ridir %{_datadir}/ri/%{ruby_version}/system |
9c41e51a | 98 | %define gem_dir %{_datadir}/%{oname}/gems/%{ruby_version} |
d78ec589 ER |
99 | |
100 | # The RubyGems library has to stay out of Ruby directory three, since the | |
101 | # RubyGems should be share by all Ruby implementations. | |
5c3d5a0e | 102 | %define rubygems_dir %{_datadir}/rubygems |
d78ec589 | 103 | |
9c41e51a ER |
104 | %define ruby_archdir %{_libdir}/%{oname}/%{ruby_version} |
105 | %define ruby_libdir %{_datadir}/%{oname}/%{ruby_version} | |
d78ec589 ER |
106 | |
107 | # This is the local lib/arch and should not be used for packaging. | |
5c3d5a0e | 108 | %define sitedir site_ruby |
9c41e51a ER |
109 | %define ruby_sitedir %{_prefix}/local/share/%{oname}/%{sitedir} |
110 | %define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{oname}/%{sitedir}/%{ruby_version} | |
111 | %define ruby_sitelibdir %{_prefix}/local/share/%{oname}/%{sitedir}/%{ruby_version} | |
d78ec589 ER |
112 | |
113 | # This is the general location for libs/archs compatible with all | |
114 | # or most of the Ruby versions available in the PLD repositories. | |
5c3d5a0e | 115 | %define vendordir vendor_ruby |
9c41e51a ER |
116 | %define ruby_vendordir %{_datadir}/%{oname}/%{vendordir} |
117 | %define ruby_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version} | |
118 | %define ruby_vendorlibdir %{_datadir}/%{oname}/%{vendordir}/%{ruby_version} | |
d78ec589 ER |
119 | |
120 | # TODO: drop legacy loadpaths after all ruby modules rebuilt in Th | |
9c41e51a ER |
121 | %define legacy_libdir %{_libdir}/%{oname}/%{ruby_version} |
122 | %define legacy_archdir %{_libdir}/%{oname}/%{ruby_version}/%{_target_cpu}-linux | |
123 | %define legacy_sitedir %{_libdir}/%{oname}/%{sitedir} | |
124 | %define legacy_sitelibdir %{_libdir}/%{oname}/%{sitedir}/%{ruby_version} | |
125 | %define legacy_sitearchdir %{_libdir}/%{oname}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux | |
126 | %define legacy_vendordir %{_libdir}/%{oname}/%{vendordir} | |
127 | %define legacy_vendorlibdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version} | |
128 | %define legacy_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux | |
5c3d5a0e ER |
129 | |
130 | %define legacy_siteloadpath %{legacy_sitelibdir}\\0%{legacy_sitearchdir}\\0%{legacy_sitedir} | |
b02dabe9 | 131 | %define legacy_vendorloadpath %{legacy_vendorarchdir} |
5c3d5a0e ER |
132 | %define legacy_loadpath %{legacy_archdir} |
133 | %define legacy_loadpaths %{legacy_siteloadpath}\\0%{legacy_vendorloadpath}\\0%{legacy_loadpath} | |
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 |
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 | |
e65aac33 | 204 | This pachage contains Ruby/Tk bindings. |
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} | |
287 | Group: Development/Languages | |
288 | Release: %{basever}.%{patchlevel}.%{rel} | |
289 | Epoch: 0 | |
290 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} | |
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} |
116a558f ER |
305 | # remove "11." when rdoc_ver is increased |
306 | Release: 11.%{basever}.%{patchlevel}.%{rel} | |
2db0575e ER |
307 | Epoch: 0 |
308 | License: GPL v2 and Ruby and MIT | |
309 | Group: Development/Libraries | |
116a558f | 310 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} |
ee1edb11 | 311 | Obsoletes: rdoc <= 0.9.0 |
00595cdb ER |
312 | %if "%{_rpmversion}" >= "5" |
313 | BuildArch: noarch | |
314 | %endif | |
2db0575e ER |
315 | |
316 | %description rdoc | |
317 | RDoc produces HTML and command-line documentation for Ruby projects. | |
318 | RDoc includes the 'rdoc' and 'ri' tools for generating and displaying | |
319 | online documentation. | |
320 | ||
3349e6ba JB |
321 | %description rdoc -l pl.UTF-8 |
322 | RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku | |
323 | Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i | |
324 | wyświetlania dokumentacji online. | |
325 | ||
44802bd7 | 326 | %package rubygems |
3349e6ba JB |
327 | Summary: RubyGems - the Ruby standard for packaging Ruby libraries |
328 | Summary(pl.UTF-8): RubyGems - standard Ruby'ego pakietowania bibliotek | |
941981c7 | 329 | Version: %{rubygems_ver} |
de9418ad | 330 | Release: %{basever}.%{patchlevel}.%{rel} |
bd4c2526 | 331 | Epoch: 0 |
941981c7 ER |
332 | License: Ruby or MIT |
333 | Group: Development/Libraries | |
116a558f | 334 | Requires: %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel} |
941981c7 | 335 | Requires: %{name}-rdoc >= %{rdoc_ver} |
92f362b7 | 336 | Suggests: %{name}-devel |
44802bd7 ER |
337 | Provides: rubygems = %{rubygems_ver} |
338 | %if "%{_rpmversion}" >= "5" | |
339 | BuildArch: noarch | |
340 | %endif | |
341 | ||
342 | %description rubygems | |
343 | RubyGems is the Ruby standard for publishing and managing third party | |
344 | libraries. | |
345 | ||
3349e6ba JB |
346 | %description rubygems -l pl.UTF-8 |
347 | RubyGems to standardowe narzędzie języka Ruby do publikowania i | |
348 | zarządzania zewnętrznymi bibliotekami. | |
349 | ||
63b8d212 ER |
350 | %package rake |
351 | Summary: Rake is a Make-like program implemented in Ruby | |
352 | Summary(pl.UTF-8): Program typu Make dla języka Ruby | |
353 | Version: %{rake_ver} | |
354 | Release: %{basever}.%{patchlevel}.%{rel} | |
355 | Epoch: 0 | |
356 | License: MIT | |
357 | Group: Development/Languages | |
358 | Provides: rake = %{rake_ver} | |
2531db89 | 359 | Conflicts: ruby-modules < 1:1.9.3.429-2 |
63b8d212 ER |
360 | %if "%{_rpmversion}" >= "5" |
361 | BuildArch: noarch | |
362 | %endif | |
363 | ||
364 | %description rake | |
365 | Rake is a simple Ruby build program with capabilities similar to make. | |
366 | ||
367 | It has the following features: | |
368 | - Rakefiles (rake's version of Makefiles) are completely defined in | |
369 | standard Ruby syntax. No XML files to edit. No quirky Makefile syntax | |
370 | to worry about (is that a tab or a space?) | |
371 | - Users can specify tasks with prerequisites. | |
372 | - Rake supports rule patterns to synthesize implicit tasks. | |
373 | - Rake is lightweight. It can be distributed with other projects as a | |
374 | single file. Projects that depend upon rake do not require that rake | |
375 | be installed on target systems. | |
376 | ||
377 | %description rake -l pl.UTF-8 | |
378 | Rake to prosty program do budowania w języku Ruby o możliwościach | |
379 | podobnych do make. | |
380 | ||
381 | Ma następujące cechy: | |
382 | - Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane | |
383 | całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować | |
384 | plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to | |
385 | tabulacja czy spacja?). | |
386 | - Użytkownicy mogą określać zadania z ich zależnościami. | |
387 | - Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań. | |
388 | - Rake jest lekki. Może być rozpowszechniany z innymi projektami jako | |
389 | pojedynczy plik. Projekty używające rake'a nie wymagają go | |
390 | zainstalowanego na systemach docelowych. | |
391 | ||
7e87bcc1 ER |
392 | %package json |
393 | Summary: JSON library for Ruby | |
394 | Summary(pl.UTF-8): Biblioteka JSON dla języka Ruby | |
395 | Version: %{json_ver} | |
396 | Release: %{basever}.%{patchlevel}.%{rel} | |
397 | Epoch: 0 | |
398 | License: MIT | |
399 | Group: Development/Languages | |
400 | Obsoletes: ruby-json-rubyforge | |
2531db89 | 401 | Conflicts: ruby-modules < 1:1.9.3.429-3 |
7e87bcc1 ER |
402 | |
403 | %description json | |
404 | This is a JSON implementation as a Ruby extension in C. | |
405 | ||
406 | %description json -l pl.UTF-8 | |
407 | Biblioteka JSON dla języka Ruby. | |
408 | ||
4ab119cd | 409 | %prep |
360c41c0 | 410 | %if %{with bootstrap} |
9c41e51a | 411 | %setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100 |
360c41c0 | 412 | %else |
9c41e51a | 413 | %setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3 |
360c41c0 | 414 | %endif |
933aeb0e | 415 | %patch0 -p1 |
a310037a | 416 | %patch1 -p1 |
360c41c0 | 417 | %patch2 -p1 |
d78ec589 ER |
418 | %patch3 -p1 |
419 | %patch4 -p1 | |
420 | %patch5 -p1 | |
87688b10 ER |
421 | %patch6 -p1 |
422 | %patch7 -p1 | |
360c41c0 JR |
423 | |
424 | # must be regenerated with new bison | |
425 | %{__rm} parse.{c,h} | |
4ab119cd | 426 | |
b2f04116 JR |
427 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
428 | ||
429 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
430 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
bb5582fa | 431 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' |
e7754311 | 432 | |
4ab119cd | 433 | %build |
de9418ad ER |
434 | rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs) |
435 | if [ $rubygems_ver != %{rubygems_ver} ]; then | |
436 | echo "Set %%define rubygems_ver to $rubygems_ver and re-run." | |
437 | exit 1 | |
438 | fi | |
439 | ||
8ea447c1 | 440 | cp -f /usr/share/automake/config.sub . |
a5f9b7ff | 441 | |
92ff5331 | 442 | # build ruby-1.8.7 first |
443 | %if %{with bootstrap} | |
9c41e51a | 444 | cd %{oname}-1.8.7-p330 |
92ff5331 | 445 | %configure |
446 | %{__make} | |
447 | cd .. | |
448 | %endif | |
449 | ||
8ea447c1 | 450 | %{__autoconf} |
ecde9c47 | 451 | %configure \ |
9c41e51a ER |
452 | %{?with_bootstrap:--with-baseruby=%{oname}-1.8.7-p330/miniruby} \ |
453 | --program-suffix=%{ruby_suffix} \ | |
0b1956f4 ER |
454 | --with-rubylibprefix=%(dirname %{ruby_libdir}) \ |
455 | --with-archdir=%{ruby_archdir} \ | |
456 | --with-sitedir=%(dirname %{ruby_sitelibdir}) \ | |
44d1acb8 | 457 | --with-sitearchdir=%{ruby_sitearchdir} \ |
0b1956f4 | 458 | --with-vendordir=%(dirname %{ruby_vendorlibdir}) \ |
44d1acb8 | 459 | --with-vendorarchdir=%{ruby_vendorarchdir} \ |
d78ec589 | 460 | --with-rubygemsdir=%{rubygems_dir} \ |
31058abe | 461 | --with-search-path="%{legacy_loadpaths}" \ |
3a4dd1f6 | 462 | --enable-shared \ |
374c5b6e | 463 | --enable-pthread \ |
4e930057 | 464 | --disable-rubygems \ |
96c2e1a4 | 465 | --disable-install-doc \ |
15467dc7 | 466 | --with-ruby-version=minor |
4ab119cd | 467 | |
dbf8f91d | 468 | %{__make} -j1 main \ |
2690877c | 469 | COPY="cp -p" Q= \ |
9c41e51a | 470 | %{?with_bootstrap:BASERUBY="%{oname}-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"} |
aa58dbf5 | 471 | |
d0f5536d | 472 | %if %{with doc} |
98757242 | 473 | %{__make} -j1 rdoc |
d0f5536d | 474 | %endif |
53830491 | 475 | |
4ab119cd | 476 | %install |
477 | rm -rf $RPM_BUILD_ROOT | |
9c41e51a | 478 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{oname}-%{version}} \ |
7e6b5462 | 479 | $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_ridir}} \ |
f1a7abab | 480 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \ |
4ffa9197 | 481 | $RPM_BUILD_ROOT%{ruby_vendordir}/data \ |
7c3b0919 | 482 | $RPM_BUILD_ROOT{%{legacy_archdir}/racc,%{legacy_sitelibdir},%{legacy_sitearchdir},%{legacy_vendorarchdir},%{legacy_libdir}/tasks} \ |
1968db6d | 483 | |
96c2e1a4 | 484 | %{__make} install %{?with_doc:install-doc} \ |
ecde9c47 | 485 | DESTDIR=$RPM_BUILD_ROOT |
d041de24 | 486 | |
9c41e51a ER |
487 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{version} |
488 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1 | |
489 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/testrb%{ruby_suffix}.1 | |
18e966a7 | 490 | |
5c3d5a0e | 491 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html |
698147c7 | 492 | |
9c41e51a | 493 | ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake%{ruby_suffix} |
63b8d212 | 494 | |
15467dc7 | 495 | %if %{without batteries} |
b2f04116 | 496 | # packaged separately |
05f75f09 | 497 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest} |
0b1956f4 | 498 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json |
7179288b | 499 | %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-* |
0b1956f4 | 500 | %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{rake,rubygems,json}.rb |
92ff5331 | 501 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake} |
502 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
7179288b ER |
503 | %{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/{json,minitest,rake}-*.gemspec |
504 | %{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON} | |
15467dc7 | 505 | %endif |
1968db6d | 506 | |
44802bd7 | 507 | %if %{with doc} |
d78ec589 | 508 | # too much .ri |
2db0575e ER |
509 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri |
510 | %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid | |
15467dc7 | 511 | %endif |
1968db6d | 512 | |
4ab119cd | 513 | %clean |
514 | rm -rf $RPM_BUILD_ROOT | |
515 | ||
d041de24 JR |
516 | %post -p /sbin/ldconfig |
517 | %postun -p /sbin/ldconfig | |
4ab119cd | 518 | |
519 | %files | |
520 | %defattr(644,root,root,755) | |
b2f04116 | 521 | %doc NEWS LEGAL README README.EXT ChangeLog ToDo |
9c41e51a | 522 | %attr(755,root,root) %{_bindir}/ruby%{ruby_suffix} |
529ff870 | 523 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* |
b2f04116 | 524 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9 |
9c41e51a | 525 | %{_mandir}/man1/ruby%{ruby_suffix}.1* |
05f75f09 | 526 | |
9c41e51a ER |
527 | %dir %{_libdir}/%{oname} |
528 | %dir %{_libdir}/%{oname}/%{vendordir} | |
529 | %dir %{_datadir}/%{oname} | |
0b1956f4 | 530 | |
be8e7b24 | 531 | %dir %{ruby_libdir} |
5c3d5a0e | 532 | %dir %{ruby_archdir} |
4ffa9197 ER |
533 | %dir %{ruby_vendordir} |
534 | %dir %{ruby_vendordir}/data | |
be8e7b24 | 535 | %dir %{ruby_vendorlibdir} |
be8e7b24 | 536 | %dir %{ruby_vendorarchdir} |
31058abe | 537 | |
68ec864f | 538 | %dir %{_datadir}/ri |
2db0575e ER |
539 | %dir %{_datadir}/ri/%{ruby_version} |
540 | %dir %{ruby_ridir} | |
541 | ||
a43d66d8 | 542 | %dir %{ruby_rdocdir} |
9fd96af7 | 543 | |
f1a7abab ER |
544 | # common dirs for ruby vendor modules |
545 | %dir %{ruby_vendorlibdir}/net | |
546 | ||
de8152d8 ER |
547 | # legacy dirs. when everything rebuilt in Th not using these dirs. drop them |
548 | %dir %{legacy_archdir} | |
549 | %dir %{legacy_sitedir} | |
550 | %dir %{legacy_sitelibdir} | |
551 | %dir %{legacy_sitearchdir} | |
552 | %dir %{legacy_vendorarchdir} | |
293a48c2 | 553 | %dir %{legacy_libdir}/tasks |
7c3b0919 | 554 | %dir %{legacy_archdir}/racc |
de8152d8 | 555 | |
9fd96af7 | 556 | %files devel |
557 | %defattr(644,root,root,755) | |
529ff870 | 558 | %attr(755,root,root) %{_libdir}/libruby.so |
9c41e51a | 559 | %{_includedir}/%{oname}-%{ruby_version} |
31058abe | 560 | %{_pkgconfigdir}/ruby-%{ruby_version}.pc |
b5465d0c | 561 | %{ruby_libdir}/mkmf.rb |
9fd96af7 | 562 | |
563 | %files static | |
564 | %defattr(644,root,root,755) | |
529ff870 | 565 | %{_libdir}/libruby-static.a |
9fd96af7 | 566 | |
15ecb21e | 567 | %if %{with tk} |
9fd96af7 | 568 | %files tk |
569 | %defattr(644,root,root,755) | |
0b1956f4 ER |
570 | %{ruby_libdir}/tcltk.rb |
571 | %{ruby_libdir}/tk*.rb | |
572 | %{ruby_libdir}/tk | |
573 | %{ruby_libdir}/tkextlib | |
574 | %attr(755,root,root) %{ruby_archdir}/t*.so | |
15ecb21e | 575 | %endif |
9fd96af7 | 576 | |
d8228776 ER |
577 | %files irb |
578 | %defattr(644,root,root,755) | |
9c41e51a | 579 | %attr(755,root,root) %{_bindir}/irb%{ruby_suffix} |
d8228776 ER |
580 | %{ruby_libdir}/irb.rb |
581 | %{ruby_libdir}/irb | |
9c41e51a | 582 | %{_mandir}/man1/irb%{ruby_suffix}.1* |
d8228776 | 583 | |
2db0575e | 584 | %files rdoc |
9fd96af7 | 585 | %defattr(644,root,root,755) |
9c41e51a ER |
586 | %attr(755,root,root) %{_bindir}/rdoc%{ruby_suffix} |
587 | %attr(755,root,root) %{_bindir}/ri%{ruby_suffix} | |
588 | %{_mandir}/man1/rdoc%{ruby_suffix}.1* | |
2db0575e ER |
589 | %{ruby_libdir}/rdoc |
590 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} | |
591 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin | |
592 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc | |
593 | %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
594 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri | |
595 | ||
44802bd7 ER |
596 | %if %{with batteries} |
597 | %files rubygems | |
941981c7 | 598 | %defattr(644,root,root,755) |
9c41e51a | 599 | %attr(755,root,root) %{_bindir}/gem%{ruby_suffix} |
44802bd7 ER |
600 | %{ruby_libdir}/rubygems |
601 | %{ruby_libdir}/rubygems.rb | |
602 | %{ruby_libdir}/ubygems.rb | |
63b8d212 ER |
603 | |
604 | %files rake | |
605 | %defattr(644,root,root,755) | |
9c41e51a ER |
606 | %attr(755,root,root) %{_bindir}/rake%{ruby_suffix} |
607 | %{_mandir}/man1/rake%{ruby_suffix}.1* | |
63b8d212 ER |
608 | %{ruby_libdir}/rake |
609 | %dir %{gem_dir}/gems/rake-%{rake_ver} | |
610 | %dir %{gem_dir}/gems/rake-%{rake_ver}/bin | |
611 | %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake | |
612 | %{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
7e87bcc1 ER |
613 | |
614 | %files json | |
615 | %defattr(644,root,root,755) | |
616 | %{ruby_libdir}/json | |
617 | %dir %{ruby_archdir}/json | |
618 | %dir %{ruby_archdir}/json/ext | |
619 | %attr(755,root,root) %{ruby_archdir}/json/ext/*.so | |
620 | %{gem_dir}/specifications/json-%{json_ver}.gemspec | |
44802bd7 ER |
621 | %endif |
622 | ||
9fd96af7 | 623 | %files modules |
624 | %defattr(644,root,root,755) | |
9c41e51a ER |
625 | %attr(755,root,root) %{_bindir}/erb%{ruby_suffix} |
626 | %attr(755,root,root) %{_bindir}/testrb%{ruby_suffix} | |
0b1956f4 ER |
627 | %{ruby_libdir}/bigdecimal |
628 | %{ruby_libdir}/cgi | |
629 | %{ruby_libdir}/date | |
630 | %{ruby_libdir}/digest | |
631 | %{ruby_libdir}/dl | |
632 | %{ruby_libdir}/drb | |
633 | %{ruby_libdir}/fiddle | |
634 | %{ruby_libdir}/io | |
0b1956f4 | 635 | %{ruby_libdir}/matrix |
0b1956f4 ER |
636 | %{ruby_libdir}/net |
637 | %{ruby_libdir}/openssl | |
638 | %{ruby_libdir}/optparse | |
0b1956f4 ER |
639 | %{ruby_libdir}/psych |
640 | %{ruby_libdir}/racc | |
641 | %{ruby_libdir}/rbconfig | |
0b1956f4 ER |
642 | %{ruby_libdir}/rexml |
643 | %{ruby_libdir}/rinda | |
644 | %{ruby_libdir}/ripper | |
645 | %{ruby_libdir}/rss | |
646 | %{ruby_libdir}/shell | |
647 | %{ruby_libdir}/syck | |
648 | %{ruby_libdir}/test | |
649 | %{ruby_libdir}/uri | |
650 | %{ruby_libdir}/webrick | |
651 | %{ruby_libdir}/xmlrpc | |
652 | %{ruby_libdir}/yaml | |
653 | %{ruby_libdir}/[A-Za-s]*.rb | |
654 | %{ruby_libdir}/tempfile.rb | |
655 | %{ruby_libdir}/thread.rb | |
656 | %{ruby_libdir}/thwait.rb | |
657 | %{ruby_libdir}/time.rb | |
658 | %{ruby_libdir}/timeout.rb | |
659 | %{ruby_libdir}/tmpdir.rb | |
660 | %{ruby_libdir}/tracer.rb | |
661 | %{ruby_libdir}/tsort.rb | |
662 | %{ruby_libdir}/[u-z]*.rb | |
7179288b | 663 | %if %{with batteries} |
44802bd7 ER |
664 | %exclude %{ruby_libdir}/rubygems.rb |
665 | %exclude %{ruby_libdir}/ubygems.rb | |
7179288b | 666 | %endif |
d8228776 | 667 | %exclude %{ruby_libdir}/irb.rb |
b5465d0c | 668 | %exclude %{ruby_libdir}/mkmf.rb |
0b1956f4 ER |
669 | %attr(755,root,root) %{ruby_archdir}/[a-s]*.so |
670 | %attr(755,root,root) %{ruby_archdir}/[u-z]*.so | |
671 | %dir %{ruby_archdir}/digest | |
672 | %attr(755,root,root) %{ruby_archdir}/digest/*.so | |
673 | %dir %{ruby_archdir}/dl | |
674 | %attr(755,root,root) %{ruby_archdir}/dl/callback.so | |
675 | %dir %{ruby_archdir}/enc | |
676 | %attr(755,root,root) %{ruby_archdir}/enc/*.so | |
677 | %dir %{ruby_archdir}/enc/trans | |
678 | %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so | |
679 | %dir %{ruby_archdir}/io | |
680 | %attr(755,root,root) %{ruby_archdir}/io/*.so | |
0b1956f4 ER |
681 | %dir %{ruby_archdir}/mathn |
682 | %attr(755,root,root) %{ruby_archdir}/mathn/*.so | |
683 | %dir %{ruby_archdir}/racc | |
684 | %attr(755,root,root) %{ruby_archdir}/racc/*.so | |
685 | %{ruby_archdir}/rbconfig.rb | |
31058abe | 686 | |
ee1edb11 ER |
687 | %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec |
688 | %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec | |
689 | ||
05f75f09 | 690 | %if %{with batteries} |
05f75f09 ER |
691 | # minitest |
692 | %{ruby_libdir}/minitest | |
693 | %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec | |
05f75f09 ER |
694 | %endif |
695 | ||
31058abe | 696 | # parents of gem_dir |
9c41e51a ER |
697 | %dir %{_datadir}/%{oname}/gems |
698 | #%dir %{_datadir}/%{oname}/gems/%{ruby_version} | |
699 | %dir %{_datadir}/%{oname}/gems/%{ruby_version}/gems | |
31058abe | 700 | |
d78ec589 | 701 | %dir %{gem_dir} |
d78ec589 | 702 | %dir %{gem_dir}/specifications |
9c41e51a ER |
703 | %{_mandir}/man1/erb%{ruby_suffix}.1* |
704 | %{_mandir}/man1/ri%{ruby_suffix}.1* | |
705 | %{_mandir}/man1/testrb%{ruby_suffix}.1* | |
15467dc7 | 706 | |
9fd96af7 | 707 | %files doc |
9434194f | 708 | %defattr(644,root,root,755) |
b2f04116 | 709 | %doc ruby-doc-bundle/* |
af4f9d38 JR |
710 | %{?with_doc:%doc ruby_%{doc_version}_stdlib} |
711 | %{?with_doc:%doc ruby_%{doc_version}_core} | |
87b9c30a | 712 | |
d0f5536d | 713 | %if %{with doc} |
9fd96af7 | 714 | %files doc-ri |
e40bfe06 | 715 | %defattr(644,root,root,755) |
2db0575e | 716 | %{ruby_ridir}/* |
d0f5536d | 717 | %endif |
265d0efe | 718 | |
9fd96af7 | 719 | %files examples |
616a12d8 | 720 | %defattr(644,root,root,755) |
9c41e51a | 721 | %{_examplesdir}/%{oname}-%{version} |