%define subver 1.9 %define rubyver 1.9.3 %define patchversion p194 %define rel 1 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 Patch0: ruby-lib64.patch Patch1: ruby-do-not-use-system-ruby-to-generate-ri-doc.patch Patch2: ruby-add-old-os-to-search-path.patch Patch3: ruby-do_not_propagate_no-undefined.patch URL: http://www.ruby-lang.org/ %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} %build CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` %configure2_5x --enable-shared --disable-rpath --enable-pthread %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