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