1 |
%define subver 1.9 |
%define subver 2.0 |
2 |
%define rubyapi 1.9.1 |
%define rubyapi 2.0.0 |
3 |
%define rubyver 1.9.3 |
%define rubyver 2.0.0 |
4 |
%define patchversion p429 |
%define patchversion p195 |
5 |
%define rel 1 |
%define rel 1 |
6 |
|
|
7 |
%define libname %mklibname ruby %{subver} |
%define libname %mklibname ruby %{subver} |
21 |
# The RubyGems library has to stay out of Ruby directory three, since the |
# The RubyGems library has to stay out of Ruby directory three, since the |
22 |
# RubyGems should be share by all Ruby implementations. |
# RubyGems should be share by all Ruby implementations. |
23 |
%define rubygems_dir %{_datadir}/ruby/gems |
%define rubygems_dir %{_datadir}/ruby/gems |
24 |
%define rubygems_version 1.8.23 |
%define rubygems_version 2.0.2 |
25 |
|
|
26 |
%define bootstrap 0 |
%define bootstrap 0 |
27 |
%define build_gems 0 |
%define build_gems 1 |
28 |
|
|
29 |
Summary: Object Oriented Script Language |
Summary: Object Oriented Script Language |
30 |
Name: ruby |
Name: ruby |
51 |
Provides: /usr/bin/ruby |
Provides: /usr/bin/ruby |
52 |
Provides: ruby(abi) = %rubyapi |
Provides: ruby(abi) = %rubyapi |
53 |
|
|
54 |
Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2 |
Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.gz |
55 |
|
Source1: operating_system.rb |
56 |
Source3: ruby.macros |
Source3: ruby.macros |
57 |
URL: http://www.ruby-lang.org/ |
URL: http://www.ruby-lang.org/ |
58 |
%if !%bootstrap |
%if !%bootstrap |
61 |
%endif |
%endif |
62 |
|
|
63 |
# == FEDORA PATCHES BEGINS == |
# == FEDORA PATCHES BEGINS == |
64 |
# http://redmine.ruby-lang.org/issues/5231 |
# http://bugs.ruby-lang.org/issues/7807 |
65 |
Patch0: ruby-1.9.3-disable-versioned-paths.patch |
Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch |
|
# TODO: Should be submitted upstream? |
|
|
Patch1: ruby-1.9.3-arch-specific-dir.patch |
|
|
# http://redmine.ruby-lang.org/issues/5281 |
|
|
Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch |
|
66 |
# http://redmine.ruby-lang.org/issues/5465 |
# http://redmine.ruby-lang.org/issues/5465 |
67 |
Patch4: ruby-1.9.3-fix-s390x-build.patch |
Patch4: ruby-1.9.3-fix-s390x-build.patch |
68 |
# Fix the uninstaller, so that it doesn't say that gem doesn't exist |
# Fixes random WEBRick test failures. |
69 |
# when it exists outside of the GEM_HOME (already fixed in the upstream) |
# https://bugs.ruby-lang.org/issues/6573. |
70 |
Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch |
Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch |
71 |
# Allows to install RubyGems into custom directory, outside of Ruby's tree. |
# Allows to install RubyGems into custom directory, outside of Ruby's tree. |
72 |
# http://redmine.ruby-lang.org/issues/5617 |
# http://redmine.ruby-lang.org/issues/5617 |
73 |
Patch8: ruby-1.9.3-custom-rubygems-location.patch |
Patch8: ruby-1.9.3-custom-rubygems-location.patch |
74 |
# Add support for installing binary extensions according to FHS. |
# Add support for installing binary extensions according to FHS. |
75 |
# https://github.com/rubygems/rubygems/issues/210 |
# https://github.com/rubygems/rubygems/issues/210 |
76 |
Patch9: rubygems-1.8.11-binary-extensions.patch |
# Note that 8th patch might be resolved by |
77 |
|
# https://bugs.ruby-lang.org/issues/7897 |
78 |
|
Patch9: rubygems-2.0.0-binary-extensions.patch |
79 |
|
# Make mkmf verbose by default |
80 |
|
Patch12: ruby-1.9.3-mkmf-verbose.patch |
81 |
|
# This slightly changes behavior of "gem install --install-dir" behavior. |
82 |
|
# Without this patch, Specifications.dirs is modified and gems installed on |
83 |
|
# the system cannot be required anymore. This causes later issues when RDoc |
84 |
|
# documentation should be generated, since json gem is sudenly not accessible. |
85 |
|
# https://github.com/rubygems/rubygems/pull/452 |
86 |
|
Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch |
87 |
|
# This prevents issues, when ruby configuration specifies --with-ruby-version=''. |
88 |
|
# https://github.com/rubygems/rubygems/pull/455 |
89 |
|
Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch |
90 |
# == FEDORA PATCHES ENDS == |
# == FEDORA PATCHES ENDS == |
|
# Try to fix parallel build |
|
|
Patch10: ruby-1.9.3-mkmf-parallel-install.patch |
|
91 |
|
|
92 |
%package -n %{libname} |
%package -n %{libname} |
93 |
Summary: Libraries necessary to run Ruby |
Summary: Libraries necessary to run Ruby |
120 |
Conflicts: rpm-mageia-setup-build < 1.159 |
Conflicts: rpm-mageia-setup-build < 1.159 |
121 |
BuildArch: noarch |
BuildArch: noarch |
122 |
|
|
123 |
%define rake_ver 0.9.2.2 |
%define rake_ver 0.9.6 |
124 |
%package rake |
%package rake |
125 |
Summary: Simple ruby build program with capabilities similar to make |
Summary: Simple ruby build program with capabilities similar to make |
126 |
Group: Development/Ruby |
Group: Development/Ruby |
127 |
Version: %{rake_ver} |
Version: %{rake_ver} |
128 |
Requires: ruby(abi) = %{subver} |
Requires: ruby(abi) = %{subver} |
|
Provides: rubygem(rake) = %{rake_ver} |
|
129 |
BuildArch: noarch |
BuildArch: noarch |
130 |
|
|
131 |
%define minitest_ver 2.5.1 |
%define minitest_ver 4.3.2 |
132 |
%package minitest |
%package minitest |
133 |
Summary: Minitest provides a complete suite of testing facilities |
Summary: Minitest provides a complete suite of testing facilities |
134 |
Group: Development/Ruby |
Group: Development/Ruby |
136 |
License: MIT |
License: MIT |
137 |
Requires: ruby(abi) = %{subver} |
Requires: ruby(abi) = %{subver} |
138 |
Requires: ruby(rubygems) >= %{rubygems_version} |
Requires: ruby(rubygems) >= %{rubygems_version} |
|
Provides: rubygem(minitest) = %{minitest_ver} |
|
139 |
BuildArch: noarch |
BuildArch: noarch |
140 |
|
|
141 |
%define json_ver 1.5.4 |
%define json_ver 1.7.7 |
142 |
%package json |
%package json |
143 |
Summary: This is a JSON implementation as a Ruby extension in C |
Summary: This is a JSON implementation as a Ruby extension in C |
144 |
Group: Development/Ruby |
Group: Development/Ruby |
146 |
License: Ruby or GPLv2 |
License: Ruby or GPLv2 |
147 |
Requires: ruby(abi) = %{subver} |
Requires: ruby(abi) = %{subver} |
148 |
Requires: ruby(rubygems) >= %{rubygems_version} |
Requires: ruby(rubygems) >= %{rubygems_version} |
|
Provides: rubygem(json) = %{json_ver} |
|
149 |
|
|
150 |
%define rdoc_ver 3.9.4 |
%define rdoc_ver 4.0.0 |
151 |
%package rdoc |
%package rdoc |
152 |
Summary: A tool to generate HTML and command-line documentation for Ruby projects |
Summary: A tool to generate HTML and command-line documentation for Ruby projects |
153 |
Group: Development/Ruby |
Group: Development/Ruby |
168 |
Conflicts: ruby < 1.9 |
Conflicts: ruby < 1.9 |
169 |
BuildArch: noarch |
BuildArch: noarch |
170 |
|
|
171 |
|
%define bigdecimal_ver 1.2.0 |
172 |
%package bigdecimal |
%package bigdecimal |
173 |
Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic |
Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic |
174 |
Group: Development/Ruby |
Group: Development/Ruby |
175 |
Version: 1.1.0 |
Version: %{bigdecimal_ver} |
176 |
License: GPL+ or Artistic |
License: GPL+ or Artistic |
177 |
Requires: ruby(abi) = %{subver} |
Requires: ruby(abi) = %{subver} |
178 |
Requires: ruby(rubygems) >= %{rubygems_version} |
Requires: ruby(rubygems) >= %{rubygems_version} |
|
Provides: rubygem(bigdecimal) = 1.1.0 |
|
179 |
|
|
180 |
|
%define io_console_ver 0.4.2 |
181 |
%package io-console |
%package io-console |
182 |
Summary: IO/Console is a simple console utilizing library |
Summary: IO/Console is a simple console utilizing library |
183 |
Group: Development/Ruby |
Group: Development/Ruby |
184 |
Version: 0.3 |
Version: %{io_console_ver} |
185 |
Requires: ruby(abi) = %{subver} |
Requires: ruby(abi) = %{subver} |
186 |
Requires: ruby(rubygems) >= %{rubygems_version} |
Requires: ruby(rubygems) >= %{rubygems_version} |
187 |
Provides: rubygem(io-console) = 0.3 |
|
188 |
|
%define psych_ver 2.0.0 |
189 |
|
%package psych |
190 |
|
Summary: A libyaml wrapper for Ruby |
191 |
|
Version: %{psych_ver} |
192 |
|
Group: Development/Ruby |
193 |
|
License: MIT |
194 |
|
Requires: ruby(abi) = %{subver} |
195 |
|
Requires: ruby(rubygems) >= %{rubygems_version} |
196 |
|
Conflicts: ruby < 2.0.0 |
197 |
|
|
198 |
|
%define test_unit_ver 2.0.0 |
199 |
|
%package test-unit |
200 |
|
Summary: test/unit compatible API testing framework |
201 |
|
Version: %{psych_ver} |
202 |
|
Group: Development/Ruby |
203 |
|
License: MIT |
204 |
|
Requires: ruby(abi) = %{subver} |
205 |
|
Requires: ruby(rubygems) >= %{rubygems_version} |
206 |
|
Conflicts: ruby < 2.0.0 |
207 |
|
BuildArch: noarch |
208 |
|
|
209 |
%description |
%description |
210 |
Ruby is the interpreted scripting language for quick and |
Ruby is the interpreted scripting language for quick and |
292 |
IO/Console provides very simple and portable access to console. It doesn't |
IO/Console provides very simple and portable access to console. It doesn't |
293 |
provide higher layer features, such like curses and readline. |
provide higher layer features, such like curses and readline. |
294 |
|
|
295 |
|
%description psych |
296 |
|
Psych is a YAML parser and emitter. Psych leverages |
297 |
|
libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting |
298 |
|
capabilities. In addition to wrapping libyaml, Psych also knows how to |
299 |
|
serialize and de-serialize most Ruby objects to and from the YAML format. |
300 |
|
|
301 |
|
%description test-unit |
302 |
|
This library implements test/unit compatible API on minitest. |
303 |
|
The test/unit means that test/unit which was bundled with Ruby 1.8. |
304 |
|
|
305 |
%prep |
%prep |
306 |
%setup -q -n ruby-%{rubyver}-%{patchversion} |
%setup -q -n ruby-%{rubyver}-%{patchversion} |
307 |
%apply_patches |
%apply_patches |
311 |
%build |
%build |
312 |
autoconf |
autoconf |
313 |
CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` |
CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` |
314 |
%configure2_5x --enable-shared --disable-rpath --enable-pthread --disable-versioned-paths \ |
%configure2_5x --enable-shared --disable-rpath --enable-pthread \ |
315 |
--with-rubylibprefix='%{ruby_libdir}' \ |
--with-rubylibprefix='%{ruby_libdir}' \ |
316 |
--with-archdir='%{ruby_libarchdir}' \ |
--with-rubyarchprefix='%{ruby_libarchdir}' \ |
317 |
--with-sitedir='%{ruby_sitelibdir}' \ |
--with-sitedir='%{ruby_sitelibdir}' \ |
318 |
--with-sitearchdir='%{ruby_sitearchdir}' \ |
--with-sitearchdir='%{ruby_sitearchdir}' \ |
319 |
--with-vendordir='%{ruby_vendorlibdir}' \ |
--with-vendordir='%{ruby_vendorlibdir}' \ |
320 |
--with-vendorarchdir='%{ruby_vendorarchdir}' \ |
--with-vendorarchdir='%{ruby_vendorarchdir}' \ |
321 |
--with-rubyhdrdir='%{_includedir}' \ |
--with-rubyhdrdir='%{_includedir}' \ |
322 |
--with-rubygemsdir='%{rubygems_dir}' |
--with-rubyarchhdrdir='$(archincludedir)' \ |
323 |
|
--with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ |
324 |
|
--with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ |
325 |
|
--with-rubygemsdir='%{rubygems_dir}' \ |
326 |
|
--with-ruby-pc='%{name}.pc' \ |
327 |
|
--enable-multiarch \ |
328 |
|
--with-ruby-version='' |
329 |
%make |
%make |
330 |
|
|
331 |
%install |
%install |
345 |
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d |
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d |
346 |
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d |
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d |
347 |
|
|
348 |
|
# Install custom operating_system.rb |
349 |
|
mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults |
350 |
|
cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults |
351 |
|
|
352 |
# drop gems if not wanted, so that we could split them out as seperated source rpm |
# drop gems if not wanted, so that we could split them out as seperated source rpm |
353 |
%if !%build_gems |
%if !%build_gems |
354 |
rm -f %{buildroot}%{_bindir}/{rake,rdoc,ri} |
rm -f %{buildroot}%{_bindir}/{rake,rdoc,ri,testrb} |
355 |
rm -f %{buildroot}%{_mandir}/man1/{rake,ri}.* |
rm -f %{buildroot}%{_mandir}/man1/{rake,ri}.* |
356 |
rm -fr %{buildroot}%{ruby_libdir}/{minitest,rake,rdoc,json,bigdecimal,io} |
rm -fr %{buildroot}%{ruby_libdir}/{minitest,rake,rdoc,json,bigdecimal,io} |
357 |
rm -fr %{buildroot}%{ruby_libarchdir}/{json,bigdecimal.so,io/console.so} |
rm -fr %{buildroot}%{ruby_libarchdir}/{json,bigdecimal.so,io/console.so} |
358 |
rm -fr %{buildroot}%{rubygems_dir}/%{rubyapi} |
rm -fr %{buildroot}%{rubygems_dir} |
359 |
%if !%bootstrap |
%if !%bootstrap |
360 |
rm -f %{buildroot}%{_bindir}/gem |
rm -f %{buildroot}%{_bindir}/gem |
361 |
rm -fr %{buildroot}%{rubygems_dir}/rbconfig |
rm -fr %{buildroot}%{rubygems_dir}/rbconfig |
371 |
%files |
%files |
372 |
%{_bindir}/erb |
%{_bindir}/erb |
373 |
%{_bindir}/ruby |
%{_bindir}/ruby |
|
%{_bindir}/testrb |
|
374 |
%dir %{ruby_libdir} |
%dir %{ruby_libdir} |
375 |
%{ruby_libdir}/*.rb |
%{ruby_libdir}/*.rb |
376 |
%exclude %{ruby_libdir}/irb.rb |
%exclude %{ruby_libdir}/irb.rb |
404 |
%{ruby_libdir}/net |
%{ruby_libdir}/net |
405 |
%{ruby_libdir}/openssl |
%{ruby_libdir}/openssl |
406 |
%{ruby_libdir}/optparse |
%{ruby_libdir}/optparse |
|
%{ruby_libdir}/psych |
|
407 |
%{ruby_libdir}/racc |
%{ruby_libdir}/racc |
408 |
%{ruby_libdir}/rbconfig |
%{ruby_libdir}/rbconfig |
409 |
%{ruby_libdir}/rexml |
%{ruby_libdir}/rexml |
411 |
%{ruby_libdir}/ripper |
%{ruby_libdir}/ripper |
412 |
%{ruby_libdir}/rss |
%{ruby_libdir}/rss |
413 |
%{ruby_libdir}/shell |
%{ruby_libdir}/shell |
414 |
%{ruby_libdir}/syck |
%{ruby_libdir}/syslog |
|
%{ruby_libdir}/test |
|
415 |
%{ruby_libdir}/uri |
%{ruby_libdir}/uri |
416 |
%{ruby_libdir}/webrick |
%{ruby_libdir}/webrick |
417 |
%{ruby_libdir}/xmlrpc |
%{ruby_libdir}/xmlrpc |
437 |
%{ruby_libarchdir}/fiber.so |
%{ruby_libarchdir}/fiber.so |
438 |
%{ruby_libarchdir}/fiddle.so |
%{ruby_libarchdir}/fiddle.so |
439 |
%{ruby_libarchdir}/gdbm.so |
%{ruby_libarchdir}/gdbm.so |
|
%{ruby_libarchdir}/iconv.so |
|
440 |
%dir %{ruby_libarchdir}/io |
%dir %{ruby_libarchdir}/io |
441 |
%{ruby_libarchdir}/io/nonblock.so |
%{ruby_libarchdir}/io/nonblock.so |
442 |
%{ruby_libarchdir}/io/wait.so |
%{ruby_libarchdir}/io/wait.so |
446 |
%{ruby_libarchdir}/objspace.so |
%{ruby_libarchdir}/objspace.so |
447 |
%{ruby_libarchdir}/openssl.so |
%{ruby_libarchdir}/openssl.so |
448 |
%{ruby_libarchdir}/pathname.so |
%{ruby_libarchdir}/pathname.so |
|
%{ruby_libarchdir}/psych.so |
|
449 |
%{ruby_libarchdir}/pty.so |
%{ruby_libarchdir}/pty.so |
450 |
%dir %{ruby_libarchdir}/racc |
%dir %{ruby_libarchdir}/racc |
451 |
%{ruby_libarchdir}/racc/*.so |
%{ruby_libarchdir}/racc/*.so |
456 |
%{ruby_libarchdir}/socket.so |
%{ruby_libarchdir}/socket.so |
457 |
%{ruby_libarchdir}/stringio.so |
%{ruby_libarchdir}/stringio.so |
458 |
%{ruby_libarchdir}/strscan.so |
%{ruby_libarchdir}/strscan.so |
|
%{ruby_libarchdir}/syck.so |
|
459 |
%{ruby_libarchdir}/syslog.so |
%{ruby_libarchdir}/syslog.so |
460 |
%{ruby_libarchdir}/zlib.so |
%{ruby_libarchdir}/zlib.so |
461 |
%{_mandir}/man1/erb.1.* |
%{_mandir}/man1/erb.1.* |
478 |
|
|
479 |
%files doc |
%files doc |
480 |
%{_datadir}/ri |
%{_datadir}/ri |
481 |
%{_datadir}/doc/ruby/html/* |
%{_datadir}/doc/ruby |
482 |
|
|
483 |
%files -n %{libname} |
%files -n %{libname} |
484 |
%{_libdir}/libruby.so.%{subver} |
%{_libdir}/libruby.so.%{subver} |
533 |
|
|
534 |
%files minitest |
%files minitest |
535 |
%{ruby_libdir}/minitest |
%{ruby_libdir}/minitest |
536 |
%{rubygems_dir}/%{rubyapi}/specifications/minitest-*.gemspec |
%{rubygems_dir}/specifications/default/minitest-*.gemspec |
537 |
|
|
538 |
%files rake |
%files rake |
539 |
%{_bindir}/rake |
%{_bindir}/rake |
540 |
%{_mandir}/man1/rake.1.* |
%{_mandir}/man1/rake.1.* |
541 |
%{ruby_libdir}/rake |
%{ruby_libdir}/rake |
542 |
%{rubygems_dir}/%{rubyapi}/gems/rake-* |
%{rubygems_dir}/gems/rake-* |
543 |
%{rubygems_dir}/%{rubyapi}/specifications/rake-*.gemspec |
%{rubygems_dir}/specifications/default/rake-*.gemspec |
544 |
|
|
545 |
%files rdoc |
%files rdoc |
546 |
%{_bindir}/rdoc |
%{_bindir}/rdoc |
547 |
%{_bindir}/ri |
%{_bindir}/ri |
548 |
%{ruby_libdir}/rdoc |
%{ruby_libdir}/rdoc |
549 |
%{rubygems_dir}/%{rubyapi}/gems/rdoc-* |
%{rubygems_dir}/gems/rdoc-* |
550 |
%{rubygems_dir}/%{rubyapi}/specifications/rdoc-*.gemspec |
%{rubygems_dir}/specifications/default/rdoc-*.gemspec |
551 |
%{_mandir}/man1/ri.1.* |
%{_mandir}/man1/ri.1.* |
552 |
|
|
553 |
%files json |
%files json |
555 |
%dir %{ruby_libarchdir}/json/ext |
%dir %{ruby_libarchdir}/json/ext |
556 |
%{ruby_libarchdir}/json/ext/*.so |
%{ruby_libarchdir}/json/ext/*.so |
557 |
%{ruby_libdir}/json |
%{ruby_libdir}/json |
558 |
%{rubygems_dir}/%{rubyapi}/specifications/json-*.gemspec |
%{rubygems_dir}/specifications/default/json-*.gemspec |
559 |
|
|
560 |
%files bigdecimal |
%files bigdecimal |
561 |
%{ruby_libdir}/bigdecimal |
%{ruby_libdir}/bigdecimal |
562 |
%{ruby_libarchdir}/bigdecimal.so |
%{ruby_libarchdir}/bigdecimal.so |
563 |
%{rubygems_dir}/%{rubyapi}/specifications/bigdecimal-*.gemspec |
%{rubygems_dir}/specifications/default/bigdecimal-*.gemspec |
564 |
|
|
565 |
%files io-console |
%files io-console |
566 |
%{ruby_libdir}/io |
%{ruby_libdir}/io |
567 |
%{ruby_libarchdir}/io/console.so |
%{ruby_libarchdir}/io/console.so |
568 |
%{rubygems_dir}/%{rubyapi}/specifications/io-console-*.gemspec |
%{rubygems_dir}/specifications/default/io-console-*.gemspec |
569 |
|
|
570 |
|
%files psych |
571 |
|
%{ruby_libdir}/psych |
572 |
|
%{ruby_libarchdir}/psych.so |
573 |
|
%{rubygems_dir}/specifications/default/psych-*.gemspec |
574 |
|
|
575 |
|
%files test-unit |
576 |
|
%{_bindir}/testrb |
577 |
|
%{ruby_libdir}/test |
578 |
|
%{rubygems_dir}/gems/test-unit-* |
579 |
|
%{rubygems_dir}/specifications/default/test-unit-*.gemspec |
580 |
%endif |
%endif |