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