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