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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30