]> git.pld-linux.org Git - packages/ruby.git/blobdiff - ruby.spec
disable default ruby (use ruby1.9 suffix)
[packages/ruby.git] / ruby.spec
index 7fd5eb7310427b8ebb64c53908e09a21cbac718e..7897bc49e2fbbfae976b630a1d9371cfcfe9268e 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,4 +1,3 @@
-#
 # TODO:
 #      - include ext/ in docs
 #      - replace ri with fastri
@@ -8,49 +7,54 @@
 #
 # Conditional build:
 %bcond_without doc             # skip (time-consuming) docs generating; intended for speed up test builds
-%bcond_without tk              # skip building package with Tk bindings
+%bcond_with    tk              # skip building package with Tk bindings
 %bcond_without batteries       # Don't include rubygems, json, rake, minitest
+%bcond_with    default_ruby    # use this Ruby as default system Ruby
 %bcond_with    bootstrap       # build bootstrap version
 
+%define                rel             3
 %define                ruby_version    1.9
 %define                basever         1.9.3
-%define                patchlevel      392
+%define                patchlevel      547
+
+%define                ruby_suffix %{!?with_default_ruby:%{ruby_version}}
 %define                doc_version     1_9_3
 %define                json_ver        1.5.5
 %define                rake_ver        0.9.2.2
-%define                rubygems_ver    1.8.11
+%define                rubygems_ver    1.8.23.2
 %define                minitest_ver    2.5.1
+# when increasing rdoc_ver, please remove "11." prefix in rdoc package release
 %define                rdoc_ver        3.9.5
+%define                irb_ver         0.9.6
 %define                bigdecimal_ver  1.1.0
 %define                io_console_ver  0.3
+%define                oname   ruby
 Summary:       Ruby - interpreted scripting language
 Summary(ja.UTF-8):     オブジェクト指向言語Rubyインタプリタ
 Summary(pl.UTF-8):     Ruby - interpretowany język skryptowy
 Summary(pt_BR.UTF-8):  Linguagem de script orientada a objeto
 Summary(zh_CN.UTF-8):  ruby - 一种快速高效的面向对象脚本编程语言
-Name:          ruby
+Name:          ruby%{ruby_suffix}
 Version:       %{basever}.%{patchlevel}
-# NOTE: do not decrease Release, when updating Version,
-# unless rdoc_ver, rubygems_ver *both* are increased as well
-Release:       10
+Release:       %{rel}
 Epoch:         1
 # Public Domain for example for: include/ruby/st.h, strftime.c, ...
 License:       (Ruby or BSD) and Public Domain
 Group:         Development/Languages
-Source0:       ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_version}/%{name}-%{basever}-p%{patchlevel}.tar.bz2
-# Source0-md5: a810d64e2255179d2f334eb61fb8519c
-Source1:       http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz
+Source0:       ftp://ftp.ruby-lang.org/pub/ruby/1.9/%{oname}-%{basever}-p%{patchlevel}.tar.bz2
+# Source0-md5: 5363d399be7f827c77bf8ae5d1a69b38
+Source1:       http://www.ruby-doc.org/download/%{oname}-doc-bundle.tar.gz
 # Source1-md5: ad1af0043be98ba1a4f6d0185df63876
-Source2:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz
+Source2:       http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz
 # Source2-md5: ec622612428672c432b6f65dd31a84b5
-Source3:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz
+Source3:       http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz
 # Source3-md5: 1892aadde51d36106c513bced2193dff
-Source100:     ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz
+Source100:     ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{oname}-1.8.7-p330.tar.gz
 # Source100-md5:       50a49edb787211598d08e756e733e42e
 Source4:       rdoc.1
 Source5:       testrb.1
-Patch0:                %{name}-lib64.patch
-Patch1:                %{name}-ffs.patch
+Patch0:                %{oname}-lib64.patch
+Patch1:                %{oname}-ffs.patch
 Patch2:                fix-bison-invocation.patch
 # http://redmine.ruby-lang.org/issues/5231
 Patch3:                disable-versioned-paths.patch
@@ -60,10 +64,11 @@ Patch4:             arch-specific-dir.patch
 Patch5:                site-and-vendor-arch-flags.patch
 # Make mkmf verbose by default
 Patch6:                mkmf-verbose.patch
+Patch7:                strip-ccache.patch
 URL:           http://www.ruby-lang.org/
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
-BuildRequires: bison
+BuildRequires: bison >= 1.875
 BuildRequires: db-devel
 BuildRequires: gdbm-devel >= 1.8.3
 BuildRequires: libffi-devel
@@ -73,6 +78,7 @@ BuildRequires:        pkgconfig
 BuildRequires: readline-devel >= 4.2
 BuildRequires: rpm-build >= 5.4.10-49
 # boostrap needs ruby binary, erb module
+%{!?with_bootstrap:BuildRequires:      rpm-rubyprov}
 %{!?with_bootstrap:BuildRequires:      ruby-modules}
 %{!?with_bootstrap:BuildRequires:      ruby}
 BuildRequires: sed >= 4.0
@@ -90,37 +96,36 @@ Conflicts:  ruby-activesupport2 < 2.3.11-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define        ruby_ridir              %{_datadir}/ri/%{ruby_version}/system
-%define        gem_dir                 %{_datadir}/%{name}/gems/%{ruby_version}
+%define        gem_dir                 %{_datadir}/%{oname}/gems/%{ruby_version}
 
-# 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}/rubygems
+# location where rubygems is installed
+%define        rubygems_dir            %{ruby_libdir}
 
-%define        ruby_archdir            %{_libdir}/%{name}/%{ruby_version}
-%define        ruby_libdir             %{_datadir}/%{name}/%{ruby_version}
+%define        ruby_archdir            %{_libdir}/%{oname}/%{ruby_version}
+%define        ruby_libdir             %{_datadir}/%{oname}/%{ruby_version}
 
 # This is the local lib/arch and should not be used for packaging.
 %define        sitedir                 site_ruby
-%define        ruby_sitedir            %{_prefix}/local/share/%{name}/%{sitedir}
-%define        ruby_sitearchdir        %{_prefix}/local/%{_lib}/%{name}/%{sitedir}/%{ruby_version}
-%define        ruby_sitelibdir         %{_prefix}/local/share/%{name}/%{sitedir}/%{ruby_version}
+%define        ruby_sitedir            %{_prefix}/local/share/%{oname}/%{sitedir}
+%define        ruby_sitearchdir        %{_prefix}/local/%{_lib}/%{oname}/%{sitedir}/%{ruby_version}
+%define        ruby_sitelibdir         %{_prefix}/local/share/%{oname}/%{sitedir}/%{ruby_version}
 
 # This is the general location for libs/archs compatible with all
 # or most of the Ruby versions available in the PLD repositories.
 %define        vendordir               vendor_ruby
-%define        ruby_vendordir          %{_datadir}/%{name}/%{vendordir}
-%define        ruby_vendorarchdir      %{_libdir}/%{name}/%{vendordir}/%{ruby_version}
-%define        ruby_vendorlibdir       %{_datadir}/%{name}/%{vendordir}/%{ruby_version}
+%define        ruby_vendordir          %{_datadir}/%{oname}/%{vendordir}
+%define        ruby_vendorarchdir      %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}
+%define        ruby_vendorlibdir       %{_datadir}/%{oname}/%{vendordir}/%{ruby_version}
 
 # TODO: drop legacy loadpaths after all ruby modules rebuilt in Th
-%define        legacy_libdir           %{_libdir}/%{name}/%{ruby_version}
-%define        legacy_archdir          %{_libdir}/%{name}/%{ruby_version}/%{_target_cpu}-linux
-%define        legacy_sitedir          %{_libdir}/%{name}/%{sitedir}
-%define        legacy_sitelibdir       %{_libdir}/%{name}/%{sitedir}/%{ruby_version}
-%define        legacy_sitearchdir      %{_libdir}/%{name}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux
-%define        legacy_vendordir        %{_libdir}/%{name}/%{vendordir}
-%define        legacy_vendorlibdir     %{_libdir}/%{name}/%{vendordir}/%{ruby_version}
-%define        legacy_vendorarchdir    %{_libdir}/%{name}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux
+%define        legacy_libdir           %{_libdir}/%{oname}/%{ruby_version}
+%define        legacy_archdir          %{_libdir}/%{oname}/%{ruby_version}/%{_target_cpu}-linux
+%define        legacy_sitedir          %{_libdir}/%{oname}/%{sitedir}
+%define        legacy_sitelibdir       %{_libdir}/%{oname}/%{sitedir}/%{ruby_version}
+%define        legacy_sitearchdir      %{_libdir}/%{oname}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux
+%define        legacy_vendordir        %{_libdir}/%{oname}/%{vendordir}
+%define        legacy_vendorlibdir     %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}
+%define        legacy_vendorarchdir    %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux
 
 %define        legacy_siteloadpath     %{legacy_sitelibdir}\\0%{legacy_sitearchdir}\\0%{legacy_sitedir}
 %define        legacy_vendorloadpath   %{legacy_vendorarchdir}
@@ -175,25 +180,18 @@ Provides: ruby-io-console = %{io_console_ver}
 # ruby-modules deprecated, rpm5 generates ruby(abi) itself
 Provides:      ruby-modules(ver) = %{ruby_version}
 %if %{with batteries}
-Provides:      rake = %{rake_ver}
-Provides:      ruby-json = %{json_ver}
 Provides:      ruby-minitest = %{minitest_ver}
-Provides:      ruby-rake = %{rake_ver}
-Obsoletes:     ruby-json <= 1.5.4
 Obsoletes:     ruby-minitest <= 1.5.0
-Obsoletes:     ruby-rake < 0.9.2.2
 %endif
 
 %description modules
 Ruby standard modules and utilities:
 - erb - Tiny eRuby
-- irb - interactive Ruby
 - testrb - automatic runner for Test::Unit of Ruby
 
 %description modules -l pl.UTF-8
 Standardowe moduły i narzędzia Ruby:
 - erb - mały eRuby
-- irb - interaktywny Ruby
 - testrb - automatyczny runner dla Ruby Test::Unit
 
 %package tk
@@ -203,7 +201,7 @@ Group:              Development/Languages
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
 
 %description tk
-This pachage contains Ruby/Tk bindings.
+This package contains Ruby/Tk bindings.
 
 %description tk -l pl.UTF-8
 Ten pakiet zawiera wiązania Ruby/Tk.
@@ -213,6 +211,8 @@ Summary:    Ruby development libraries
 Summary(pl.UTF-8):     Biblioteki programistyczne interpretera języka Ruby
 Group:         Development/Languages
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+Requires:      gcc
+Requires:      glibc-devel
 Requires:      pkgconfig
 
 %description devel
@@ -277,15 +277,37 @@ Ruby examples.
 %description examples -l pl.UTF-8
 Przykłady programów w języku Ruby.
 
-# IMPORTANT: keep this as last package, as we reset Epoch
+# IMPORTANT: keep irb, rdoc, rubygems, rake, json as last packages as we reset epoch/version/release
+# and %{version},%{release} macros may not be used directly as they take last
+# subpackage value not main package one what you intend to use
+
+%package irb
+Summary:       The Interactive Ruby
+Version:       %{irb_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+Group:         Development/Languages
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
+Provides:      irb = %{version}-%{release}
+Provides:      ruby(irb) = %{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description irb
+The irb is acronym for Interactive Ruby. It evaluates ruby expression
+from the terminal.
+
 %package rdoc
 Summary:       A tool to generate HTML and command-line documentation for Ruby projects
 Summary(pl.UTF-8):     Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym
 Version:       %{rdoc_ver}
+# remove "11." when rdoc_ver is increased
+Release:       11.%{basever}.%{patchlevel}.%{rel}
 Epoch:         0
 License:       GPL v2 and Ruby and MIT
 Group:         Development/Libraries
-Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{release}
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
 Obsoletes:     rdoc <= 0.9.0
 %if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
@@ -305,11 +327,13 @@ wyświetlania dokumentacji online.
 Summary:       RubyGems - the Ruby standard for packaging Ruby libraries
 Summary(pl.UTF-8):     RubyGems - standard Ruby'ego pakietowania bibliotek
 Version:       %{rubygems_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
 Epoch:         0
 License:       Ruby or MIT
 Group:         Development/Libraries
-Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{release}
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
 Requires:      %{name}-rdoc >= %{rdoc_ver}
+Suggests:      %{name}-devel
 Provides:      rubygems = %{rubygems_ver}
 %if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
@@ -323,11 +347,70 @@ libraries.
 RubyGems to standardowe narzędzie języka Ruby do publikowania i
 zarządzania zewnętrznymi bibliotekami.
 
+%package rake
+Summary:       Rake is a Make-like program implemented in Ruby
+Summary(pl.UTF-8):     Program typu Make dla języka Ruby
+Version:       %{rake_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Provides:      rake = %{rake_ver}
+Conflicts:     ruby-modules < 1:1.9.3.429-2
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description rake
+Rake is a simple Ruby build program with capabilities similar to make.
+
+It has the following features:
+- Rakefiles (rake's version of Makefiles) are completely defined in
+  standard Ruby syntax. No XML files to edit. No quirky Makefile syntax
+  to worry about (is that a tab or a space?)
+- Users can specify tasks with prerequisites.
+- Rake supports rule patterns to synthesize implicit tasks.
+- Rake is lightweight. It can be distributed with other projects as a
+  single file. Projects that depend upon rake do not require that rake
+  be installed on target systems.
+
+%description rake -l pl.UTF-8
+Rake to prosty program do budowania w języku Ruby o możliwościach
+podobnych do make.
+
+Ma następujące cechy:
+- Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane
+  całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować
+  plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to
+  tabulacja czy spacja?).
+- Użytkownicy mogą określać zadania z ich zależnościami.
+- Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań.
+- Rake jest lekki. Może być rozpowszechniany z innymi projektami jako
+  pojedynczy plik. Projekty używające rake'a nie wymagają go
+  zainstalowanego na systemach docelowych.
+
+%package json
+Summary:       JSON library for Ruby
+Summary(pl.UTF-8):     Biblioteka JSON dla języka Ruby
+Version:       %{json_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Obsoletes:     ruby-json-rubyforge
+Conflicts:     ruby-modules < 1:1.9.3.429-3
+
+%description json
+This is a JSON implementation as a Ruby extension in C.
+
+%description json -l pl.UTF-8
+Biblioteka JSON dla języka Ruby.
+
 %prep
 %if %{with bootstrap}
-%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
+%setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
 %else
-%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3
+%setup -q -n %{oname}-%{basever}-p%{patchlevel} -a1 -a2 -a3
 %endif
 %patch0 -p1
 %patch1 -p1
@@ -335,6 +418,8 @@ zarządzania zewnętrznymi bibliotekami.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 # must be regenerated with new bison
 %{__rm} parse.{c,h}
@@ -346,11 +431,22 @@ find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \
        | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,'
 
 %build
+rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs)
+if [ $rubygems_ver != %{rubygems_ver} ]; then
+       echo "Set %%define rubygems_ver to $rubygems_ver and re-run."
+       exit 1
+fi
+rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc.rb | xargs)
+if [ $rdoc_ver != %{rdoc_ver} ]; then
+       echo "Set %%define rdoc_ver to $rdoc_ver and re-run."
+       exit 1
+fi
+
 cp -f /usr/share/automake/config.sub .
 
 # build ruby-1.8.7 first
 %if %{with bootstrap}
-cd %{name}-1.8.7-p330
+cd %{oname}-1.8.7-p330
 %configure
 %{__make}
 cd ..
@@ -358,14 +454,14 @@ cd ..
 
 %{__autoconf}
 %configure \
-       %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \
+       %{?with_bootstrap:--with-baseruby=%{oname}-1.8.7-p330/miniruby} \
+       --program-suffix=%{ruby_suffix} \
        --with-rubylibprefix=%(dirname %{ruby_libdir}) \
        --with-archdir=%{ruby_archdir} \
        --with-sitedir=%(dirname %{ruby_sitelibdir}) \
        --with-sitearchdir=%{ruby_sitearchdir} \
        --with-vendordir=%(dirname %{ruby_vendorlibdir}) \
        --with-vendorarchdir=%{ruby_vendorarchdir} \
-       --with-rubygemsdir=%{rubygems_dir} \
        --with-search-path="%{legacy_loadpaths}" \
        --enable-shared \
        --enable-pthread \
@@ -375,7 +471,7 @@ cd ..
 
 %{__make} -j1 main \
        COPY="cp -p" Q= \
-       %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"}
+       %{?with_bootstrap:BASERUBY="%{oname}-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"}
 
 %if %{with doc}
 %{__make} -j1 rdoc
@@ -383,20 +479,24 @@ cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \
-       $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_ridir}} \
+install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \
+       $RPM_BUILD_ROOT{%{ruby_vendorarchdir} \
        $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \
+       $RPM_BUILD_ROOT%{ruby_vendordir}/data \
        $RPM_BUILD_ROOT{%{legacy_archdir}/racc,%{legacy_sitelibdir},%{legacy_sitearchdir},%{legacy_vendorarchdir},%{legacy_libdir}/tasks} \
 
 %{__make} install %{?with_doc:install-doc} \
        DESTDIR=$RPM_BUILD_ROOT
 
-cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
-cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel}
+cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel}
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/testrb%{ruby_suffix}.1
 
 %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html
 
+ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake%{ruby_suffix}
+
 %if %{without batteries}
 # packaged separately
 %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest}
@@ -424,24 +524,19 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc NEWS LEGAL README README.EXT ChangeLog ToDo
-%attr(755,root,root) %{_bindir}/ruby
+%attr(755,root,root) %{_bindir}/ruby%{ruby_suffix}
 %attr(755,root,root) %{_libdir}/libruby.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9
-%{_mandir}/man1/ruby.1*
+%attr(755,root,root) %ghost %{_libdir}/libruby.so.%{ruby_version}
+%{_mandir}/man1/ruby%{ruby_suffix}.1*
 
-%if %{with batteries}
-# rake
-%attr(755,root,root) %{_bindir}/rake
-%{_mandir}/man1/rake.1*
-%endif
-
-%dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/%{vendordir}
-%dir %{_datadir}/%{name}
-%dir %{_datadir}/%{name}/%{vendordir}
+%dir %{_libdir}/%{oname}
+%dir %{_libdir}/%{oname}/%{vendordir}
+%dir %{_datadir}/%{oname}
 
 %dir %{ruby_libdir}
 %dir %{ruby_archdir}
+%dir %{ruby_vendordir}
+%dir %{ruby_vendordir}/data
 %dir %{ruby_vendorlibdir}
 %dir %{ruby_vendorarchdir}
 
@@ -466,7 +561,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libruby.so
-%{_includedir}/%{name}-%{ruby_version}
+%{_includedir}/%{oname}-%{ruby_version}
 %{_pkgconfigdir}/ruby-%{ruby_version}.pc
 %{ruby_libdir}/mkmf.rb
 
@@ -484,11 +579,18 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{ruby_archdir}/t*.so
 %endif
 
+%files irb
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/irb%{ruby_suffix}
+%{ruby_libdir}/irb.rb
+%{ruby_libdir}/irb
+%{_mandir}/man1/irb%{ruby_suffix}.1*
+
 %files rdoc
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/rdoc
-%attr(755,root,root) %{_bindir}/ri
-%{_mandir}/man1/rdoc.1*
+%attr(755,root,root) %{_bindir}/rdoc%{ruby_suffix}
+%attr(755,root,root) %{_bindir}/ri%{ruby_suffix}
+%{_mandir}/man1/rdoc%{ruby_suffix}.1*
 %{ruby_libdir}/rdoc
 %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}
 %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin
@@ -499,17 +601,34 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with batteries}
 %files rubygems
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/gem
-%{ruby_libdir}/rubygems
-%{ruby_libdir}/rubygems.rb
-%{ruby_libdir}/ubygems.rb
+%attr(755,root,root) %{_bindir}/gem%{ruby_suffix}
+%{rubygems_dir}/rubygems
+%{rubygems_dir}/rubygems.rb
+%{rubygems_dir}/ubygems.rb
+
+%files rake
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rake%{ruby_suffix}
+%{_mandir}/man1/rake%{ruby_suffix}.1*
+%{ruby_libdir}/rake
+%dir %{gem_dir}/gems/rake-%{rake_ver}
+%dir %{gem_dir}/gems/rake-%{rake_ver}/bin
+%attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake
+%{gem_dir}/specifications/rake-%{rake_ver}.gemspec
+
+%files json
+%defattr(644,root,root,755)
+%{ruby_libdir}/json
+%dir %{ruby_archdir}/json
+%dir %{ruby_archdir}/json/ext
+%attr(755,root,root) %{ruby_archdir}/json/ext/*.so
+%{gem_dir}/specifications/json-%{json_ver}.gemspec
 %endif
 
 %files modules
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/erb
-%attr(755,root,root) %{_bindir}/irb
-%attr(755,root,root) %{_bindir}/testrb
+%attr(755,root,root) %{_bindir}/erb%{ruby_suffix}
+%attr(755,root,root) %{_bindir}/testrb%{ruby_suffix}
 %{ruby_libdir}/bigdecimal
 %{ruby_libdir}/cgi
 %{ruby_libdir}/date
@@ -518,7 +637,6 @@ rm -rf $RPM_BUILD_ROOT
 %{ruby_libdir}/drb
 %{ruby_libdir}/fiddle
 %{ruby_libdir}/io
-%{ruby_libdir}/irb
 %{ruby_libdir}/matrix
 %{ruby_libdir}/net
 %{ruby_libdir}/openssl
@@ -551,6 +669,7 @@ rm -rf $RPM_BUILD_ROOT
 %exclude %{ruby_libdir}/rubygems.rb
 %exclude %{ruby_libdir}/ubygems.rb
 %endif
+%exclude %{ruby_libdir}/irb.rb
 %exclude %{ruby_libdir}/mkmf.rb
 %attr(755,root,root) %{ruby_archdir}/[a-s]*.so
 %attr(755,root,root) %{ruby_archdir}/[u-z]*.so
@@ -574,36 +693,21 @@ rm -rf $RPM_BUILD_ROOT
 %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec
 
 %if %{with batteries}
-# json
-%{ruby_libdir}/json
-%dir %{ruby_archdir}/json
-%dir %{ruby_archdir}/json/ext
-%attr(755,root,root) %{ruby_archdir}/json/ext/*.so
-%{gem_dir}/specifications/json-%{json_ver}.gemspec
-
 # minitest
 %{ruby_libdir}/minitest
 %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec
-
-# rake
-%{ruby_libdir}/rake
-%dir %{gem_dir}/gems/rake-%{rake_ver}
-%dir %{gem_dir}/gems/rake-%{rake_ver}/bin
-%attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake
-%{gem_dir}/specifications/rake-%{rake_ver}.gemspec
 %endif
 
 # parents of gem_dir
-%dir %{_datadir}/%{name}/gems
-#%dir %{_datadir}/%{name}/gems/%{ruby_version}
-%dir %{_datadir}/%{name}/gems/%{ruby_version}/gems
+%dir %{_datadir}/%{oname}/gems
+#%dir %{_datadir}/%{oname}/gems/%{ruby_version}
+%dir %{_datadir}/%{oname}/gems/%{ruby_version}/gems
 
 %dir %{gem_dir}
 %dir %{gem_dir}/specifications
-%{_mandir}/man1/erb.1*
-%{_mandir}/man1/irb.1*
-%{_mandir}/man1/ri.1*
-%{_mandir}/man1/testrb.1*
+%{_mandir}/man1/erb%{ruby_suffix}.1*
+%{_mandir}/man1/ri%{ruby_suffix}.1*
+%{_mandir}/man1/testrb%{ruby_suffix}.1*
 
 %files doc
 %defattr(644,root,root,755)
@@ -619,4 +723,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %files examples
 %defattr(644,root,root,755)
-%{_examplesdir}/%{name}-%{version}
+%{_examplesdir}/%{oname}-*
This page took 0.071633 seconds and 4 git commands to generate.