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