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

  ViewVC Help
Powered by ViewVC 1.1.28