/[packages]/cauldron/ruby/current/SPECS/ruby.spec
ViewVC logotype

Annotation of /cauldron/ruby/current/SPECS/ruby.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30