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