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