%define major_version 2 %define minor_version 1 %define teeny_version 5 #%define patch_level 598 %define major_minor_version %{major_version}.%{minor_version} %define ruby_version_patch_level %{major_minor_version}.%{teeny_version} %define rubyver %{major_version}.%{minor_version}.%{teeny_version} #%define rubyminorver p%{patch_level} %{!?dist:%define dist .el5} %define ruby_abi 2.1.0 %define rubygems_version 2.2.2 %define rdoc_version 4.1.0 %define rake_version 10.1.0 %define irb_version %{ruby_version_patch_level} Name: ruby Version: %{rubyver} Release: 1%{?dist}.onapp License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel gcc unzip openssl-devel db4-devel byacc make BuildRequires: libyaml-devel libffi-devel Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}.tar.gz Summary: An interpreter of object-oriented scripting language Group: Development/Languages Provides: ruby(abi) = %{ruby_abi} Provides: ruby-irb = %{irb_version} Provides: ruby-rdoc = %{rdoc_version} Provides: ruby-libs = %{ruby_version_patch_level} Provides: ruby-devel = %{ruby_version_patch_level} Provides: rdoc = %{rdoc_version} Provides: ri = %{rdoc_version} Provides: rubygem(rdoc) = %{rdoc_version} Provides: rubygem-rdoc = %{rdoc_version} Provides: irb = %{irb_version} Provides: ruby(irb) = %{irb_version} Provides: rubygem-irb = %{irb_version} BuildArch: x86_64 %description Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible. %package -n rubygems Summary: The Ruby standard for packaging ruby libraries Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT Requires: %{name}-libs = %{ruby_version_patch_level} Requires: rubygem(rdoc) = %{rdoc_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch %description -n rubygems RubyGems is the Ruby standard for publishing and managing third party libraries. %package -n rubygem-rake Summary: Ruby based make-like utility Version: %{rake_version} Group: Development/Libraries License: Ruby or MIT Requires: ruby(rubygems) = %{rubygems_version} Provides: rake = %{version}-%{release} Provides: rubygem(rake) = %{version}-%{release} BuildArch: noarch %description -n rubygem-rake Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. %prep %setup -q -n ruby-%{rubyver} %build export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing" %configure \ --enable-shared \ --disable-rpath \ --without-X11 \ --without-tk \ --includedir=%{_includedir}/ruby \ --libdir=%{_libdir} make %{?_smp_mflags} %install # installing binaries ... make install DESTDIR=$RPM_BUILD_ROOT #we don't want to keep the src directory rm -rf $RPM_BUILD_ROOT/usr/src # Install custom operating_system.rb. #mkdir -p $RPM_BUILD_ROOT%{gem_libdir}/rubygems/defaults #cp %{SOURCE1} $RPM_BUILD_ROOT%{gem_libdir}/rubygems/defaults %clean #rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %{_bindir} %{_includedir} %{_datadir} %{_libdir} %exclude %{_bindir}/gem %exclude %{_libdir}/ruby/%{ruby_abi}/ubygems.rb %exclude %{_libdir}/ruby/%{ruby_abi}/rubygems %exclude %{_libdir}/ruby/%{ruby_abi}/rubygems.rb %exclude %{_libdir}/ruby/%{ruby_abi}/rbconfig/datadir.rb %exclude %{_bindir}/rake %exclude %{_libdir}/ruby/%{ruby_abi}/rake.rb %exclude %{_libdir}/ruby/%{ruby_abi}/rake %exclude %{_libdir}/ruby/gems/%{ruby_abi}/gems/rake-%{rake_version} %exclude %{_libdir}/ruby/gems/%{ruby_abi}/specifications/default/rake-%{rake_version}.gemspec %exclude %{_mandir}/man1/rake.1* %files -n rubygems %{_bindir}/gem %{_libdir}/ruby/%{ruby_abi}/ubygems.rb %{_libdir}/ruby/%{ruby_abi}/rubygems %{_libdir}/ruby/%{ruby_abi}/rubygems.rb %{_libdir}/ruby/%{ruby_abi}/rbconfig/datadir.rb %files -n rubygem-rake %{_bindir}/rake %{_libdir}/ruby/%{ruby_abi}/rake.rb %{_libdir}/ruby/%{ruby_abi}/rake %{_libdir}/ruby/gems/%{ruby_abi}/gems/rake-%{rake_version} %{_libdir}/ruby/gems/%{ruby_abi}/specifications/default/rake-%{rake_version}.gemspec %{_mandir}/man1/rake.1* %changelog * Thu Feb 26 2015 Yuriy Kohut - 2.1.5-1 - Update ruby version to 2.1.5 * Tue Dec 9 2014 Yuriy Kohut - 2.0.0-p598 - Update ruby version to 2.0.0-p598 * Mon Oct 15 2012 Yuriy Kohut - 1.9.3-p286 - Update ruby version to 1.9.3-p286 - dist macro definition added. * Wed Aug 1 2012 Yuriy Kohut - 1.9.3-p194 - Update ruby version to 1.9.3-p194 * Mon Mar 5 2012 Yuriy Kohut - 1.9.3-p125 - Update ruby version to 1.9.3-p125 - Ruby version 1.9.3-p125 - BuildRequires libffi-devel,libyaml-devel * Thu Nov 10 2011 Yuriy Kohut - 1.9.3-p0 - Update ruby version to 1.9.3-p0 - Splitted into packages: rubygem-rake rubygems * Mon Aug 29 2011 Gregory Graf - 1.9.2-p290 - Update ruby version to 1.9.2-p290 * Sat Jun 25 2011 Ian Meyer - 1.9.2-p180-2 - Remove non-existant --sitearchdir and --vedorarchdir from %configure - Replace --sitedir --vendordir with simpler --libdir - Change %{_prefix}/share to %{_datadir} * Tue Mar 7 2011 Robert Duncan - 1.9.2-p180-1 - Update prerequisites to include make - Update ruby version to 1.9.2-p180 - Install /usr/share documentation - (Hopefully!?) platform agnostic * Sun Jan 2 2011 Ian Meyer - 1.9.2-p136-1 - Initial spec to replace system ruby with 1.9.2-p136