%define subver 1.9 %define rubyapi 1.9.1 %define rubyver 1.9.3 %define patchversion p194 %define rel 1 # This is the local lib/arch and should not be used for packaging. %define ruby_sitelibdir %{_datadir}/ruby/site_ruby/%{rubyapi} %define ruby_sitearchdir %{_libdir}/ruby/site_ruby/%{rubyapi} # This is the general location for libs/archs compatible with all # or most of the Ruby versions available in the Fedora repositories. %define ruby_vendorlibdir %{_datadir}/ruby/vendor_ruby/%{rubyapi} %define ruby_vendorarchdir %{_libdir}/ruby/vendor_ruby/%{rubyapi} # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. %define rubygems_dir %{_datadir}/ruby/gems/%{rubyapi} Summary: Object Oriented Script Language Name: ruby Version: %{rubyver}.%{patchversion} Release: %mkrel %rel License: Ruby or GPLv2 Group: Development/Ruby BuildRequires: autoconf BuildRequires: byacc BuildRequires: ncurses-devel BuildRequires: readline-devel BuildRequires: tcl-devel tk-devel BuildRequires: db-devel BuildRequires: gdbm-devel >= 1.8.3 BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: libffi-devel BuildRequires: yaml-devel BuildRequires: rpm-mageia-setup >= 1.158 Obsoletes: ruby-rexml Provides: ruby-rexml # explicit file provides (since such requires are automatically added by find-requires) Provides: /usr/bin/ruby Provides: ruby(abi) = %subver Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2 Source3: ruby.macros URL: http://www.ruby-lang.org/ # == FEDORA PATCHES BEGINS == # http://redmine.ruby-lang.org/issues/5231 Patch0: ruby-1.9.3-disable-versioned-paths.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 # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch # http://redmine.ruby-lang.org/issues/5465 Patch4: ruby-1.9.3-fix-s390x-build.patch # Fix the uninstaller, so that it doesn't say that gem doesn't exist # when it exists outside of the GEM_HOME (already fixed in the upstream) Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch # http://redmine.ruby-lang.org/issues/5135 - see comment 29 Patch6: ruby-1.9.3-webrick-test-fix.patch # Already fixed upstream: # https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 Patch7: ruby-1.9.3-bignum-test-fix.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-1.8.11-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch # == FEDORA PATCHES ENDS == %package doc Summary: Documentation for the powerful language Ruby Group: Development/Ruby BuildArch: noarch %package devel Summary: Development file for the powerful language Ruby Group: Development/Ruby Requires: %{name} = %{version} %package tk Summary: Tk extension for the powerful language Ruby Group: Development/Ruby Requires: %{name} = %{version} %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. %description doc 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. This package contains the Ruby's documentation %description devel 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. This package contains the Ruby's devel files. %description tk 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. This package contains the Tk extension for Ruby. %prep %setup -q -n ruby-%{rubyver}-%{patchversion} %apply_patches %build CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` %configure2_5x --enable-shared --disable-rpath --enable-pthread \ --with-sitedir='%{ruby_sitelibdir}' \ --with-sitearchdir='%{ruby_sitearchdir}' \ --with-vendordir='%{ruby_vendorlibdir}' \ --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubygemsdir='%{rubygems_dir}' %make %install %makeinstall_std install-doc install -d %buildroot%{_datadir}/emacs/site-lisp cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp install -d %buildroot%{_sysconfdir}/emacs/site-start.d cat <%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t) (add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode)) (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) EOF # Install the rpm macros mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d %check make test %files %{_bindir}/* %{_libdir}/libruby.so.* %{_libdir}/ruby %{_mandir}/*/* %{_datadir}/emacs/site-lisp/* %config(noreplace) %{_sysconfdir}/emacs/site-start.d/* %{_sysconfdir}/rpm/macros.d/%{name}.macros %files doc %{_datadir}/ri %files devel %{_includedir}/* %{_libdir}/libruby-static.a %{_libdir}/libruby.so %{_libdir}/pkgconfig/*.pc %files tk