%bcond_without test

%global major_version 2
%global minor_version 6
%global teeny_version 5

%global major_minor_version %{major_version}.%{minor_version}

%global ruby_version %{major_minor_version}.%{teeny_version}
%global ruby_release %{major_minor_version}.0
%global ruby_abi %{major_minor_version}.0

%global ruby_archive %{name}-%{ruby_version}

%global rubygems_version 3.0.3

# The RubyGems library has to stay out of Ruby directory tree, since the
# RubyGems should be share by all Ruby implementations.
%global rubygems_dir %{_datadir}/rubygems

# Specify custom RubyGems root.
#global gem_dir %{_datadir}/gems
%global gem_extdir %{_libdir}/gems
%global gem_extdirs %{_exec_prefix}/lib{,64}/gems

%global bundler_version 1.17.2
%global bundler_fileutils_version 1.1.0
%global bundler_molinillo_version 0.6.6
%global bundler_net_http_persistent_version 2.9.4
%global bundler_thor_version 0.20.0

# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version}

%global rake_version 12.3.2
%global rdoc_version 6.1.2
%global bigdecimal_version 1.4.1
%global io_console_version 0.4.7
%global json_version 2.1.0
%global minitest_version 5.11.3
%global psych_version 3.1.0
%global power_assert_version 1.1.3
%global test_unit_version 3.2.9
%global xmlrpc_version 0.3.0

# Note:
# As seen on perl srpm, as this (ruby) srpm contains several sub-components,
# we cannot reset the release number to 1 even when the main (ruby) version
# is updated - because it may be that the versions of sub-components don't
# change.
#
# 全てのサブパッケージのバージョンが上がる場合を除き、rubyのmainバージョンが
# 更新されても1には戻さずに必ず+1してください。
%global ruby_rel 1

%bcond_without emacsen
%define rbmode          ruby-mode
%define rbmode_el       ruby-mode

%global	_normalized_cpu	%(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i686/;s/sparcv./sparc/')

Summary: An interpreter of object-oriented scripting language
Summary(ja): オブジェクト指向言語 Ruby インタプリタ
Name: ruby
Version: %{ruby_version}
Release: %{ruby_rel}%{?_dist_release}
Group: Development/Languages
# Public Domain for example for: include/ruby/st.h, strftime.c, ...
License: (Ruby or BSD) and Public Domain
URL: http://ruby-lang.org/
Source0: https://cache.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz
Source1: operating_system.rb
Source3: abrt_prelude.rb

Source4: macros.ruby
Source5: macros.rubygems

# RPM dependency generators.
Source8: rubygems.attr
Source9: rubygems.req
Source10: rubygems.prov
Source11: rubygems.con

# changelog of fedora package
Source999: Changelog.fedora

# Vine
Source1000: %{rbmode_el}-install.sh
Source1001: %{rbmode_el}-remove.sh
Source1002: %{rbmode_el}-init.el

# The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras.
%{?load:%{SOURCE4}}
%{?load:%{SOURCE5}}

%global gem_extdir %{_libdir}/gems
%global gem_extdirs %{_exec_prefix}/lib{,64}/gems

#global ruby_libdir %{_datadir}/%{name}
#global ruby_libarchdir %{_libdir}/%{name}

# This is the local lib/arch and should not be used for packaging.
#global ruby_sitedir site_ruby
#global ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir}
#global ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir}

# This is the general location for libs/archs compatible with all
# or most of the Ruby versions
#global ruby_vendordir vendor_ruby
#global ruby_vendorlibdir %{_prefix}/share/ruby/%{ruby_vendordir}
#global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir}

### Patch[0-99] from fedora package
# Fix ruby_version abuse.
# https://bugs.ruby-lang.org/issues/11002
Patch0: ruby-2.3.0-ruby_version.patch
# http://bugs.ruby-lang.org/issues/7807
Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
# Allows to override libruby.so placement. Hopefully we will be able to return
# to plain --with-rubyarchprefix.
# http://bugs.ruby-lang.org/issues/8973
Patch2: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
# Force multiarch directories for i.86 to be always named i386. This solves
# some differencies in build between Fedora and RHEL.
Patch3: ruby-2.1.0-always-use-i386.patch
# Allows to install RubyGems into custom directory, outside of Ruby's tree.
# http://bugs.ruby-lang.org/issues/5617
Patch4: ruby-2.1.0-custom-rubygems-location.patch
# Make mkmf verbose by default
Patch5: ruby-1.9.3-mkmf-verbose.patch
# Adds support for '--with-prelude' configuration option. This allows to built
# in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566
Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
# Use miniruby to regenerate prelude.c.
# https://bugs.ruby-lang.org/issues/10554
Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
# Workaround "an invalid stdio handle" error on PPC, due to recently introduced
# hardening features of glibc (rhbz#1361037).
# https://bugs.ruby-lang.org/issues/12666
Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch

# `gem build ../foo.gemspec` changes directory, which does not play well with
# gems unpacked by setup macro.
# https://github.com/rubygems/rubygems/issues/2587
Patch11: rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch
# This allows to loosen the RDoc dependency again.
# https://github.com/rubygems/rubygems/pull/2604
Patch12: rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch

# Add support for .include directive used by OpenSSL config files.
# https://github.com/ruby/openssl/pull/216
Patch22: ruby-2.6.0-config-support-include-directive.patch


Requires: %{name}-libs = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
# Make the bigdecimal gem a runtime dependency of Ruby to avoid problems
# with user-installed gems, that don't require it in gemspec/Gemfile
# See https://bugzilla.redhat.com/show_bug.cgi?id=829209
# and http://bugs.ruby-lang.org/issues/6123
Requires: rubygem(bigdecimal) >= %{bigdecimal_version}

# Tcl/Tk was dropped from stdlib
Obsoletes: ruby-tcltk < 2.4.0


BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: autoconf
BuildRequires: gdbm-devel
BuildRequires: ncurses-devel
BuildRequires: libdb-devel
BuildRequires: libxcrypt-devel
BuildRequires: libffi-devel
BuildRequires: openssl-devel
BuildRequires: libyaml-devel
BuildRequires: readline-devel
BuildRequires: libX11-devel
BuildRequires: zlib-devel
# Needed to pass test_set_program_name(TestRubyOptions)
BuildRequires: procps

Distribution: Vine Linux
Vendor: Project Vine
Packager: daisuke


%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 -l ja
Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です．Rubyは最初
から純粋なオブジェクト指向言語として設計されていますから，オブジェクト
指向プログラミングを手軽に行う事が出来ます．もちろん通常の手続き型のプ
ログラミングも可能です．

Rubyはテキスト処理関係の能力などに優れ，Perlと同じくらい強力です．さら
にシンプルな文法と，例外処理やイテレータなどの機構によって，より分かり
やすいプログラミングが出来ます．

%package devel
Summary:    A Ruby development environment
Summary(ja): Ruby 開発環境
Group:      Development/Languages
# Requires:   %{name}-libs = %{version}-%{release}
Requires:   %{name} = %{version}-%{release}

%description devel
Header files and libraries for building an extension library for the
Ruby or an application embedding Ruby.

%description devel -l ja
Rubyのための拡張ライブラリやRubyを組み込んだアプリケーションを作るため
に必要となるへッダファイルやライブラリです．


%package libs
Summary:    Libraries necessary to run Ruby
Group:      Development/Libraries
License:    Ruby or BSD
Provides:   ruby(abi) = %{ruby_release}
Provides:   ruby(release) = %{ruby_release}
Provides:   libruby = %{version}-%{release}
Obsoletes:  libruby < 1.9
Obsoletes:  drb erb
Obsoletes:  ruby-csv ruby-optparse ruby-rexml ruby-strscan rubyunit racc-runtime
Obsoletes:  ruby-openssl < 1.9

%description libs
This package includes the libruby, necessary to run Ruby.

%description libs -l ja
このパッケージには Ruby を利用するために必要となるライブラリが含まれ
ています．


%package rubygems
Summary:    Packaging system for Ruby application or library
Summary(ja): Ruby アプリケーションやライブラリのためのパッケージシステム
Version:    %{rubygems_version}
Group:      Development/Libraries
License:    Ruby or MIT
Requires:   ruby(release) = %{ruby_release}
Requires:   rubygem(rdoc) >= %{rdoc_version}
Requires:   rubygem(io-console) >= %{io_console_version}
Requires:   rubygem(psych) >= %{psych_version}
Requires:   ca-certificates
Provides:   gem = %{version}-%{release}
Provides:   ruby(rubygems) = %{version}-%{release}
Obsoletes:  rubygems <= 1.8.24-1vl7
BuildArch:  noarch

%description rubygems
RubyGems is the Ruby standard for publishing and managing third party
libraries.

%description rubygems -l ja
RubyGems は Ruby 標準のサードパーティ製ライブラリのパッケージ管理
システムです。


%package rubygems-devel
Summary:    Macros and development tools for packaging RubyGems
Version:    %{rubygems_version}
Group:      Development/Libraries
License:    Ruby or MIT
Requires:   ruby(rubygems) = %{version}-%{release}
BuildArch:  noarch

%description rubygems-devel
Macros and development tools for packaging RubyGems.


%package -n rubygem-rake
Summary:    Ruby based make-like utility
Summary(ja): Ruby ベースの make のようなユーティリティ
Version:    %{rake_version}
Group:      Development/Libraries
License:    Ruby or MIT
Requires:   ruby(release) = %{ruby_release}
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.

%description -n rubygem-rake -l ja
Rake は Ruby ベースの make のようなユーティリティです。


%package irb
Summary:    The Interactive Ruby
Summary(ja):  インタラクティブ Ruby
Version:    %{irb_version}
Group:      Development/Libraries
Requires:   %{name}-libs = %{ruby_version}
Obsoletes:  irb < 1.9
Provides:   irb = %{version}-%{release}
Provides:   ruby(irb) = %{version}-%{release}
BuildArch:  noarch

%description irb
The irb is acronym for Interactive Ruby.  It evaluates ruby expression
from the terminal.

%description irb -l ja
irb は Interactive RuBy の略で、対話的にRubyの式を入力し、
評価させることが可能です。


%package -n rubygem-rdoc
Summary:    A tool to generate HTML and command-line documentation for Ruby projects
Summary(ja): Rubyのソースコードからドキュメントを生成するツール
Version:    %{rdoc_version}
Group:      Development/Libraries
License:    GPLv2 and Ruby and MIT
Requires:   ruby(release) = %{ruby_release}
Requires:   ruby(rubygems) >= %{rubygems_version}
Requires:   ruby(irb) = %{irb_version}
Requires:   rubygem(json) = %{json_version}
Provides:   rdoc = %{version}-%{release}
Provides:   ri = %{version}-%{release}
Provides:   rubygem(rdoc) = %{version}-%{release}
Obsoletes:  rdoc < 1.9
Obsoletes:  ruby-rdoc < %{version}
Obsoletes:  ruby-ri < %{version}
BuildArch:  noarch

%description -n rubygem-rdoc
RDoc produces HTML and command-line documentation for Ruby projects.  RDoc
includes the 'rdoc' and 'ri' tools for generating and displaying online
documentation.

%description -n rubygem-rdoc -l ja
RDocはRubyのソースコードからドキュメントを生成するツールです．


%package doc
Summary:    Documentation for %{name}
Summary(ja): %{name} のドキュメント
Group:      Applications/Documentation
Requires:   %{_bindir}/ri
# TODO: It seems that ri documentation differs from platform to platform due to
# some encoding bugs, therefore the documentation should be split out of this gem
# or kept platform specific.
# https://github.com/rdoc/rdoc/issues/71
# BuildArch:  noarch

%description doc
This package contains documentation for %{name}.


%package -n rubygem-bigdecimal
Summary:    BigDecimal provides arbitrary-precision floating point decimal arithmetic
Version:    %{bigdecimal_version}
Group:      Development/Libraries
License:    GPL+ or Artistic
Requires:   ruby(release) = %{ruby_release}
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(bigdecimal) = %{version}-%{release}

%description -n rubygem-bigdecimal
Ruby provides built-in support for arbitrary precision integer arithmetic.
For example:

42**13 -> 1265437718438866624512

BigDecimal provides similar support for very large or very accurate floating
point numbers. Decimal arithmetic is also useful for general calculation,
because it provides the correct answers people expect–whereas normal binary
floating point arithmetic often introduces subtle errors because of the
conversion between base 10 and base 2.


%package -n rubygem-io-console
Summary:    IO/Console is a simple console utilizing library
Version:    %{io_console_version}
Group:      Development/Libraries
Requires:   ruby(release) = %{ruby_release}
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(io-console) = %{version}-%{release}

%description -n rubygem-io-console
IO/Console provides very simple and portable access to console. It doesn't
provide higher layer features, such like curses and readline.


%package -n rubygem-json
Summary:    This is a JSON implementation as a Ruby extension in C
Version:    %{json_version}
Group:      Development/Libraries
License:    Ruby or GPLv2
Requires:   ruby(release) = %{ruby_release}
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(json) = %{version}-%{release}

%description -n rubygem-json
This is a implementation of the JSON specification according to RFC 4627.
You can think of it as a low fat alternative to XML, if you want to store
data to disk or transmit it over a network rather than use a verbose
markup language.


%package -n rubygem-minitest
Summary:    Minitest provides a complete suite of testing facilities.
Version:    %{minitest_version}
Group:      Development/Libraries
License:    MIT
Requires:   ruby(release) = %{ruby_release}
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(minitest) = %{version}-%{release}
BuildArch:  noarch

%description -n rubygem-minitest
minitest/unit is a small and incredibly fast unit testing framework.

minitest/spec is a functionally complete spec engine.

minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner.

minitest/mock by Steven Baker, is a beautifully tiny mock object
framework.

minitest/pride shows pride in testing and adds coloring to your test
output.


%package -n rubygem-psych
Summary:    A libyaml wrapper for Ruby
Version:    %{psych_version}
Group:      Development/Libraries
License:    MIT
Requires:   ruby(release)
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(psych) = %{version}-%{release}

%description -n rubygem-psych
Psych is a YAML parser and emitter. Psych leverages
libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and
emitting capabilities. In addition to wrapping libyaml, Psych also 
knows how to serialize and de-serialize most Ruby objects to and 
from the YAML format.


%package -n rubygem-power_assert
Summary:    Power Assert for Ruby
Version:    %{power_assert_version}
Group:      Development/Libraries
License:    Ruby or BSD
Requires:   ruby(release)
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(power_assert) = %{version}-%{release}
BuildArch:  noarch

%description -n rubygem-power_assert
Power Assert for Ruby.


%package -n rubygem-test-unit
Summary:    Improved version of Test::Unit bundled in Ruby 1.8.x
Version:    %{test_unit_version}
Group:      Development/Libraries
# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license.
# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later.
License:    (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+)
Requires:   ruby(release)
Requires:   ruby(rubygems) >= %{rubygems_version}
Requires:   rubygem(power_assert)
Provides:   rubygem(test-unit) = %{version}-%{release}
BuildArch:  noarch

%description -n rubygem-test-unit
Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit
bundled in Ruby 1.8.x had not been improved but unbundled
Test::Unit (test-unit) is improved actively.


%package -n rubygem-xmlrpc
Summary:    XMLRPC is a lightweight protocol that enables remote procedure calls over H TTP
Version:    %{xmlrpc_version}
Group:      Development/Libraries
License:    Ruby or BSD
Requires:   ruby(release)
Requires:   ruby(rubygems) >= %{rubygems_version}
Provides:   rubygem(xmlrpc) = %{version}-%{release}
BuildArch:  noarch

%description -n rubygem-xmlrpc
XMLRPC is a lightweight protocol that enables remote procedure calls
over HTTP.


%package -n rubygem-bundler
Summary:    Library and utilities to manage a Ruby application's gem dependencies
Version:    %{bundler_version}
License:    MIT
Requires:   ruby(release)
Requires:   ruby(rubygems) >= %{rubygems_version}
Requires:   rubygem(io-console)
Provides:   rubygem(bundler) = %{version}-%{release}
# https://github.com/bundler/bundler/issues/3647
Provides:   bundled(rubygem-fileutils) = %{bundler_fileutils_version}
Provides:   bundled(rubygem-molinillo) = %{bundler_molinillo_version}
Provides:   bundled(rubygem-net-http-persisntent) = %{bundler_net_http_persistent_version}
Provides:   bundled(rubygem-thor) = %{bundler_thor_version}
BuildArch:  noarch

%description -n rubygem-bundler
Bundler manages an application's dependencies through its entire life, across
many machines, systematically and repeatably.


%if %{with emacsen}
%package mode
Summary: Emacs-lisp ruby-mode for the scripting language Ruby
Summary(ja): Emacs上でRubyスクリプトを書くためのモード
Group: Applications/Editors/Emacs
Requires(post): emacsen, emacsen-common >= 0.1
Requires(preun): emacsen, emacsen-common >= 0.1
BuildArch: noarch

%description -n %{rbmode_el}
Emacs-lisp ruby-mode for the object-oriented scripting language Ruby.

%description -n %{rbmode_el} -l ja
Emacs上でRubyスクリプトを書くのに便利なモードです．
%endif


%prep
%setup -q -n %{ruby_archive}

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch11 -p1
%patch12 -p1
%patch22 -p1

cp -a %{SOURCE3} .

%build
autoconf

%configure \
        --with-rubylibprefix='%{ruby_libdir}' \
        --with-rubyarchprefix='%{ruby_libarchdir}' \
        --with-archdir='%{ruby_libarchdir}' \
        --with-archlibdir='%{_libdir}' \
        --with-sitedir='%{ruby_sitelibdir}' \
        --with-sitearchdir='%{ruby_sitearchdir}' \
        --with-vendordir='%{ruby_vendorlibdir}' \
        --with-vendorarchdir='%{ruby_vendorarchdir}' \
        --with-rubyhdrdir='%{_includedir}' \
        --with-rubyarchhdrdir='%{_includedir}' \
        --with-sitearchhdrdir='%{_includedir}/$(arch)' \
        --with-vendorarchhdrdir='%{_includedir}/$(arch)' \
        --with-rubygemsdir='%{rubygems_dir}' \
        --with-ruby-pc='%{name}.pc' \
        --disable-rpath \
        --enable-shared \
        --enable-multiarch \
        --with-prelude=./abrt_prelude.rb


# Q= makes the build output more verbose and allows to check compiler options.
make %{?_smp_mflags} COPY="cp -p" Q=


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

rmdir \
	%{buildroot}%{ruby_sitelibdir}/%{ruby_release} \
	%{buildroot}%{ruby_vendorlibdir}/%{ruby_release}

# Version is empty if --with-ruby-version is specified.
# http://bugs.ruby-lang.org/issues/7807
sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc

# install ruby-mode
%if %{with emacsen}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{rbmode}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/emacsen-common/packages/install
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/emacsen-common/packages/remove
cp misc/*.el %{SOURCE1002} $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{rbmode}

%_installemacsenscript %{rbmode} %{SOURCE1000}
%_removeemacsenscript  %{rbmode} %{SOURCE1001}

%endif

# Version is empty if --with-ruby-version is specified.
# http://bugs.ruby-lang.org/issues/7807
sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc

# Move macros file into proper place and replace the %%{name} macro, since it
# would be wrongly evaluated during build of other packages.
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby
sed -i -e "s/%%{name}/%{name}/" -e "s/%%{ruby_release}/%{ruby_release}/" \
    %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby
install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems
sed -i -e "s/%%{name}/%{name}/" -e "s/%%{ruby_release}/%{ruby_release}/" \
    %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems

# Install dependency generators.
mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs
install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs
install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir}
install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir}
install -m 755 %{SOURCE11} %{buildroot}%{_rpmconfigdir}

# Install custom operating_system.rb.
mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults
cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults

# Move gems root into common direcotry, out of Ruby directory structure.
mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}

# Create folders for gem binary extensions.
mkdir -p %{buildroot}%{gem_extdirs}/exts

# Move bundled rubygems to %%gem_dir and %%gem_extdir
# make symlinks for io-console and bigdecimal, 
# which are considered to be part of stdlib by other Gems

## rake
# Move man pages into proper location
mv %{buildroot}%{gem_dir}/%{ruby_release}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_mandir}/man1

## rdoc
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/rdoc-%{rdoc_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/rdoc* %{buildroot}%{gem_dir}/%{ruby_release}/gems/rdoc-%{rdoc_version}/lib
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/%{ruby_release}/specifications

## bigdecimal
# gem_dir
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/bigdecimal %{buildroot}%{gem_dir}/%{ruby_release}/gems/bigdecimal-%{bigdecimal_version}/lib
ln -s %{gem_dir}/%{ruby_release}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/%{ruby_release}/bigdecimal
# gem_extdir
mkdir -p %{buildroot}%{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libarchdir}/%{ruby_release}/bigdecimal.so %{buildroot}%{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libarchdir}/%{ruby_release}/bigdecimal %{buildroot}%{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}/
ln -s %{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/%{ruby_release}/bigdecimal.so
ln -s %{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}/bigdecimal %{buildroot}%{ruby_libarchdir}/%{ruby_release}/bigdecimal
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/%{ruby_release}/specifications

# bundler
# TODO: Put help files into proper location.
# https://bugs.ruby-lang.org/issues/15359
# gem_dir
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/bundler.rb \
   %{buildroot}%{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}/lib
ln -s %{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}/lib/bundler.rb \
      %{buildroot}%{ruby_libdir}/%{ruby_release}/bundler.rb
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/bundler \
   %{buildroot}%{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}/lib
ln -s %{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}/lib/bundler \
      %{buildroot}%{ruby_libdir}/%{ruby_release}/bundler
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/bundler-%{bundler_version}.gemspec \
   %{buildroot}%{gem_dir}/%{ruby_release}/specifications

## io_console
# gem_dir
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/io-console-%{io_console_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/io %{buildroot}%{gem_dir}/%{ruby_release}/gems/io-console-%{io_console_version}/lib
ln -s %{gem_dir}/%{ruby_release}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/%{ruby_release}/io
# gem_extdir
mkdir -p %{buildroot}%{gem_extdir}/%{ruby_release}/exts/io-console-%{io_console_version}/lib/io
mv %{buildroot}%{ruby_libarchdir}/%{ruby_release}/io/console.so %{buildroot}%{gem_extdir}/%{ruby_release}/exts/io-console-%{io_console_version}/lib/io
ln -s %{gem_extdir}/%{ruby_release}/exts/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/%{ruby_release}/io/console.so
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/%{ruby_release}/specifications

## json
# gem_dir
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/json-%{json_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/json* %{buildroot}%{gem_dir}/%{ruby_release}/gems/json-%{json_version}/lib
ln -s %{gem_dir}/%{ruby_release}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/%{ruby_release}/json
# gem_extdir
mkdir -p %{buildroot}%{gem_extdir}/%{ruby_release}/exts/json-%{json_version}/lib
mv %{buildroot}%{ruby_libarchdir}/%{ruby_release}/json/ %{buildroot}%{gem_extdir}/%{ruby_release}/exts/json-%{json_version}/lib/
ln -s %{gem_extdir}/%{ruby_release}/exts/json-%{json_version}/lib/json %{buildroot}%{ruby_libarchdir}/%{ruby_release}/json
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/%{ruby_release}/specifications

## psych
mkdir -p %{buildroot}%{gem_dir}/%{ruby_release}/gems/psych-%{psych_version}/lib
mkdir -p %{buildroot}%{gem_extdir}/%{ruby_release}/exts/psych-%{psych_version}/lib
mv %{buildroot}%{ruby_libdir}/%{ruby_release}/psych* %{buildroot}%{gem_dir}/%{ruby_release}/gems/psych-%{psych_version}/lib
mv %{buildroot}%{ruby_libarchdir}/%{ruby_release}/psych.so %{buildroot}%{gem_extdir}/%{ruby_release}/exts/psych-%{psych_version}/lib/
mv %{buildroot}%{gem_dir}/%{ruby_release}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/%{ruby_release}/specifications
ln -s %{gem_dir}/%{ruby_release}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/%{ruby_release}/psych
ln -s %{gem_extdir}/%{ruby_release}/exts/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_libarchdir}/%{ruby_release}/psych.so
ln -s %{gem_dir}/%{ruby_release}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/%{ruby_release}/psych.rb

# Adjust the gemspec files so that the gems will load properly
sed -i '/^end$/ i\
  s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/rake-%{rake_version}.gemspec

sed -i '/^end$/ i\
  s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/rdoc-%{rdoc_version}.gemspec

sed -i '/^end$/ i\
  s.require_paths = ["lib"]\
  s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/bigdecimal-%{bigdecimal_version}.gemspec

sed -i '/^end$/ i\
  s.require_paths = ["lib"]\
  s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/io-console-%{io_console_version}.gemspec

sed -i '/^end$/ i\
  s.require_paths = ["lib"]\
  s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/json-%{json_version}.gemspec

sed -i '/^end$/ i\
  s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/%{ruby_release}/specifications/minitest-%{minitest_version}.gemspec

%if %{with test}
%check
DISABLE_TESTS=""

# OpenSSL 1.0.1 is breaking the drb test suite.
# https://bugs.ruby-lang.org/issues/6221
DISABLE_TESTS="-x test_drbssl.rb $DISABLE_TESTS"

# Disable tests which requires /dev/pts
DISABLE_TESTS="-x test_curses.rb $DISABLE_TESTS"

%ifarch armv7l armv7hl armv7hnl
# test_call_double(DL::TestDL) fails on ARM HardFP
# http://bugs.ruby-lang.org/issues/6592
DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS"
%endif

touch abrt.rb

%ifnarch ppc ppc64
# Allow MD5 in OpenSSL.
# https://bugs.ruby-lang.org/issues/9154
OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS"
%endif
%endif

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%if %{with emacsen}
%post -n %{rbmode_el}
if [ "$1" = 2 ]; then

  %_emacsenPackageRemove %{rbmode}

fi

%_addemacsenlist %{rbmode}

%_emacsenPackageInstall %{rbmode}
  
%preun -n %{rbmode_el}
if [ "$1" = 0 ]; then

  %_emacsenPackageRemove %{rbmode}

  %_removeemacsenlist %{rbmode}

fi
%endif
      

%files
%license COPYING
%lang(ja) %license COPYING.ja
%license GPL
%license LEGAL
%{_bindir}/erb
%{_bindir}/ruby
%{_mandir}/man1/erb*
%{_mandir}/man1/ruby*

%files devel
%license COPYING*
%license GPL
%license LEGAL
%doc README.EXT
%lang(ja) %doc README.EXT.ja

%{_rpmconfigdir}/macros.d/macros.ruby

%{_includedir}/*
%{_libdir}/libruby.so
%{_libdir}/pkgconfig/ruby.pc

%files libs
%license COPYING
%lang(ja) %license COPYING.ja
%license GPL
%license LEGAL
%doc README.md
%lang(ja) %doc README.ja.md
%doc NEWS
%doc doc/NEWS-*
%{ruby_sitelibdir}
%{ruby_sitearchdir}
%{ruby_vendorlibdir}
%{ruby_vendorarchdir}

# List all these files explicitly to prevent surprises
# Platform independent libraries.
%dir %{ruby_libdir}
%dir %{ruby_libdir}/%{ruby_release}
%{ruby_libdir}/%{ruby_release}/*.rb
%exclude %{ruby_libdir}/%{ruby_release}/irb.rb
%{ruby_libdir}/%{ruby_release}/cgi
%{ruby_libdir}/%{ruby_release}/csv
%{ruby_libdir}/%{ruby_release}/digest
%{ruby_libdir}/%{ruby_release}/drb
%{ruby_libdir}/%{ruby_release}/e2mmap
%{ruby_libdir}/%{ruby_release}/fiddle
%{ruby_libdir}/%{ruby_release}/fileutils
%{ruby_libdir}/%{ruby_release}/forwardable
%exclude %{ruby_libdir}/%{ruby_release}/irb
%{ruby_libdir}/%{ruby_release}/matrix
%{ruby_libdir}/%{ruby_release}/net
%{ruby_libdir}/%{ruby_release}/openssl
%{ruby_libdir}/%{ruby_release}/optparse
%{ruby_libdir}/%{ruby_release}/psych
%{ruby_libdir}/%{ruby_release}/racc
%{ruby_libdir}/%{ruby_release}/rexml
%{ruby_libdir}/%{ruby_release}/rinda
%{ruby_libdir}/%{ruby_release}/ripper
%{ruby_libdir}/%{ruby_release}/rss
%{ruby_libdir}/%{ruby_release}/shell
%{ruby_libdir}/%{ruby_release}/syslog
%{ruby_libdir}/%{ruby_release}/thwait
%{ruby_libdir}/%{ruby_release}/tracer
%{ruby_libdir}/%{ruby_release}/unicode_normalize
%{ruby_libdir}/%{ruby_release}/uri
%{ruby_libdir}/%{ruby_release}/webrick
%{ruby_libdir}/%{ruby_release}/yaml

# Platform specific libraries.
%{_libdir}/libruby.so.*
%dir %{ruby_libarchdir}
%dir %{ruby_libarchdir}/%{ruby_release}
%dir %{ruby_libarchdir}/%{ruby_release}/cgi
%{ruby_libarchdir}/%{ruby_release}/cgi/escape.so
%{ruby_libarchdir}/%{ruby_release}/continuation.so
%{ruby_libarchdir}/%{ruby_release}/coverage.so
%{ruby_libarchdir}/%{ruby_release}/date_core.so
%{ruby_libarchdir}/%{ruby_release}/dbm.so
%dir %{ruby_libarchdir}/%{ruby_release}/digest
%{ruby_libarchdir}/%{ruby_release}/digest.so
%{ruby_libarchdir}/%{ruby_release}/digest/bubblebabble.so
%{ruby_libarchdir}/%{ruby_release}/digest/md5.so
%{ruby_libarchdir}/%{ruby_release}/digest/rmd160.so
%{ruby_libarchdir}/%{ruby_release}/digest/sha1.so
%{ruby_libarchdir}/%{ruby_release}/digest/sha2.so
%dir %{ruby_libarchdir}/%{ruby_release}/enc
%{ruby_libarchdir}/%{ruby_release}/enc/big5.so
%{ruby_libarchdir}/%{ruby_release}/enc/cp949.so
%{ruby_libarchdir}/%{ruby_release}/enc/emacs_mule.so
%{ruby_libarchdir}/%{ruby_release}/enc/encdb.so
%{ruby_libarchdir}/%{ruby_release}/enc/euc_jp.so
%{ruby_libarchdir}/%{ruby_release}/enc/euc_kr.so
%{ruby_libarchdir}/%{ruby_release}/enc/euc_tw.so
%{ruby_libarchdir}/%{ruby_release}/enc/gb18030.so
%{ruby_libarchdir}/%{ruby_release}/enc/gb2312.so
%{ruby_libarchdir}/%{ruby_release}/enc/gbk.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_1.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_10.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_11.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_13.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_14.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_15.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_16.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_2.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_3.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_4.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_5.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_6.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_7.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_8.so
%{ruby_libarchdir}/%{ruby_release}/enc/iso_8859_9.so
%{ruby_libarchdir}/%{ruby_release}/enc/koi8_r.so
%{ruby_libarchdir}/%{ruby_release}/enc/koi8_u.so
%{ruby_libarchdir}/%{ruby_release}/enc/shift_jis.so
%dir %{ruby_libarchdir}/%{ruby_release}/enc/trans
%{ruby_libarchdir}/%{ruby_release}/enc/trans/big5.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/chinese.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/ebcdic.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/emoji.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/emoji_iso2022_kddi.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/emoji_sjis_docomo.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/emoji_sjis_kddi.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/emoji_sjis_softbank.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/escape.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/gb18030.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/gbk.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/iso2022.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/japanese.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/japanese_euc.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/japanese_sjis.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/korean.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/single_byte.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/transdb.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/utf8_mac.so
%{ruby_libarchdir}/%{ruby_release}/enc/trans/utf_16_32.so
%{ruby_libarchdir}/%{ruby_release}/enc/utf_16be.so
%{ruby_libarchdir}/%{ruby_release}/enc/utf_16le.so
%{ruby_libarchdir}/%{ruby_release}/enc/utf_32be.so
%{ruby_libarchdir}/%{ruby_release}/enc/utf_32le.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1250.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1251.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1252.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1253.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1254.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_1257.so
%{ruby_libarchdir}/%{ruby_release}/enc/windows_31j.so
%{ruby_libarchdir}/%{ruby_release}/etc.so
%{ruby_libarchdir}/%{ruby_release}/fcntl.so
%{ruby_libarchdir}/%{ruby_release}/fiber.so
%{ruby_libarchdir}/%{ruby_release}/fiddle.so
%{ruby_libarchdir}/%{ruby_release}/gdbm.so
%dir %{ruby_libarchdir}/%{ruby_release}/io
%{ruby_libarchdir}/%{ruby_release}/io/nonblock.so
%{ruby_libarchdir}/%{ruby_release}/io/wait.so
%{ruby_libarchdir}/%{ruby_release}/nkf.so
%{ruby_libarchdir}/%{ruby_release}/objspace.so
%{ruby_libarchdir}/%{ruby_release}/openssl.so
%{ruby_libarchdir}/%{ruby_release}/pathname.so
%{ruby_libarchdir}/%{ruby_release}/psych.so
%{ruby_libarchdir}/%{ruby_release}/pty.so
%dir %{ruby_libarchdir}/%{ruby_release}/racc
%{ruby_libarchdir}/%{ruby_release}/racc/cparse.so
%{ruby_libarchdir}/%{ruby_release}/rbconfig.rb
%dir %{ruby_libarchdir}/%{ruby_release}/rbconfig
%{ruby_libarchdir}/%{ruby_release}/rbconfig/sizeof.so
%{ruby_libarchdir}/%{ruby_release}/readline.so
%{ruby_libarchdir}/%{ruby_release}/ripper.so
%{ruby_libarchdir}/%{ruby_release}/sdbm.so
%{ruby_libarchdir}/%{ruby_release}/socket.so
%{ruby_libarchdir}/%{ruby_release}/stringio.so
%{ruby_libarchdir}/%{ruby_release}/strscan.so
%{ruby_libarchdir}/%{ruby_release}/syslog.so
%{ruby_libarchdir}/%{ruby_release}/zlib.so

%files rubygems
%{_bindir}/gem
%{rubygems_dir}
%{gem_dir}
%exclude %{gem_dir}/%{ruby_release}/gems/*
%{_exec_prefix}/lib*/gems
%exclude %{_exec_prefix}/lib*/gems/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}
%exclude %{_exec_prefix}/lib*/gems/%{ruby_release}/exts/bundler-%{bundler_version}
%exclude %{_exec_prefix}/lib*/gems/%{ruby_release}/exts/io-console-%{io_console_version}
%exclude %{_exec_prefix}/lib*/gems/%{ruby_release}/exts/json-%{json_version}
%exclude %{_exec_prefix}/lib*/gems/%{ruby_release}/exts/psych-%{psych_version}
%exclude %{gem_dir}/%{ruby_release}/gems/rake-%{rake_version}
%exclude %{gem_dir}/%{ruby_release}/gems/rdoc-%{rdoc_version}
%exclude %{gem_dir}/%{ruby_release}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/bundler-%{bundler_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/io-console-%{io_console_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/json-%{json_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/minitest-%{minitest_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/rake-%{rake_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/rdoc-%{rdoc_version}.gemspec
%exclude %{gem_dir}/%{ruby_release}/specifications/psych-%{psych_version}.gemspec

%files rubygems-devel
%{_rpmconfigdir}/macros.d/macros.rubygems
%{_rpmconfigdir}/fileattrs/rubygems.attr
%{_rpmconfigdir}/rubygems.req
%{_rpmconfigdir}/rubygems.prov
%{_rpmconfigdir}/rubygems.con

%files -n rubygem-rake
%{_bindir}/rake
%{gem_dir}/%{ruby_release}/gems/rake-%{rake_version}
%{gem_dir}/%{ruby_release}/specifications/rake-%{rake_version}.gemspec
%{_mandir}/man1/rake.1*

%files irb
%{_bindir}/irb
%{ruby_libdir}/%{ruby_release}/irb.rb
%{ruby_libdir}/%{ruby_release}/irb
%{_mandir}/man1/irb.1*

%files -n rubygem-rdoc
%{_bindir}/rdoc
%{_bindir}/ri
%{gem_dir}/%{ruby_release}/gems/rdoc-%{rdoc_version}
%{gem_dir}/%{ruby_release}/specifications/rdoc-%{rdoc_version}.gemspec
%{_mandir}/man1/ri*

%files doc
%doc README.md
%lang(ja) %doc README.ja.md
%doc ChangeLog
%doc doc/ChangeLog-*
%{_datadir}/ri
%{_docdir}/ruby

%files -n rubygem-bigdecimal
%{ruby_libdir}/%{ruby_release}/bigdecimal
%{ruby_libarchdir}/%{ruby_release}/bigdecimal.so
%{ruby_libarchdir}/%{ruby_release}/bigdecimal
%{gem_extdir}/%{ruby_release}/exts/bigdecimal-%{bigdecimal_version}
%{gem_dir}/%{ruby_release}/gems/bigdecimal-%{bigdecimal_version}
%{gem_dir}/%{ruby_release}/specifications/bigdecimal-%{bigdecimal_version}.gemspec

%files -n rubygem-io-console
%{ruby_libdir}/%{ruby_release}/io
%{ruby_libarchdir}/%{ruby_release}/io/console.so
%{gem_extdir}/%{ruby_release}/exts/io-console-%{io_console_version}
%{gem_dir}/%{ruby_release}/gems/io-console-%{io_console_version}
%{gem_dir}/%{ruby_release}/specifications/io-console-%{io_console_version}.gemspec

%files -n rubygem-json
%{ruby_libdir}/%{ruby_release}/json
%{ruby_libarchdir}/%{ruby_release}/json
%{gem_extdir}/%{ruby_release}/exts/json-%{json_version}
%{gem_dir}/%{ruby_release}/gems/json-%{json_version}
%{gem_dir}/%{ruby_release}/specifications/json-%{json_version}.gemspec

%files -n rubygem-minitest
#%{ruby_libdir}/%{ruby_release}/minitest
%{gem_dir}/%{ruby_release}/gems/minitest-%{minitest_version}
%{gem_dir}/%{ruby_release}/specifications/minitest-%{minitest_version}.gemspec

%files -n rubygem-psych
%{ruby_libdir}/%{ruby_release}/psych
%{ruby_libdir}/%{ruby_release}/psych.rb
%{ruby_libarchdir}/%{ruby_release}/psych.so
%{gem_extdir}/%{ruby_release}/exts/psych-%{psych_version}
%{gem_dir}/%{ruby_release}/gems/psych-%{psych_version}
%{gem_dir}/%{ruby_release}/specifications/psych-%{psych_version}.gemspec

%files -n rubygem-power_assert
%{gem_dir}/%{ruby_release}/gems/power_assert-%{power_assert_version}
%exclude %{gem_dir}/%{ruby_release}/gems/power_assert-%{power_assert_version}/.*
%{gem_dir}/%{ruby_release}/specifications/power_assert-%{power_assert_version}.gemspec

%files -n rubygem-test-unit
%{gem_dir}/%{ruby_release}/gems/test-unit-%{test_unit_version}
%{gem_dir}/%{ruby_release}/specifications/test-unit-%{test_unit_version}.gemspec

%files -n rubygem-xmlrpc
%{gem_dir}/%{ruby_release}/gems/xmlrpc-%{xmlrpc_version}
%{gem_dir}/%{ruby_release}/specifications/xmlrpc-%{xmlrpc_version}.gemspec

%files -n rubygem-bundler
%{_bindir}/bundle
%{_bindir}/bundler
%{gem_dir}/%{ruby_release}/gems/bundler-%{bundler_version}
%{gem_dir}/%{ruby_release}/specifications/bundler-%{bundler_version}.gemspec
%{ruby_libdir}/%{ruby_release}/bundler.rb
%{ruby_libdir}/%{ruby_release}/bundler
%{_mandir}/man1/bundle*.1*
%{_mandir}/man5/gemfile.5*

%if %{with emacsen}
%files mode
%defattr(-, root, root)
%doc misc/README
%{_datadir}/emacs/site-lisp/%{rbmode}
%{_prefix}/lib/emacsen-common/packages/install/*
%{_prefix}/lib/emacsen-common/packages/remove/*
%endif


%changelog
* Mon Mar 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6.5-1
- updated to 2.6.5.
- dropped Patch10-11 and 100-102.
- imported Patch11-12 and 22 from rawhide.

* Mon Mar 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.9-17
- updated to 2.4.9.

* Sat Aug 31 2019 Toshiaki Ara <ara_t@384.jp> 2.4.6-16
- rebuild with readline-8.0 and ncurses-6.1

* Tue May 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.6-15
- updated to 2.4.6.
- added BR:libxcrypt-devel.
- imported all patches from fc27.
- imported openssl-1.1.1 patches from upstream.

* Mon Apr 03 2017 Daisuke SUZUKI <daisuke@vinelinux.org> 2.4.1-14
- update to 2.4.1

* Sat Mar 18 2017 Daisuke SUZUKI <daisuke@vinelinux.org> 2.4.0-13
- update to 2.4.0
- remove tcltk which was dropped from stdlib.

* Sun Mar 20 2016 Daisuke SUZUKI <daisuke@vinelinux.org> 2.2.4-12
- rebuild with openssl-1.0.2

* Sun Jan 10 2016 Daisuke SUZUKI <daisuke@vinelinux.org> 2.2.4-11
- update to 2.2.4

* Mon Jan  5 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 2.2.3-10
- update to 2.2.3

* Wed Nov 19 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.5-9
- update to 2.1.5

* Sat Jul 12 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.2-8
- add R: rubygem(json) to rubygem-rdoc 
- fix json ext module path

* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.2-7
- rebuild with libffi-3.0.13

* Fri Jun 27 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.2-6
- use ruby abi version for load_path
  - remove --with-ruby-version=''
  - update operating_system.rb

* Wed Jun 25 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.2-5
- update to 2.1.2

* Wed May 21 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0.481-4
- update to 2.0.0-p452

* Thu Apr 10 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0.451-3
- update to 2.0.0-p451

* Sat Dec 07 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.0.353-2
- fix macros.ruby

* Tue Dec 03 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0.353-1
- update to 2.0.0-p353
- change ruby(abi) -> ruby(release)

* Mon Feb 25 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.392-10
- update to 1.9.3-p392

* Tue Feb 12 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.385-9
- update to 1.9.3-p385

* Mon Jan 21 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.374-7
- update to 1.9.3-p374

* Mon Jan  7 2013 IWAI, Masaharu <iwai@alib.jp> 1.9.3.362-6
- build with Tcl/Tk 8.5.7-1

* Wed Dec 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.362-5
- update to 1.9.3-p362

* Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.327-4
- remove ruby_abi from gem_dir

* Sun Nov 11 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.327-3
- update to 1.9.3-p327
- add patch10 to skip network related test
- add patch11 to skip test_str_crypt (upstream bug)

* Fri Oct 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.286-2
- fix gem_extdir to include ruby_abi number
- fix macros.ruby to include ruby_abi number
- include site_ruby dir

* Tue Oct 23 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.3.286-1
- update to 1.9.3-p286
- rebase with fedora package
  - change filesystem structure compatible with Vine ruby package
  - rename rubygems to ruby-rubygems
  - modify ruby filesystem structure
    - /usr{,/local}/share/ruby for arch-independent files
    - /usr{,/local}/lib{,64}/ruby for arch-dependent files
    - move gems to /usr/share/gems, /usr/lib{,64}/gems
  - merge rubygems, rake to ruby sub-package
  - add subpackages for ruby standard gems

* Sat Jun 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
- update to 1.8.7-p370

* Sun May 06 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.358-1
- update to 1.8.7-p358
- add patch1100 to build with glibc-2.14

* Mon Feb 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.334-1
- update to 1.8.7-p334

* Tue Jan 18 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.330-1
- update to 1.8.7-p330
- change License tag (Ruby or GPLv2)

* Tue Feb 02 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.249-1
- update to 1.8.7-p249
- rebuild with db4-4.8.0
- drop unneccesary patches: 809, 1001, 1002, 1003, 1004

* Tue Sep 08 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.174-3
- move noarch ruby libraries to /usr/lib/ruby.
  - add Patch960
    - add --with-ruby-prefix=%%{_prefix}/lib
- add deprecated search path for 64bit arch.
  - --with-search-path=%%{_libdir}/ruby/%%{rubyxver}

* Wed Aug 12 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.174-2
- import Patch100[12345] from debian package
  * Added debian/patches/090811_thread_and_select.dpatch: 
    threads may hangup when IO.select called from two or more threads.
  * Added debian/patches/090812_finalizer_at_exit.dpatch:
    finalizers should be run at exit (Closes: #534241)
  * Added debian/patches/090812_class_clone_segv.dpatch: 
    avoid segv when an object cloned.  (Closes: #533329)
  * Added debian/patches/090812_eval_long_exp_segv.dpatch: 
    fix segv when eval a long expression.  (Closes: #510561)
  * Added debian/patches/090812_openssl_x509_warning.dpatch:
    suppress warning from OpenSSL::X509::ExtensionFactory.  (Closes: #489443)

* Tue Jun 16 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.174-1
- new upstream release 1.8.7-p174
 - fix CVE-2009-1904
   http://www.ruby-lang.org/en/news/2009/06/09/dos-vulnerability-in-bigdecimal/

* Mon Jun 01 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.7.160-1
- new upstream version 1.8.7-p160.
- drop unneccesary patches: Patch807, Patch1010

* Mon Sep 22 2008 NAKAMURA Kenta <kenta@vinelinux.org> 1.8.7.72-2
- updated Patch950: ruby-1.8.7-p72-multilib.patch

* Thu Sep 11 2008 akira yamada <akira@vinelinux.org> 1.8.7.72-1
- new upstream version 1.8.7-p72.
- droped unnecessary patches: Patch802.

* Thu Sep 11 2008 akira yamada <akira@vinelinux.org> 1.8.6.287-1
- new upstream version 1.8.6-p287.
- droped unnecessary patches: Patch805, Patch1000.
- updated Patch808 for 1.8.6-p287.
- added Patch809: rcov may crash because of backwards incompatibility.
  (backported r14826:15141 of trunk).
- added Patch1010 to fix CVE-2008-3790.

* Sat Sep  6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.6.111-1
- applied new versioning policy
- spec in UTF-8
- removed BuildRequires: XOrg-devel

* Wed Oct 24 2007 akira yamada <akira@vinelinux.org> 1.8.6.111-0vl2
- added ruby-1.8.6.111-rexml-document-transitive.patch:
  - fixed: Document#write undefined local variable or method `transitive'.

* Tue Oct 23 2007 akira yamada <akira@vinelinux.org> 1.8.6.111-0vl1
- new upstream version 1.8.6.111.
- added ruby-1.8.6.111-CVE-2007-5162.patch:
  - security fixes for CVE-2007-5162.  It is backported r13657 from ruby_1_8
    branch.
- added ruby-1.8.6.111-ruby-bugs-11507.patch:
  - ConditionVariable#wait may raise "not owner" exceptions.
- added ruby-1.8.6.111-sync_try_lock_always_fail.patch:
  - Sync#try_lock always fails due to wrong variable name.

* Thu May 17 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6-0vl4
- rebuild with new openssl

* Thu May 10 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.8.6-0vl3
- rebuilt with new toolchain and db4-4.3.x

* Sun Mar 25 2007 NAKAMURA Kenta <kenta@vinelinux.org> 1.8.6-0vl2
- modified emacsen-common path

* Mon Mar 19 2007 akira yamada <akira@vinelinux.org> 1.8.6-0vl1
- new upstream version 1.8.6.

* Mon Dec 04 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.8.5-0vl1.1
- add pacth1000 for fix cgi.rb issue (JVN#84798830)

* Wed Nov 1 2006 akira yamada <akira@ruby-lang.org> 1.8.5-0vl1
- new upstream version 1.8.5.
- added ruby-1.8.5-rexml_encoding.patch:
  - REXML should accept UTF-16.  [ruby-list:42737]
- added ruby-1.8.5-rdoc.patch:
  - Don't unescape HTML in HtmlFormatter.  Submitted by Kent Sibilev <ksruby
    at gmail.com>.  [ruby-core:08392].
  - lib/rdoc/generators/ri_generator.rb: do not chdir twice.
- added ruby-1.8.5-hash_memory_reak.patch:
  - hash.c (rb_hash_s_create): fixed memory leak, based on the patch by Kent
    Sibilev <ksruby at gmail.com>.  fixed: [ruby-talk:211233]
- added ruby-1.8.5-top_cref.patch:
  - eval.c (ruby_init): rename top_cref to ruby_top_cref and export, along
    with ruby_cref, for use by the sandbox. [ruby-core:08762]
- added ruby-1.8.5-tcltk.patch:
  - ext/tk/lib/tkextlib/blt.rb: double dashes (--) option doesn't work
    properly on some versions of BLT (wrong description on the manual of
    `blt::bgexec'?).
  - ext/tk/lib/tk/font.rb: TkFont#current_configinfo() doesn't work on
    Tcl/Tk8.x.
  - ext/tk/lib/tk.rb: update RELEASE_DATE.
- added ruby-1.8.5-acl.patch:
  - patterns which include '*' should not cause getaddress() call.
    [ruby-dev:29406]
- added ruby-1.8.5-socket.patch:
  - ext/socket/extconf.rb: check arpa/inet.h for ntohs.
  - ext/socket/socket.c: include arpa/inet.h if available.
  - ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t.
- added ruby-1.8.5-exec_vs_nullbyte.patch:
  - io.c (pipe_open): null character should be saved for command name.
    [ruby-dev:29421]
  - process.c (proc_spawn): ditto.
  - process.c (proc_spawn_n): ditto.
  - process.c (rb_f_system): ditto.
- added ruby-1.8.5-mimedec.patch:
  - CGI#out should not decode base64 strings.  [ruby-dev:29284]
  - Kconv::toeuc should decode base64 strings. (reverted to old behaviour for
    compatibility.)  [ruby-dev:29505]
  - corrected regexp for EUC-JP (Kconv::RegexpEucjp).  [ruby-dev:29344]
- added ruby-1.8.5-strftime_nullbyte.patch:
  - Time#strftime should save null character.  [ruby-dev:29422]
- added ruby-1.8.5-dbm_extconf.patch:
  - ext/dbm/extconf.rb: create makefile according to the result of check for
    dbm header.  fixed: [ruby-dev:29445]
  - ext/dbm/extconf.rb: allow multiple candidates for dbm-type.
- added ruby-1.8.5-check_sticky_bit.patch:
  - file.c (path_check_0): check if sticky bit is set on parent directories
    for executable path.  fixed: [ruby-dev:29415]
  - Fix documentation submitted by Rick Ohnemus.  ruby-Bugs-5529.
    [ruby-core:08725]
- added ruby-1.8.5-float_hash.patch:
  - improve hash collision of Float objects.  [ruby-dev:29352]
- added ruby-1.8.5-time_vardecl.patch:
  - time.c (time_to_s): variable declaration after an execution sattement.
- added ruby-1.8.5-bignum.patch:
  - numeric.c (fix_plus): addition in Fixnum will never overflow long.  a
    patch from Ondrej Bilka <neleai at seznam.cz>.  [ruby-core:08794]
  - numeric.c (fix_minus): ditto.
  - bignum.c (rb_big_pow): eagerly truncate resulting bignum.
    [ruby-core:08794]
- added ruby-1.8.5-migration_macro.patch:
  - ruby.h (RSTRING_PTR): add migration macro.
  - ruby.h (RARRAY_PTR): ditto.
- added ruby-1.8.5-webrick_cookie.patch:
  - lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookies): new method to
    parse multiple cookies per Set-Cookie header.  Thanks to Aaron Patterson
    <aaron_patterson at speakeasy.net>.  [ruby-core:08802]
- added ruby-1.8.5-suppress_warnings.patch:
  - mkconfig.rb, ext/extmk.rb, lib/mkmf.rb: suppress warnings with $VERBOSE.
  - ext/extmk.rb: Proc#call does not pass the block in 1.8.
  - Makefile.in, win32/Makefile.sub (MINIRUBY): append MINIRUBYOPT.
- added ruby-1.8.5-pstore_binmode.patch:
  - lib/pstore.rb: open all in binary mode, and get rid of the quirk of
    msvcrt.  fixed: [ruby-dev:29518]
- added ruby-1.8.5-testunit_rescue.patch:
  - Rescue Exception in Test::Unit::TestCase#run.  [ruby-core:08783]
- added ruby-1.8.5-prevent_loading_twice.patch:
  - eval.c (rb_require_safe): prevent loading twice from extensions.  fixed:
    [ruby-dev:29523]
- added ruby-1.8.5-prohibit_intern_tainted_string.patch:
  - string.c (rb_str_intern): prohibit interning tainted string.
- added ruby-1.8.5-ruby_mode.patch:
  - misc/ruby-mode.el (ruby-parse-partial): better here-doc support.  a patch
    from Marshall T. Vandegrift <llasram at gmail.com>.  [ruby-core:08804]
- added ruby-1.8.5-readme_ext.patch:
  - README.EXT: English adjustment.  [ruby-core:08851] [ruby-core:08852]
    [ruby-core:08855]
- added ruby-1.8.5-check_safe_level_for_str_intern.patch:
  - string.c (rb_str_intern): raise SecurityError only when $SAFE level is
    greater than zero.  [ruby-core:08862]
  - parse.y (rb_interned_p): new function to check if a string is already
    interned.
  - object.c (str_to_id): use rb_str_intern().
- added ruby-1.8.5-pty.patch:
  - ext/pty/pty.c (establishShell): parent pid is not used.
  - ext/pty/pty.c (freeDevice): not used.
  - ext/pty/pty.c (get_device_once): removed garbage right brace.
  - ext/pty/pty.c (establishShell): remove remaining unused line.
- added ruby-1.8.5-imap_extraspace.patch:
  - net/imap can accept extra space in server responses.  The patch from Tom
    Soderlund.
- added ruby-1.8.5-rdoc_nameerror.patch:
  - rdoc/ri/ri_options.rb should require 'rdoc/ri/ri_paths'.
- added ruby-1.8.5-gdbm_docs.patch and updated ruby-1.8.5-.document.patch:
  - added GDBM documents.
- added ruby-1.8.5-etc_uid_t.patch:
  - etc.c should use uid_t instead of int.  [ruby-core:08897]
- added ruby-1.8.5-cgi_empty_content.patch:
  - invalid multipart data can make cgi.rb infinite loop and CPU consumption.
    (CVE-2006-5467)
- added ruby-1.8.5-sandbox.patch:
  - added Thread#kill!.  [ruby-core:08768]
- added ruby-1.8.5-update_docs.patch:
  - small fixes and updates for rdocs.
- added ruby-1.8.5-array.patch:
  - fixed a potential leaks caused by shift.  [ruby-talk:216055]
    [ruby-core:08922] [ruby-list:42907]
- added ruby-1.8.5-dir_checkdir.patch:
  - internal existence test for "/" fails anytime. [ruby-core:08913]
- added ruby-1.8.5-mkmf.patch:
  - set default $LDFLAGS.  [ruby-talk:216256]
  - check function pointer first and macro next.  [ruby-core:08949]
  - fixed the bug of handling COMMON_MACROS.
- added ruby-1.8.5-jcode.patch:
  - succ! in jcode.rb doesn't work on $KCODE == 'n'.  [ruby-talk:216845]
- added ruby-1.8.5-eval.patch:
  - check protected visibility based on real self, not ruby_frame->self.
    [ruby-talk:217822]
- added ruby-1.8.5-include_module.patch:
  - remove unnecessary check.  [ruby-talk:218402]
- added ruby-1.8.5-bignum_shift.patch:
  - a bug in right shift of negative bignums.  [ruby-core:09020]
- added ruby-1.8.5-rexml_enc.patch:
  - spaces are allowed around equal sign.  [ruby-core:09032]
- added ruby-1.8.5-wrong_id_check.patch:
  - wrong id check.  [ruby-core:09158]
  - typo fixed.  [ruby-core:09168]
- added ruby-1.8.5-rb_warning.patch:
  - some error message may contain format specifiers.  [ruby-dev:29657]
- added ruby-1.8.5-parse.y.patch.patch:
  - no need to re-create NODE_SELF() again.  [ruby-core:09177]
  - use particular enums.  [ruby-core:09221]
- added ruby-1.8.5-signal.patch:
  - handle SIGTERM.  [ruby-list:42895]
  - don't set SA_RESTART.  a backport from the HEAD.  [ruby-talk:220937]
    [ruby-talk:147220]
- added ruby-1.8.5-string_tainted.patch:
  - should be infected with only original string, but not the shared string.
    [ruby-core:09152]
  - strnig.c (rb_str_new4): keep shared string untainted when orignal string
    is tainted.  [ruby-dev:29672]
- added ruby-1.8.5-configure_alloca.patch:
  - alloca is broken; use C_ALLOCA instead.  [ruby-dev:29416]
- added ruby-1.8.5-openssl.patch:
  - ossl_pkcs7_verify, ossl_spki_initialize: should clear error.
  - Use digest/md5 instead of obsolete md5.
- added ruby-1.8.5-imap_nomodseq.patch:
  - net/imap chokes on NOMODSEQ response. [ruby-Bugs#6026]
- added ruby-1.8.5-soap.patch:
  - huge memory usage with the Ebay API.
    <http://dev.ctor.org/soap4r/ticket/224>
- applied debian/patches/149_bignum_to_s.patch
  - should preserve leading zero information for negative %b and %x.
    [ruby-talk:221347]
- applied debian/patches/150_time_dup.patch
  - duplicate the class of original time.  [ruby-core:09357]
- applied debian/patches/151_super.patch
  - fixed bug of zsuper with both of opt and rest.  [ruby-list:42928]
- applied debian/patches/152_dir_glob.patch
  - get rid of possible memory leak.

* Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.4-0vl5
- changed ruby-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
- changed ruby-doc Group to Appliations/Documentation  <BTS:VineLinux:163>
- changed libruby Group to System Environment/Libraries
- rebuilt with openssl-0.9.7k

* Sat Jul 29 2006 NAKAMURA Kenta <kenta@vinelinux.org> 1.8.4-0vl4
- x86_64 architecture support
  - added ruby-1.8.4-multilib.patch
  - added ruby-1.8.4-tcltk-multilib.patch 
  - modified emacsen-common path

* Fri Jul 14 2006 akira yamada <akira@vinelinux.org> 1.8.4-0vl3
- added ruby-1.8.4-135.patch:
  - should check if chars are multibyte for regexp-i option.
  [ruby-dev:28598] [ruby-list:42096]
- added ruby-1.8.4-136.patch:
  - jcode.rb breaks String#tr_s.  [ruby-list:42090]
- added ruby-1.8.4-137.patch:
  - Array#pack supports CRLF newlines.  [ruby-dev:28601]
- added ruby-1.8.4-138.patch:
  - should initialize variables first.  [ruby-core:07785] [ruby-core:07810]
  - avoid accessing uninitialized array element.  [ruby-core:07809]
- added ruby-1.8.4-139.patch:
  - Numeric#div should use floor rather than Interger.  [ruby-dev:28589]
  - the first element of Float#divmod should be an integer.
    [ruby-dev:28589]
- added ruby-1.8.4-140.patch:
  - avoids memory leak of YAML.  [ruby-core:7808]
- added ruby-1.8.4-141.patch:
  - fixes out of bounds array access.  [ruby-core:07823]
- added ruby-1.8.4-142.patch:
  - use AF_INET6 for nameservers containing colons.
- added ruby-1.8.4-143.patch:
  - should not modify untainted objects in safe levels higher than 3.
  - should not allow modifying literal regexps.
- added ruby-1.8.4-144.patch:
  - should not close untainted dir stream in $SAVE >= 4.
  - should not call a vararg function rb_sys_warning() indirectly.
    [ruby-core:07886]
- added ruby-1.8.4-145.patch:
  - should round for usec floating number.  [ruby-core:07896]
- added ruby-1.8.4-146.patch:
  - constant in Fixnum access with instance_eval dumps core.
    [ruby-dev:28327]
  - inspect for overriden method.  [ruby-dev:28636]
  - set_trace_func dumps core.  [ruby-dev:28632]
  - set_trace_func: binding has wrong self value for return events.
    [ruby-core:07928]
- added ruby-1.8.4-147.patch:
  - fixed typo of openssl/ssl.rb.
- added ruby-1.8.4-148.patch:
  - fixed memory leak and alignment bug of the dl library.  [ruby-dev:28665]
- added ruby-1.8.4-149.patch:
  - new method: IO#read_nonblock, IO#write_nonblock,
    Socket#connect_nonblock, Socket#accept_nonblock and
    Socket#recvfrom_nonblock.  [ruby-core:7917]
  - use rb_read_pending instead of rb_io_read_pending.  [ruby-dev:28663]
  - new method: IPSocket#recvfrom_nonblock, TCPServer#accept_nonblock,
    UNIXServer#accept_nonblock.
  - reject non-AF_UNIX sockaddr.  [ruby-dev:28691]
- added ruby-1.8.4-mkconfig.rb.patch:
  - mkconfig.rb should remove "|#_!!_#|" and unquote commas generated by
    autoconf > 2.59 (CVS).

* Wed May 10 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.8.4-0vl2
- dirty fix to rb_arch macro for ppc
  (_target_cpu should be powerpc, but rpm macro will translate to ppc anyhow)
  this fix will be removed after rpm-4.4 macro issue is cleared up.

* Sun Apr 23 2006 akira yamada <akira@vinelinux.org> 1.8.4-0vl1
- new upstream version 1.8.4.
- updated ruby-refm-rdp.
- applied following bug-fix-patches.
- added ruby-1.8.4-100.patch:
  - fixed a bug in constant reference during instance_eval for some type of
    objects.  [yarv-dev:707]
- added ruby-1.8.4-101.patch:
  - allow dynamic symbols (:"...") to undef and alias.  [ruby-dev:28105]
- added ruby-1.8.4-102.patch:
  - (openssl) treat wildcard character in commonName.  [ruby-dev:28121]
  - (openssl) should use "rb_str_new(0, 0)" to make empty string.
- added ruby-1.8.4-103.patch:
  - callcc or thread may leak memory  [ruby-Bugs:1364] [ruby-dev:28154]
    [ruby-dev:28172]
  - mark objects refered from aborting threads.  [ruby-dev:28190]
- added ruby-1.8.4-104.patch:
  - avoid a GC problem with RUBY_ALWAYS_GC= ./ruby -e ''.
  - declare rb_gc_abort_threads.
- added ruby-1.8.4-105.patch:
  - should not recycle scope object used in a thread.  [ruby-dev:28177]
- added ruby-1.8.4-106.patch (urgency medium):
  - get rid of segfault on syntax error.  [ruby-core:07070]
- added ruby-1.8.4-107.patch:
  - fixed typo in webrick/httpservlet/filehandler.rb: fixed typo.
    [ruby-core:7075]
- added ruby-1.8.4-108.patch (urgency medium):
  - YAML loading of quoted Symbols broken.  [ruby-Bugs:2535]
  - YAML could not load Bignum in ruby 1.8.3/1.8.4.  [ruby-core:6115]
  - YAML could not dump Subclass of Numeric properly.  [ruby-core:7047]
  - should be able to load "!ruby/object:Bignum" syntax 1.8.3 dumped.
    [ruby-core:6159]
  - workaround for SEGV.  ex: YAML.load("!map:B {}").  [ruby-core:7217]
  - fixed a typo in yaml.rb.  [ruby-talk:165285] [ruby-core:6995]
  - YAML should output complex key mark even if map's key is empty seq/map.
    [ruby-core:7129]
- added ruby-1.8.4-109.patch:
  - fixed possibility of memmory corruption.
- added ruby-1.8.4-111.patch:
  - don't clobber %l7 of SPARC if enable-shared.
  - workaround for FreeBSD/i386 getcontext/setcontext bug.  [ruby-dev:28263]
- added ruby-1.8.4-112.patch:
  - FileUtils#mv should remove file after copying.  [ruby-dev:28223]
- added ruby-1.8.4-113.patch:
  - avoids compile error (use system routine if provided).
    [ruby-core:07195]
- added ruby-1.8.4-114.patch:
  - need not to protect $SAFE value.  [ruby-core:07177]
- added ruby-1.8.4-115.patch:
  - (2**32).to_s(2) fails with exception where sizeof(int) == 4 <
    sizeof(long). [ruby-core:7300] [ruby-Bugs:3438]
- added ruby-1.8.4-116.patch:
  - PStore#fetch should return default value if name is not found.
    [ruby-core:7304]
- added ruby-1.8.4-117.patch:
  - defined RSTRUCT_LEN and RSTRUCT_PTR for source level compatibility with
    ruby 1.9.
  - alias RbConfig for Config for compatibility with ruby 1.9.
- added ruby-1.8.4-118.patch:
  - should not access ruby objects in finalizer of Zlib.  [ruby-dev:28286]
- added ruby-1.8.4-119.patch:
  - no need to push ruby_class.  [ruby-dev:28176] [ruby-dev:28580]
  - check if ruby_cbase is nil (during instance_eval for objects cannot have
    singleton classes, e.g. fixnums and symbols).  [ruby-dev:28178]
    [ruby-dev:28580] [ruby-dev:28582]
  - argument update propagation.  [ruby-dev:28044]
  - avoid unnecessary extra argument.  [ruby-core:07366] [ruby-dev:28583]
    [ruby-dev:28583]
- added ruby-1.8.4-120.patch:
  - support non 32bit time_t environments.
- added ruby-1.8.4-121.patch:
  - zsuper (with define_method) dumps core.  [ruby-dev:28181]
- added ruby-1.8.4-122.patch:
  - should no singleton classes for true, false, and nil.  [ruby-dev:28186]
- added ruby-1.8.4-124.patch:
  - sleep should always sleep for specified amount of time.
    [ruby-talk:180067]
- added ruby-1.8.4-125.patch:
  - unpack("l") did not work where sizeof(long) != 4.  [ruby-talk:180024]
  - fixed integer overflow on template "w" of pack.  [ruby-talk:180126]
- added ruby-1.8.4-126.patch:
  - removed unnecessary MY_FILE_NAME constant.  [ruby-core:07376]
- added ruby-1.8.4-127.patch:
  - odd break behavior.  [ruby-talk:180420]
- added ruby-1.8.4-128.patch:
  - unexpected syntax error.  [ruby-talk:180648]
- added ruby-1.8.4-129.patch:
  - fixed that irb can't parse /\^/. [ruby-dev:28404] [ruby-Bugs:3302]
  - rdoc could not handle /\^/.  [ruby-talk:181631] [ruby-dev:28404]
- added ruby-1.8.4-130.patch:
  - symbols overlap ordinary objects.  [ruby-core:07414]
  - heap_slots may overflow.
  - align VALUE with sizeof(RVALUE) globally.  [ruby-talk:178364]
    [ruby-core:7305]
- added ruby-1.8.4-131.patch:
    - should not re-schedule output from KILLED thread.
- added ruby-1.8.4-133.patch:
  - reports aliased method names in a generated backtrace.  [ruby-dev:28471]
  - insecure calling should be checked for non NODE_SCOPE method invocations
    too.
  - should preserve the current safe level as well as method definition.
- added ruby-1.8.4-134.patch:
  - (bignum) second operand may be too big even if it's a Fixnum.
    [ruby-talk:187984]
- libruby1.8-dbg: applied a patch from Matthew Palmer to provide detached
  symbols.

* Wed Nov  9 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.1-0vl22
- added BuildRequires: zlib-devel

* Sat Jul  2 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.8.1-0vl21
- rebuild for VineSeed
- rename BuildRequires: XFree86-devel to XOrg-devel

* Thu Jun 23 2005 akira yamada <akira@vinelinux.org> 1.8.1-0vl20.1
- added ruby-1.8.2pre2-xmlrpc-util.rb.patch:
  - fixed arbitrary command execution on XMLRPC server. 
    (CAN-2005-1992) [ruby-core:5237]

* Wed Nov 03 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.8.1-0vl20
- increased release number to avoid discrepancy against 3.0/errata package

* Wed Nov 03 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl19
- updated and enabled ruby-1.8.2pre2-cvs-update-104.patch.
- added ruby-1.8.2pre2-io-open.patch:
  - (important) additional changes for "open dumps core again^2."
    [ruby-dev:24656]
- added ruby-1.8.2pre2-array-uniq.patch:
  - Array#uniq should not freeze elements.  [ruby-dev:24695]

* Wed Nov 03 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl18
- added ruby-1.8.2pre2-cvs-update-104.patch:
  - (important) Enumerable#grep dumps core.  [ruby-dev:24671]
  - (important) open dumps core again^2.  [ruby-dev:24656]
- added ruby-1.8.2pre2-ostruct-revert.patch and removed
  ruby-1.8.2pre2-ostruct-marshal.patch:
  - reverted lib/ostruct.rb.

* Sun Oct 31 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl17
- added ruby-1.8.2pre2-cvs-updates-103.patch:
  - (important) temporarily frozen string causes core dump.  [ruby-dev:24552]
- removed ruby-1.8.2pre2-cgi.rb-macie.patch,
  ruby-1.8.2pre2-ostruct-marshal.patch,
  ruby-1.8.2pre2-zlib-flush_next_in.patch and
  ruby-1.8.2pre2-ruby_finalize_1-segv.patch: they ware included into the
  above patch.

* Sat Oct 30 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl16
- added ruby-1.8.2pre2-eval.c-memory-leak.patch:
  - (important) another memory leak in ruby_1_8.  [ruby-core:03619]
- added ruby-1.8.2pre2-io-path.patch:
  - (important) IO#path may cause segv.  [ruby-talk:118234]
- added ruby-1.8.2pre2-enum-sort_by.patch:
  - (important) Enumerable#sort_by dumps core again^4.  [ruby-dev:24642]

* Fri Oct 29 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl15
- added ruby-1.8.2pre2-cvs-updates-100.patch:
  - minor bug fix.
- added ruby-1.8.2pre2-cvs-updates-101.patch:
  - (important) "IO.allocate.reopen('/nothing')" on irb causes SEGV.
    [ruby-core:03288]
  - YAML fails to load/dump non-printable characters.  [ruby-core:03280]
    [ruby-core:03286]
  - Bug#265429: IO.select() mysteriously hangs [ruby-dev:24072]
    [ruby-dev:24075]
  - Pathological slowdown in 1.8  [ruby-core:02662]
- added ruby-1.8.2pre2-cvs-updates-102.patch:
  - (important) fixed some segmentation fault bugs listed in
    - <URL:http://jp.rubyist.net/magazine/?0002-RubyCore>.
    - raise dumps core.  [ruby-dev:24519]
    - unpack("p") dumps core.  [ruby-dev:24594]
    - Enumerable#sort_by dumps core again.  [ruby-dev:24386]
    - Enumerable#sort_by dumps core again(2).  [ruby-dev:24399]
    - A class of return value of Array#*.  [ruby-dev:24526]
    - Zlib::Deflate#deflate causes core dump.  [ruby-dev:24530]
  - PStore#transaction may raise Errno::ENOENT.  [ruby-dev:24561]
  - String#include? ?\x80.  [ruby-dev:24558]
  - httpresponse.rb: ensure to close @body.
  - (important) fixed memory leak.  [ruby-core:03549]
  - Zlib::GzipReader#ungetc does not work correctly.
  - (important) core dump with binding, eval, instance_eval and class
    variable.  [ruby-dev:24120]
- added ruby-1.8.2pre2-cgi.rb-macie.patch:
  - cgi.rb: workaround for Mac IE.  [ruby-list:40136]
- added ruby-1.8.2pre2-ostruct-marshal.patch:
  - ostruct.rb: OpenStruct can't be dumped.  [ruby-dev:24625]
- added ruby-1.8.2pre2-zlib-flush_next_in.patch:
  - (important) Zlib::Deflate#flush_next_in causes core dump.
    [ruby-dev:24621]
- added ruby-1.8.2pre2-ruby_finalize_1-segv.patch:
  - (important) raising zlib dumps core again.  [ruby-dev:24627]
- removed ruby-1.8.2pre2-cgi-session-filename.patch and
  ruby-1.8.2pre2-cgi.rb-infinity-loop.patch: they ware included into the
  above patch.

* Fri Oct 29 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl14
- added ruby-1.8.2pre2-cgi-session-filename.patch:
  - (important) CGI::Session::FilesStore and CGI::Session::PStore should not
    use a session id as a filename.
- added ruby-1.8.2pre2-cgi.rb-infinity-loop.patch:
  - (security) cgi.rb: avoids infinity loop.

* Wed Oct 13 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.8.1-0vl13
- rebuilt with db4-4.2.25

* Fri Jul 30 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl12
- new upstream source, ruby-1.8.2-preview2.
- removed patches which is included into upstream:
  ruby-1.8.2pr1-sleep.patch, ruby-1.8.2pr1-version.h.patch,
  ruby-1.8.2pr1-yaml-rubytypes.rb.patch, ruby-1.8.2pr1-ruby-mode.patch,
  ruby-1.8.2pr1-yaml-load-exception.patch,
  ruby-1.8.2pr1-config.guess-revert.patch, ruby-1.8.2pr1-callcc.patch,
  ruby-1.8.2pr1-net-imap.patch, ruby-1.8.2pr1-uri-ldap.patch,
  ruby-1.8.2pr1-use-NULL.patch, ruby-1.8.2pr1-cgi-session.patch and
  ruby-1.8.2pr1-run-final.patch.
- renamed to ruby-1.8.2pre2-delegate.rb.patch from
  ruby-1.8.2pr1-delegate.rb.patch.

* Wed Jul 28 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl11
- enabled Patch811(ruby-1.8.2pr1-cgi-session.patch).
- added a patch:
  - ruby-1.8.2pr1-run-final.patch: ObjectSpace.define_finalizer may cause
    Segmentation falult.  [ruby-dev:23957]

* Wed Jul 21 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl10
- new upstream source, ruby-1.8.2-preview1.
- removed patches which included into upstream: 
  ruby-1.8.1-{100..108}-cvs-updates.patch,
  ruby-1.8.1-ia64-stack-limit-hack.patch,
  ruby-1.8.1-zlib_64bit_gzfile_get32.patch,
  ruby-1.8.1-rdoc-parse.rb.patch.
- updated patches:
  - ruby-1.8.1-sleep.patch -> ruby-1.8.2pr1-sleep.patch
  - ruby-1.8.1-yaml-rubytypes.rb.patch -> ruby-1.8.2pr1-yaml-rubytypes.rb.patch
  - ruby-1.8.1-ruby-mode.patch -> ruby-1.8.2pr1-ruby-mode.patch
  - ruby-1.8.1-delegate.rb.patch -> ruby-1.8.2pr1-delegate.rb.patch
  - ruby-1.8.1-config.guess-revert.patch -> ruby-1.8.2pr1-config.guess-revert.patch
  - ruby-1.8.1-ri-pager.patch -> ruby-1.8-ri-pager.patch
- added patches:
  - ruby-1.8.2pr1-version.h.patch: added some constans.
  - ruby-1.8.2pr1-yaml-load-exception.patch: YAML.load
    couldn't load Exception objects.  [ruby-talk:104405]
  - ruby-1.8.2pr1-callcc.patch: callcc method may cause unknown data type
    bug.  [ruby-talk:106657]
  - ruby-1.8.2pr1-net-imap.patch: wait command continuation requests before
    sending octet data of literals.
  - ruby-1.8.2pr1-uri-ldap.patch: method hierarchical? in uri/ldap.rb should
    be in URI::LDAP.
  - ruby-1.8.2pr1-use-NULL.patch: use NULL instead of 0.
  - ruby-1.8.2pr1-cgi-session.patch: sets the permission of the session data
    file to 0600.  [ruby-dev:23952]

* Wed Jun 23 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl9
- added ruby-1.8.1-rdoc-parse.rb.patch:
    - [ruby-talk:104190] %r{...} is a regular expression but RDoc prints it
      as %{...}.
- added ruby-1.8.1-config.guess-revert.patch:
    - [ruby-dev:23753] revert to original config.guess
      <URL:ftp://ftp.gnu.org/pub/gnu/config/config.guess>.

* Tue Jun 22 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl8
- added ruby-1.8.1-yaml-rubytypes.rb.patch:
    - backported from CVS HEAD.

* Tue Jun 22 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl7
- added ruby-1.8.1-106-cvs-updates.patch:
    - [ruby-dev:23550] Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
      dumps core.
    - [ruby-core:02793] ruby -e 'a[*b]+=c' dups core.
    - [ruby-dev:23487] core dump by delete_if on 1.8
    - options for Net::Telnet::login can take regexps for login prompt
      and/or password prompt.
- added ruby-1.8.1-107-cvs-updates.patch:
    - upgraded to stable-snapshot (2004-06-05).
- added debian/patches/108_cvs_updates.patch:
    - [ruby-dev:22631] should not dump singleton class.
    - limit safe level.
    - [ruby-dev:23713] allow changing $SAFE.
- added ruby-1.8.1-820_zlib_64bit_gzfile_get32.patch:
    - the value in gzfile_get32 can accidentally be sign extended on 64 bit
      systems.  Thanks to Matthew Mueller.  (see Debian Bug#255442)
- removed ruby-1.8.1-time.c.patch, ruby-1.8.1-find.rb.patch,
  ruby-1.8.1-telnet.rb.patch, ruby-1.8.1-yaml.patch,
  ruby-1.8.1-proc_eq.patch, ruby-1.8.1-misc-escape.patch and
  ruby-1.8.1-parse.y-reverse.patch.  they ware included into the above
  patch.
- updated SOURCE2.  [VineSeed:09109]
- removed unusable "Prefix:".

* Fri Feb 06 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl6
- configure with --with-bundled-{sha1,md5,rmd160}.  it free libruby1.8 from
  libssl.
- added ruby-1.8.1-105-cvs-updates.patch:
  - "undef" for methods does not work. [ruby-list:39058]
  - blocks in "#{}" makes syntax error. [ruby-list:39061]
  - Net::IMAP accepts 8-bit characters in quoted strings for Novell
    GroupWise Internet Agent.
  - Socket#recvfrom makes an invalid argument error in non-blocking mode.
    [ruby-talk:89962]
  - util.c (mblen): fix overrun. (DJGPP ONLY)  [ruby-dev:22672]
  - delegate.rb should use Kernel::raise for Thread.  [ruby-dev:22681]
    [ruby-dev:22684]
  - delegate.rb should not delegate singleton_method_added.
    [ruby-dev:22685]
- added ruby-1.8.1-find.rb.patch:
  - Find.find raises SecurityError in $SAFE>=1. [ruby-dev:22641]
  - Find.find("xyz") will yield "xyz" even if no such file exists.
    [ruby-core:02319]
- added ruby-1.8.1-telnet.rb.patch:
  - net/telnet.rb accepts "Login" prompt.
- added ruby-1.8.1-yaml.patch:
  - syck library does not dump tv_usec correctly. [ruby-core:02305]
  - syck cannot dump a Range of strings. [ruby-core:02306]
- added ruby-1.8.1-ruby-mode.patch:
  - font-lock could not treat %"..." correctry. [ruby-dev:22705]
- added ruby-1.8.1-proc_eq.patch:
  - Proc with empty body may not be equal.  [ruby-dev:22590]
    [ruby-dev:22594][ruby-dev:22602]
- added ruby-1.8.1-misc-escape.patch:
  - Here-document in lib/rexml/encodings/ISO-8859-1.rb requires quotation,
    as in US-ASCII.rb.  [ruby-talk:88650]
  - avoid warnings in rdoc/parsers/parse_c.rb.

* Thu Jan 22 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.8.1-0vl5
- changed the arguments when generating RI (in the %%install section)
  against "ppc vs powerpc" issue (thanks Akira Yamada-san for helping)

* Wed Jan 21 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl4
- added ruby-1.8.1-104-cvs-updates.patch:
  - removed O_NONBLOCK for a socket used by DRb.
  - Net::IMAP accepts an NIL-envelope.

* Tue Jan 20 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl3
- added ruby-1.8.1-103-cvs-updates.patch:
  - io.c: initializer of lineno should be "INT2FIX(0)".
  - disabled optimization on ia64.  (-O1/2 makes ruby unusable.)
- added ruby-1.8.1-ia64-stack-limit-hack.patch:
  - disable IA64_MAGIC_STACK_LIMIT trick when optimization is disabled.
    [ruby-dev:22650]

* Mon Jan 19 2004 akira yamada <akira@vinelinux.org> 1.8.1-0vl2
- added ruby-1.8.1-101-cvs-updates.patch:
  - StringIO.new.sysread should raise EOFError.  [ruby-core:2078]
  - don't increment lineno when gzfile_read_all returns "".  [ruby-core:2078]
  - ARGF.readline should raise EOFError at EOF.  [ruby-dev:22458]
  - both of ARGF.read and ARGF.read(nil) should concatenate input files when
    length argument is nil.  [ruby-dev:22450]
  - ARGF.lineno should return 0 even if ARGF have not been read.
    [ruby-dev:22460]
  - ARGF.each_byte should return self.  [ruby-dev:22465]
  - ARGF.eof? should not have any side effect.  [ruby-dev:22469]
  - should not abort when module_function is called for undefined method.
    [ruby-dev:22498]
  - ARGF.read(n) makes an error when it gets EOF.  [ruby-bugs-ja:PR#585]
  - synchronized with date2 library version 3.5.  it includes fixes for
    [ruby-talk:90063].
- added ruby-1.8.1-102-cvs-updates.patch:
  - documents of methods of IO is missing.
- added ruby-1.8.1-sleep.patch:
  - sleep is broken with --enable-pthread.  [ruby-core:2133]
    [ruby-core:2137]
- added ruby-1.8.1-time.c.patch:
  - Time#usec should not return neither a negative number nor a number which
    is larger than 1000000.  [ruby-dev:22614], [ruby-dev:22617]
- added ruby-1.8.1-ri-pager.patch:
  - changed pager search order: ENV['PAGER'], pager, ...
- put datafiles of ri into rdoc package.

* Sat Dec 27 2003 akira yamada <akira@vinelinux.org> 1.8.1-0vl1
- new upstream version.
- applied bugfix patch.  ruby-1.8.1-100-cvs-updates.patch:
  - Kernel::require searches actual file name once when no extension
    specified.
  - fixes Ruby/Tk crash bug. (but does not fix block bug.) [ruby-talk:88830]
  - Array#pack checks sign for "i" and "I".  [ruby-dev:22427]
  - IO::readlines should return lines when record-separater is nil.
    [ruby-core:02077][ruby-core:02078]
  - ARGF.read accepts "nil" for argument.  [ruby-dev:22433]
- updated ruby-refm-rdp-1.6.8-ja-html.tar.gz.
- added ruby-mode-init.el.
- updated ruby-mode-install.sh and ruby-mode-remove.sh.

* Mon Dec 08 2003 akira yamada <akira@vinelinux.org> 1.8.0-0vl5
- updated ruby-1.8.1pr3-cvs-updates.patch.

* Sat Dec 06 2003 akira yamada <akira@vinelinux.org> 1.8.0-0vl3
- updated to Ruby 1.8.1-preview3.
- applied patches from the CVS.

* Thu Oct 16 2003 akira yamada <akira@vinelinux.org> 1.8.0-0vl2
- libruby obsoletes drb, erb, ruby-csv, ruby-optparse, ruby-rexml,
  ruby-strscan, rubyunit and racc-runtime.

* Mon Oct 06 2003 akira yamada <akira@vinelinux.org> 1.8.0-0vl1
- new upstream version.
- applied patches from the CVS.
- new sub-package: ruby-openssl.

* Mon Mar 31 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.6.8-0vl2
- rebuild with tcltk-8.4.2

* Tue Jan 21 2003 akira yamada <akira@vinelinux.org> 1.6.8-0vl1
- new upstream version.
- applied a patch:
    - [ruby-dev:18702] [PATCH] .rb/.so with same feature name
- build with db4-devel.  (dbm.so is linked with libdb-4.0.so.)

* Tue Mar 19 2002 akira yamada <akira@vinelinux.org> 1.6.7-0vl5
- applied bug fix patch:
    - ruby-dev#16462: preserve reference for GC, but link should be cut.
      (ruby-dev#16411: block local var.)
    - RUBY_RELEASE_DATE "2002-03-19"
  (ruby-1.6.7-103.patch)

* Sun Mar 17 2002 akira yamada <akira@vinelinux.org> 1.6.7-0vl4
- applied bug fix patch:
    - ruby-dev#16274: patch for 'wm state' (tk.rb)
    - PR#206ja: SEGV handle EXIT 
    - updated NEWS
    - RUBY_RELEASE_DATE "2002-03-14"
  (ruby-1.6.7-100.patch)
    - ruby-list#34313: singleton should not be Marshal.dump'ed
    - ruby-dev#16411: block local var
    - RUBY_RELEASE_DATE "2001-03-15"
  (ruby-1.6.7-101.patch)
    - handling multibyte chars is partially broken.
    - RUBY_RELEASE_DATE "2002-03-18"
  (ruby-1.6.7-102.patch)
- removed ruby-1.6.7-500-marshal-proc.patch and
  ruby-1.6.7-501-class-var.patch.  they are included (or rewrited) into the
  above patch.
- updated refm. (ruby-refm-rdp-1.6.7-ja-html.zip)
- prefixed %%lang(ja) to %%doc for Japanese documents.

* Fri Mar 08 2002 akira yamada <akira@vinelinux.org> 1.6.7-0vl3
- applied patch501.

* Fri Mar 08 2002 akira yamada <akira@vinelinux.org> 1.6.7-0vl2
- updated refm. (ruby-refm-rdp-1.6.7-jp-html.zip)

* Sun Mar 03 2002 akira yamada <akira@vinelinux.org> 1.6.7-0vl1
- new upstream version.
    - uri library is included.
    - time.rb is new.
    - some bugs are fixed.
- added ruby-refm-rdp-1.6.6-jp-html.zip.
- applied bug fix patch: 
    - ruby-dev#16178: Marshal::dump shuld call Proc#call.
    (ruby-1.6.7-500-marshal-proc.patch)
    - ruby-talk#35157: class vars broken in 1.6.7
    (ruby-1.6.7-501-class-var.patch)
- removed: ruby-1.6.6-10[12].patch, ruby-1.6.6-502-net_pop.patch.

* Mon Feb 04 2002 akira yamada <akira@vinelinux.org> 1.6.6-0vl5
- applied bug fix patch:
    - ruby-dev#15684: reject prefix followed by spaces only.
    - PR#183: SEGV on remove_class_variable
    (ruby-1.6.6-101.patch)
    - PR#184: Net::APOP.auth_only is not usable
    (ruby-1.6.6-502-net_pop.patch)
- removed ruby-1.6.6-502-net_pop.patch. it is included by
  101_ruby-1.6.6.patch.
- site_ruby moved to under /usr/local/lib.
- added db1-devel to BuildRequires.

* Wed Jan 09 2002 akira yamada <akira@vinelinux.org> 1.6.6-0vl4
- added a bug fix patch: ruby-1.6.6-501-ruby-mode.patch
    - ruby-talk#30479: ruby-mode.el disables font-lock coloring

* Tue Jan 08 2002 akira yamada <akira@vinelinux.org> 1.6.6-0vl3
- added a bug fix patch: ruby-1.6.6-100.patch
    - ruby-talk#30203: Ruby 1.6.6 bug and fix
    - ruby-list#33047: regex bug
    - PR#230: problem with -d in 1.6.6
- removed patches: ruby-900-XXX-strtod.patch ruby-503-weakref.rb.patch. 
  included into ruby-1.6.6-100.patch.

* Fri Jan 04 2002 akira yamada <akira@vinelinux.org> 1.6.6-0vl2
- added a patch:
    - ruby-1.6.6-901-sparc.patch: PR#225: sparc linux needs different
      FLUSH_REGISTER_WINDOWS
- renamed to ruby-mode from ruby-mode-el.

* Wed Dec 26 2001 akira yamada <akira@vinelinux.org> 1.6.6-0vl1
- new upstream version.

* Sun Nov 18 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.6.5-0vl3
- rebuilt with new tcl/tk packages
- added patches: ruby-900-XXX-strtod.patch ruby-503-weakref.rb.patch

* Wed Oct 10 2001 akira yamada <akira@vinelinux.org> 1.6.5-0vl2
- applied bug fix patch from upstrem cvs repository.
    - ruby-dev#14810, ruby-dev#14813 (ruby-1.6.5-100.patch)
- applied bug fix patch:
    - ruby-list#31570 for net/pop.rb (ruby-1.6.5-501-net-pop.rb.patch)
- %%{_mandir} hack.
- emacsen_pkg hack. (very dirty for %%_foo() in %%if-%%endif. but it is 
  wrong of spec-specification... sigh.)

* Wed Sep 19 2001 akira yamada <akira@vinelinux.org> 1.6.5-0vl1
- new upstream version.
- add XFree86-devel to BuildRequires. (tk.h requires X11/Xlib.h.)

* Mon Sep 03 2001 akira yamada <akira@vinelinux.org> 1.6.4-0vl8
- removed files related on emacsen-common from libruby.
- updated upstream URLs.

* Tue Aug 07 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl7
- added ruby-1.6.4-108.patch.
    - fixed: causes segv to mod_ruby.
    - do not recurse if method_missing is undefined.
    - m68k work around.

* Fri Aug 03 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl5
- new sub-package ruby-mode-el. it provides ruby-mode for emacsen.

* Wed Aug 01 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl4
- added ruby-1.6.4-10[67].patch.
- remove ruby-1.6.4-501.patch. (fixed on upstream.)
    - marshal verbose warning bug.
    - ruby-1.6-2001.07.31.
- packages except libruby and irb requires libruby = %%{version}-%%{release}.
- irb requires ruby = %%{version}-%%{release}.

* Thu Jul 26 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl3
- added ruby-1.6.4-10[345].patch and ruby-1.6.4-501.patch.
    - tilde expansion problem and PR#158.
- some documents moved to libruby.rpm from ruby.rpm.
- stopped using %%configure macros, because it breaks 
  Config::CONFIG["libdir"] variable: %%configure sets 
  it to "/usr/lib" but it should be 
  "$(exec_prefix)/lib" for some packages which uses 
  ruby.

* Tue Jul 17 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl2
- added ruby-1.6.4-10[12].patch.
    - fixed a bug around order of "$:".
    - updated config.{guess,sub}.
    - eval.c bug.
    - marshal version 4.6.

* Mon Jun 04 2001 akira yamada <akira@vinelinux.org>
- 1.6.4-0vl1
- upgrade to nwe upstream version 1.6.4.

* Mon Apr 02 2001 akira yamada <akira@vinelinux.org>
- applied patch:
  - fixed method cache bug. etc. (Patch103, Patch104)

* Tue Mar 27 2001 akira yamada <akira@vinelinux.org>
- applied patch:
  - fixed marshal for bignum bug.
  - fixed scope of constant variables bug.

* Tue Mar 20 2001 akira yamada <akira@vinelinux.org>
- upgraded to new upstream version 1.6.3.

* Fri Feb 09 2001 akira yamada <akira@vinelinux.org>
- fixed bad group for libruby.
- Applied patch: upgraded to cvs version (2001-02-08):
  fixed minor bugs.

* Thu Jan 18 2001 akira yamada <akira@vinelinux.org>
- Applied patch: upgraded to cvs version (2001-01-15):
  fixed minor bugs(e.g. ruby makes extention librares too large...).

* Wed Jan 10 2001 akira yamada <akira@vinelinux.org>
- Applied patch: upgraded to cvs version (2001-01-09):
  fixed minor bugs.

* Sat Dec 30 2000 akira yamada <akira@vinelinux.org>
- Applied bug fix patch.

* Mon Dec 25 2000 akira yamada <akira@vinelinux.org>
- Updated to new upstream version 1.6.2.

* Fri Dec 22 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000122019.patch, added ruby_cvs.2000122215.patch
  (upgraded ruby to latest cvs version, 1.6.2-preview4).

* Wed Dec 20 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000121413.patch, added ruby_cvs.2000122019.patch
  (upgraded ruby to latest cvs version).
- new package: libruby

* Thu Dec 14 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000101901.patch, added ruby_cvs.2000121413.patch
  (upgraded ruby to latest cvs version).
- Removed ruby-dev.11262.patch, ruby-dev.11265.patch, 
  and ruby-dev.11268.patch (included into above patch).

* Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 1.6.1-0vl9
- build on gcc-2.95.3

* Thu Oct 19 2000 akira yamada <akira@vinelinux.org>
- Added ruby-dev.11268.patch.

* Thu Oct 19 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000101117.patch and added ruby_cvs.2000101901.patch
  (upgraded ruby to latest cvs version).
- Added ruby-dev.11262.patch.
- Added ruby-dev.11265.patch.
  
* Wed Oct 11 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000101117.patch
  (upgraded ruby to latest cvs version).

* Mon Oct 09 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000100313.patch
  (upgraded ruby to latest cvs version).

* Tue Oct 03 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000100218.patch and added ruby_cvs.2000100313.patch
  (upgraded ruby to latest cvs version).

* Mon Oct 02 2000 akira yamada <akira@vinelinux.org>
- Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch
  (upgraded ruby to latest cvs version).

* Wed Sep 27 2000 akira yamada <akira@vinelinux.org>
- Updated to upstream version 1.6.1.
- Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch
  (upgraded ruby to latest cvs version).

* Tue Aug 29 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.6.
- removed ruby-dev.10123.patch(included into ruby-1.4.6).
- Added ruby_cvs.2000082901.patch(upgraded ruby to latest cvs version).

* Tue Jun 27 2000 akira yamada <akira@redhat.com>
- Updated manuals to version 1.4.5.

* Sun Jun 25 2000 akira yamada <akira@redhat.com>
- Added ruby-dev.10123.patch.

* Sat Jun 24 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.5.
- Removed ruby_cvs.2000062401.patch(included into ruby-1.4.5).

* Thu Jun 22 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.4(06/22/2000 CVS).
- Removed ruby-dev.10054.patch(included into ruby_cvs.patch).

* Thu Jun 22 2000 akira yamada <akira@redhat.com>
- Renamed to ruby_cvs20000620.patch from ruby_cvs.patch.

* Tue Jun 20 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.4(06/20/2000 CVS).
- Removed ruby-list.23190.patch(included into ruby_cvs.patch).
- Added ruby-dev.10054.patch.

* Thu Jun 15 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.4(06/12/2000 CVS).
- Added manuals and FAQs.
- Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb.

* Tue Jun 13 2000 Mitsuo Hamada <mhamada@redhat.com>
- Updated to version 1.4.4

* Wed Dec 08 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.4.3

* Mon Sep 20 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.4.2 (Sep 18)

* Fri Sep 17 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.4.2

* Tue Aug 17 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.4.0

* Fri Jul 23 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- 2nd release
- Updated to version 1.2.6(15 Jul 1999)
- striped %{prefix}/bin/ruby

* Mon Jun 28 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.2.6(21 Jun 1999)

* Wed Apr 14 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.2.5

* Fri Apr 09 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 1.2.4

* Fri Dec 25 1998 Toru Hoshina <hoshina@best.com>
- Version up to 1.2 stable.

* Fri Nov 27 1998 Toru Hoshina <hoshina@best.com>
- Version up to 1.1c9.

* Thu Nov 19 1998 Toru Hoshina <hoshina@best.com>
- Version up to 1.1c8, however it appear short life :-P

* Fri Nov 13 1998 Toru Hoshina <hoshina@best.com>
- Version up.

* Tue Sep 22 1998 Toru Hoshina <hoshina@best.com>
- To make a libruby.so.

* Mon Sep 21 1998 Toru Hoshina <hoshina@best.com>
- Modified SPEC in order to install libruby.a so that it should be used by
  another ruby entention.
- 2nd release.

* Mon Mar 9 1998 Shoichi OZAWA <shoch@jsdi.or.jp>
- Added a powerPC arch part. Thanks, MURATA Nobuhiro <nob@makioka.y-min.or.jp>
