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