/[packages]/updates/5/ruby/current/SPECS/ruby.spec
ViewVC logotype

Annotation of /updates/5/ruby/current/SPECS/ruby.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292558 - (hide annotations) (download)
Wed Sep 12 04:53:33 2012 UTC (11 years, 7 months ago) by fwang
Original Path: cauldron/ruby/current/SPECS/ruby.spec
File size: 15082 byte(s)
- tweak ruby macros so that it is using new config variable
- add requires on rubygems for ruby binary
1 fwang 289958 %define subver 1.9
2 fwang 290007 %define rubyapi 1.9.1
3 fwang 289958 %define rubyver 1.9.3
4     %define patchversion p194
5 fwang 292558 %define rel 6
6 blino 1152
7 fwang 291590 %define libname %mklibname ruby %{subver}
8    
9 fwang 291557 %define ruby_libdir %{_datadir}/%{name}
10     %define ruby_libarchdir %{_libdir}/%{name}
11    
12 fwang 290007 # This is the local lib/arch and should not be used for packaging.
13 fwang 291557 %define ruby_sitelibdir %{_datadir}/ruby/site_ruby
14     %define ruby_sitearchdir %{_libdir}/ruby/site_ruby
15 fwang 290007
16     # This is the general location for libs/archs compatible with all
17     # or most of the Ruby versions available in the Fedora repositories.
18 fwang 291551 %define ruby_vendorlibdir %{_datadir}/ruby/vendor_ruby
19 fwang 291557 %define ruby_vendorarchdir %{_libdir}/ruby/vendor_ruby
20 fwang 290007
21     # The RubyGems library has to stay out of Ruby directory three, since the
22     # RubyGems should be share by all Ruby implementations.
23 fwang 291557 %define rubygems_dir %{_datadir}/ruby/gems
24 fwang 291590 %define rubygems_version 1.8.23
25 fwang 290007
26 fwang 292558 %define bootstrap 0
27    
28 blino 1152 Summary: Object Oriented Script Language
29     Name: ruby
30 fwang 291590 Epoch: 1
31 blino 1152 Version: %{rubyver}.%{patchversion}
32     Release: %mkrel %rel
33     License: Ruby or GPLv2
34     Group: Development/Ruby
35     BuildRequires: autoconf
36     BuildRequires: byacc
37 shlomif 291698 BuildRequires: doxygen
38 blino 1152 BuildRequires: ncurses-devel
39     BuildRequires: readline-devel
40     BuildRequires: tcl-devel tk-devel
41 fwang 276350 BuildRequires: db-devel
42 fwang 176940 BuildRequires: gdbm-devel >= 1.8.3
43 blino 1152 BuildRequires: openssl-devel
44     BuildRequires: zlib-devel
45 fwang 289987 BuildRequires: libffi-devel
46     BuildRequires: yaml-devel
47 fwang 289998 BuildRequires: rpm-mageia-setup >= 1.158
48 blino 1152 Obsoletes: ruby-rexml
49     Provides: ruby-rexml
50     # explicit file provides (since such requires are automatically added by find-requires)
51     Provides: /usr/bin/ruby
52     Provides: ruby(abi) = %subver
53    
54 fwang 289958 Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2
55 blino 1152 Source3: ruby.macros
56     URL: http://www.ruby-lang.org/
57 fwang 292558 %if !%bootstrap
58     Requires: rubygems >= %{rubygems_version}
59     %endif
60 blino 1152
61 fwang 290007 # == FEDORA PATCHES BEGINS ==
62     # http://redmine.ruby-lang.org/issues/5231
63     Patch0: ruby-1.9.3-disable-versioned-paths.patch
64     # TODO: Should be submitted upstream?
65     Patch1: ruby-1.9.3-arch-specific-dir.patch
66     # http://redmine.ruby-lang.org/issues/5281
67     Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch
68     # http://redmine.ruby-lang.org/issues/5465
69     Patch4: ruby-1.9.3-fix-s390x-build.patch
70     # Fix the uninstaller, so that it doesn't say that gem doesn't exist
71     # when it exists outside of the GEM_HOME (already fixed in the upstream)
72     Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
73     # http://redmine.ruby-lang.org/issues/5135 - see comment 29
74     Patch6: ruby-1.9.3-webrick-test-fix.patch
75     # Already fixed upstream:
76     # https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53
77     Patch7: ruby-1.9.3-bignum-test-fix.patch
78     # Allows to install RubyGems into custom directory, outside of Ruby's tree.
79     # http://redmine.ruby-lang.org/issues/5617
80     Patch8: ruby-1.9.3-custom-rubygems-location.patch
81     # Add support for installing binary extensions according to FHS.
82     # https://github.com/rubygems/rubygems/issues/210
83     Patch9: rubygems-1.8.11-binary-extensions.patch
84     # == FEDORA PATCHES ENDS ==
85    
86 fwang 291591 %package -n %{libname}
87 fwang 291590 Summary: Libraries necessary to run Ruby
88     Group: Development/Ruby
89    
90 blino 1152 %package doc
91     Summary: Documentation for the powerful language Ruby
92     Group: Development/Ruby
93 fwang 202696 BuildArch: noarch
94 blino 1152
95     %package devel
96     Summary: Development file for the powerful language Ruby
97     Group: Development/Ruby
98 fwang 291590 Requires: %{name} = %{epoch}:%{version}
99     Requires: %{libname} = %{epoch}:%{version}
100 blino 1152
101     %package tk
102     Summary: Tk extension for the powerful language Ruby
103     Group: Development/Ruby
104 fwang 291590 Requires: %{name} = %{epoch}:%{version}
105 blino 1152
106 fwang 291551 %package RubyGems
107     Summary: The Ruby standard for packaging ruby libraries
108     Group: Development/Ruby
109 fwang 291590 Version: %{rubygems_version}
110 fwang 291551 Requires: ruby(abi) = %{subver}
111 fwang 291590 Provides: gem = %{rubygems_version}
112     Provides: rubygems = %{rubygems_version}
113     Provides: ruby(rubygems) = %{rubygems_version}
114 fwang 291561 BuildArch: noarch
115 fwang 291551
116 shlomif 291767 %define rake_ver 0.9.22
117 fwang 291551 %package rake
118     Summary: Simple ruby build program with capabilities similar to make
119     Group: Development/Ruby
120 shlomif 291767 Version: %{rake_ver}
121 fwang 291551 Requires: ruby(abi) = %{subver}
122 shlomif 291767 Provides: rubygem(rake) = %{rake_ver}
123 fwang 291561 BuildArch: noarch
124 fwang 291551
125 shlomif 291767 %define minitest_ver 2.5.1
126 fwang 291562 %package minitest
127 shlomif 291733 Summary: Minitest provides a complete suite of testing facilities
128 fwang 291562 Group: Development/Ruby
129 shlomif 291767 Version: %{minitest_ver}
130 fwang 291562 License: MIT
131 fwang 291590 Requires: ruby(abi) = %{subver}
132     Requires: ruby(rubygems) >= %{rubygems_version}
133 shlomif 291767 Provides: rubygem(minitest) = %{minitest_ver}
134 fwang 291562 BuildArch: noarch
135    
136 shlomif 291767 %define json_ver 1.5.4
137 fwang 291562 %package json
138     Summary: This is a JSON implementation as a Ruby extension in C
139     Group: Development/Ruby
140 shlomif 291767 Version: %{json_ver}
141 fwang 291562 License: Ruby or GPLv2
142 fwang 291590 Requires: ruby(abi) = %{subver}
143     Requires: ruby(rubygems) >= %{rubygems_version}
144 shlomif 291767 Provides: rubygem(json) = %{json_ver}
145 fwang 291562
146 shlomif 291767 %define rdoc_ver 3.9.4
147 fwang 291562 %package rdoc
148     Summary: A tool to generate HTML and command-line documentation for Ruby projects
149     Group: Development/Ruby
150 shlomif 291767 Version: %{rdoc_ver}
151 fwang 291562 License: GPLv2 and Ruby and MIT
152 fwang 291590 Requires: ruby(abi) = %{subver}
153     Requires: ruby(rubygems) >= %{rubygems_version}
154     Requires: ruby(irb) = %{version}
155 shlomif 291767 Provides: rdoc = %{rdoc_ver}
156     Provides: ri = %{rdoc_ver}
157 fwang 291562 BuildArch: noarch
158    
159 fwang 291590 %package irb
160     Summary: The Interactive Ruby
161     Group: Development/Ruby
162     Provides: irb = %{version}-%{release}
163     Provides: ruby(irb) = %{version}-%{release}
164     BuildArch: noarch
165    
166     %package bigdecimal
167     Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
168     Group: Development/Ruby
169     Version: 1.1.0
170     License: GPL+ or Artistic
171     Requires: ruby(abi) = %{subver}
172     Requires: ruby(rubygems) >= %{rubygems_version}
173     Provides: rubygem(bigdecimal) = 1.1.0
174    
175     %package io-console
176     Summary: IO/Console is a simple console utilizing library
177     Group: Development/Ruby
178     Version: 0.3
179     Requires: ruby(abi) = %{subver}
180     Requires: ruby(rubygems) >= %{rubygems_version}
181     Provides: rubygem(io-console) = 0.3
182    
183 blino 1152 %description
184     Ruby is the interpreted scripting language for quick and
185     easy object-oriented programming. It has many features to
186     process text files and to do system management tasks (as in
187     Perl). It is simple, straight-forward, and extensible.
188    
189     %description doc
190     Ruby is the interpreted scripting language for quick and
191     easy object-oriented programming. It has many features to
192     process text files and to do system management tasks (as in
193     Perl). It is simple, straight-forward, and extensible.
194    
195     This package contains the Ruby's documentation
196    
197 fwang 291590 %description -n %{libname}
198     This package includes the libruby, necessary to run Ruby.
199    
200 blino 1152 %description devel
201     Ruby is the interpreted scripting language for quick and
202     easy object-oriented programming. It has many features to
203     process text files and to do system management tasks (as in
204     Perl). It is simple, straight-forward, and extensible.
205    
206     This package contains the Ruby's devel files.
207    
208     %description tk
209     Ruby is the interpreted scripting language for quick and
210     easy object-oriented programming. It has many features to
211     process text files and to do system management tasks (as in
212     Perl). It is simple, straight-forward, and extensible.
213    
214     This package contains the Tk extension for Ruby.
215    
216 fwang 291551 %description RubyGems
217     RubyGems is the Ruby standard for publishing and managing third party
218     libraries.
219    
220 fwang 291552 %description rake
221     Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
222     specified in standard Ruby syntax.
223    
224 fwang 291562 %description rdoc
225     RDoc produces HTML and command-line documentation for Ruby projects. RDoc
226     includes the 'rdoc' and 'ri' tools for generating and displaying online
227     documentation.
228    
229     %description json
230     This is a implementation of the JSON specification according to RFC 4627.
231     You can think of it as a low fat alternative to XML, if you want to store
232     data to disk or transmit it over a network rather than use a verbose
233     markup language.
234    
235     %description minitest
236     minitest/unit is a small and incredibly fast unit testing framework.
237    
238     minitest/spec is a functionally complete spec engine.
239    
240     minitest/benchmark is an awesome way to assert the performance of your
241     algorithms in a repeatable manner.
242    
243     minitest/mock by Steven Baker, is a beautifully tiny mock object
244     framework.
245    
246     minitest/pride shows pride in testing and adds coloring to your test
247     output.
248    
249 fwang 291590 %description irb
250     The irb is acronym for Interactive Ruby. It evaluates ruby expression
251     from the terminal.
252    
253     %description bigdecimal
254     Ruby provides built-in support for arbitrary precision integer arithmetic.
255     For example:
256    
257     42**13 -> 1265437718438866624512
258    
259     BigDecimal provides similar support for very large or very accurate floating
260     point numbers. Decimal arithmetic is also useful for general calculation,
261     because it provides the correct answers people expect–whereas normal binary
262     floating point arithmetic often introduces subtle errors because of the
263     conversion between base 10 and base 2.
264    
265     %description io-console
266     IO/Console provides very simple and portable access to console. It doesn't
267     provide higher layer features, such like curses and readline.
268    
269 blino 1152 %prep
270     %setup -q -n ruby-%{rubyver}-%{patchversion}
271 fwang 290007 %apply_patches
272 blino 1152
273     %build
274 fwang 290038 autoconf
275 blino 1152 CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'`
276 fwang 291557 %configure2_5x --enable-shared --disable-rpath --enable-pthread --disable-versioned-paths \
277     --with-rubylibprefix='%{ruby_libdir}' \
278     --with-archdir='%{ruby_libarchdir}' \
279 fwang 290007 --with-sitedir='%{ruby_sitelibdir}' \
280     --with-sitearchdir='%{ruby_sitearchdir}' \
281     --with-vendordir='%{ruby_vendorlibdir}' \
282     --with-vendorarchdir='%{ruby_vendorarchdir}' \
283 fwang 291559 --with-rubyhdrdir='%{_includedir}' \
284 fwang 290022 --with-rubygemsdir='%{rubygems_dir}'
285 blino 1152 %make
286    
287     %install
288     %makeinstall_std install-doc
289    
290     install -d %buildroot%{_datadir}/emacs/site-lisp
291     cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp
292    
293     install -d %buildroot%{_sysconfdir}/emacs/site-start.d
294     cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el
295     (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
296     (add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode))
297     (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
298     EOF
299    
300     # Install the rpm macros
301     mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d
302     cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d
303 fwang 289961
304 blino 1152 %check
305     make test
306    
307 fwang 289961 %files
308 fwang 291551 %{_bindir}/erb
309     %{_bindir}/rake
310     %{_bindir}/rdoc
311     %{_bindir}/ri
312     %{_bindir}/ruby
313     %{_bindir}/testrb
314 fwang 291560 %dir %{ruby_libdir}
315     %{ruby_libdir}/*.rb
316 fwang 291590 %exclude %{ruby_libdir}/irb.rb
317 fwang 291560 %exclude %{ruby_libdir}/multi-tk.rb
318     %exclude %{ruby_libdir}/remote-tk.rb
319     %exclude %{ruby_libdir}/tcltk.rb
320     %exclude %{ruby_libdir}/tk.rb
321     %exclude %{ruby_libdir}/tkafter.rb
322     %exclude %{ruby_libdir}/tkbgerror.rb
323     %exclude %{ruby_libdir}/tkcanvas.rb
324     %exclude %{ruby_libdir}/tkclass.rb
325     %exclude %{ruby_libdir}/tkconsole.rb
326     %exclude %{ruby_libdir}/tkdialog.rb
327     %exclude %{ruby_libdir}/tkentry.rb
328     %exclude %{ruby_libdir}/tkfont.rb
329     %exclude %{ruby_libdir}/tkmacpkg.rb
330     %exclude %{ruby_libdir}/tkmenubar.rb
331     %exclude %{ruby_libdir}/tkmngfocus.rb
332     %exclude %{ruby_libdir}/tkpalette.rb
333     %exclude %{ruby_libdir}/tkscrollbox.rb
334     %exclude %{ruby_libdir}/tktext.rb
335     %exclude %{ruby_libdir}/tkvirtevent.rb
336     %exclude %{ruby_libdir}/tkwinpkg.rb
337     %{ruby_libdir}/cgi
338     %{ruby_libdir}/date
339     %{ruby_libdir}/digest
340     %{ruby_libdir}/dl
341     %{ruby_libdir}/drb
342     %{ruby_libdir}/fiddle
343     %{ruby_libdir}/matrix
344     %{ruby_libdir}/net
345     %{ruby_libdir}/openssl
346     %{ruby_libdir}/optparse
347     %{ruby_libdir}/psych
348     %{ruby_libdir}/racc
349     %{ruby_libdir}/rbconfig
350     %{ruby_libdir}/rexml
351     %{ruby_libdir}/rinda
352     %{ruby_libdir}/ripper
353     %{ruby_libdir}/rss
354     %{ruby_libdir}/shell
355     %{ruby_libdir}/syck
356     %{ruby_libdir}/test
357     %{ruby_libdir}/uri
358     %{ruby_libdir}/webrick
359     %{ruby_libdir}/xmlrpc
360     %{ruby_libdir}/yaml
361     %dir %{ruby_libarchdir}
362 fwang 291562 %{ruby_libarchdir}/bigdecimal.so
363 fwang 291560 %{ruby_libarchdir}/continuation.so
364     %{ruby_libarchdir}/coverage.so
365     %{ruby_libarchdir}/curses.so
366     %{ruby_libarchdir}/date_core.so
367     %{ruby_libarchdir}/dbm.so
368     %dir %{ruby_libarchdir}/digest
369     %{ruby_libarchdir}/digest.so
370     %{ruby_libarchdir}/digest/*.so
371     %dir %{ruby_libarchdir}/dl
372     %{ruby_libarchdir}/dl.so
373     %{ruby_libarchdir}/dl/*.so
374     %dir %{ruby_libarchdir}/enc
375     %{ruby_libarchdir}/enc/*.so
376 fwang 291562 %dir %{ruby_libarchdir}/enc/trans
377     %{ruby_libarchdir}/enc/trans/*.so
378 fwang 291560 %{ruby_libarchdir}/etc.so
379     %{ruby_libarchdir}/fcntl.so
380     %{ruby_libarchdir}/fiber.so
381     %{ruby_libarchdir}/fiddle.so
382     %{ruby_libarchdir}/gdbm.so
383     %{ruby_libarchdir}/iconv.so
384     %dir %{ruby_libarchdir}/io
385     %{ruby_libarchdir}/io/nonblock.so
386     %{ruby_libarchdir}/io/wait.so
387     %dir %{ruby_libarchdir}/mathn
388 fwang 291562 %{ruby_libarchdir}/mathn/*.so
389 fwang 291560 %{ruby_libarchdir}/nkf.so
390     %{ruby_libarchdir}/objspace.so
391     %{ruby_libarchdir}/openssl.so
392     %{ruby_libarchdir}/pathname.so
393     %{ruby_libarchdir}/psych.so
394     %{ruby_libarchdir}/pty.so
395     %dir %{ruby_libarchdir}/racc
396     %{ruby_libarchdir}/racc/*.so
397     %{ruby_libarchdir}/rbconfig.rb
398     %{ruby_libarchdir}/readline.so
399     %{ruby_libarchdir}/ripper.so
400     %{ruby_libarchdir}/sdbm.so
401     %{ruby_libarchdir}/socket.so
402     %{ruby_libarchdir}/stringio.so
403     %{ruby_libarchdir}/strscan.so
404     %{ruby_libarchdir}/syck.so
405     %{ruby_libarchdir}/syslog.so
406     %{ruby_libarchdir}/zlib.so
407 fwang 291551 %{_mandir}/man1/erb.1.*
408     %{_mandir}/man1/ri.1.*
409     %{_mandir}/man1/ruby.1.*
410 blino 1152 %{_datadir}/emacs/site-lisp/*
411     %config(noreplace) %{_sysconfdir}/emacs/site-start.d/*
412     %{_sysconfdir}/rpm/macros.d/%{name}.macros
413 fwang 291560 %{_datadir}/ruby/site_ruby
414     %{_libdir}/ruby/site_ruby
415     %{_datadir}/ruby/vendor_ruby
416     %{_libdir}/ruby/vendor_ruby
417 blino 1152
418     %files doc
419     %{_datadir}/ri
420 shlomif 291698 %{_datadir}/doc/ruby/html/*
421 blino 1152
422 fwang 291590 %files -n %{libname}
423     %{_libdir}/libruby.so.%{subver}
424     %{_libdir}/libruby.so.%{rubyapi}
425    
426 blino 1152 %files devel
427 fwang 290003 %{_includedir}/*
428 blino 1152 %{_libdir}/libruby-static.a
429     %{_libdir}/libruby.so
430 fwang 290003 %{_libdir}/pkgconfig/*.pc
431 blino 1152
432     %files tk
433 fwang 291560 %{ruby_libarchdir}/tcltklib.so
434     %{ruby_libarchdir}/tkutil.so
435     %{ruby_libdir}/multi-tk.rb
436     %{ruby_libdir}/remote-tk.rb
437     %{ruby_libdir}/tcltk.rb
438     %{ruby_libdir}/tk.rb
439     %{ruby_libdir}/tkafter.rb
440     %{ruby_libdir}/tkbgerror.rb
441     %{ruby_libdir}/tkcanvas.rb
442     %{ruby_libdir}/tkclass.rb
443     %{ruby_libdir}/tkconsole.rb
444     %{ruby_libdir}/tkdialog.rb
445     %{ruby_libdir}/tkentry.rb
446     %{ruby_libdir}/tkfont.rb
447     %{ruby_libdir}/tkmacpkg.rb
448     %{ruby_libdir}/tkmenubar.rb
449     %{ruby_libdir}/tkmngfocus.rb
450     %{ruby_libdir}/tkpalette.rb
451     %{ruby_libdir}/tkscrollbox.rb
452     %{ruby_libdir}/tktext.rb
453     %{ruby_libdir}/tkvirtevent.rb
454     %{ruby_libdir}/tkwinpkg.rb
455     %{ruby_libdir}/tk
456     %{ruby_libdir}/tkextlib
457 fwang 291551
458     %files RubyGems
459     %{_bindir}/gem
460     %dir %{rubygems_dir}
461     %{rubygems_dir}/rbconfig
462     %{rubygems_dir}/rubygems
463     %{rubygems_dir}/rubygems.rb
464     %{rubygems_dir}/ubygems.rb
465    
466 fwang 291562 %files minitest
467     %{ruby_libdir}/minitest
468 fwang 291563 %{rubygems_dir}/%{rubyapi}/specifications/minitest-*.gemspec
469 fwang 291562
470 fwang 291551 %files rake
471     %{_bindir}/rake
472     %{_mandir}/man1/rake.1.*
473 fwang 291562 %{ruby_libdir}/rake
474 fwang 291563 %{rubygems_dir}/%{rubyapi}/gems/rake-*
475 fwang 291590 %{rubygems_dir}/%{rubyapi}/specifications/rake-*.gemspec
476 fwang 291562
477     %files rdoc
478     %{_bindir}/rdoc
479     %{_bindir}/ri
480     %{ruby_libdir}/rdoc
481 fwang 291563 %{rubygems_dir}/%{rubyapi}/gems/rdoc-*
482     %{rubygems_dir}/%{rubyapi}/specifications/rdoc-*.gemspec
483 fwang 291562 %{_mandir}/man1/ri.1.*
484    
485     %files json
486     %dir %{ruby_libarchdir}/json
487     %dir %{ruby_libarchdir}/json/ext
488     %{ruby_libarchdir}/json/ext/*.so
489     %{ruby_libdir}/json
490 fwang 291563 %{rubygems_dir}/%{rubyapi}/specifications/json-*.gemspec
491 fwang 291590
492     %files irb
493     %{_bindir}/irb
494     %{ruby_libdir}/irb.rb
495     %{ruby_libdir}/irb
496     %{_mandir}/man1/irb.1*
497    
498     %files bigdecimal
499     %{ruby_libdir}/bigdecimal
500     %{ruby_libarchdir}/bigdecimal.so
501 shlomif 291732 %{rubygems_dir}/%{rubyapi}/specifications/bigdecimal-*.gemspec
502 fwang 291590
503     %files io-console
504     %{ruby_libdir}/io
505     %{ruby_libarchdir}/io/console.so
506 shlomif 291732 %{rubygems_dir}/%{rubyapi}/specifications/io-console-*.gemspec

  ViewVC Help
Powered by ViewVC 1.1.30