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