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