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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.28