File ruby.spec of Package ruby

#
# spec file for package ruby
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           ruby
Version:        1.9.3
Release:        0
#
License:        MIT
Group:          Development/Languages/Ruby
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        ruby.macros
Source1:        gem_build_cleanup
Source2:        gemrc
Source3:        ruby.common-macros
Provides:       /usr/bin/ruby
Url:            http://www.ruby-lang.org/
Summary:        An Interpreted Object-Oriented Scripting Language
Requires:       ruby19
Provides:       rubygems = 1.8.15
Obsoletes:      rubygems < 1.8.15

%description
Ruby is an interpreted scripting language for quick and easy
object-oriented programming.  It has many features for processing text
files and performing system management tasks (as in Perl).  It is
simple, straight-forward, and extensible.

* Ruby features:

- Simple Syntax

- *Normal* Object-Oriented features (class, method calls, for
   example)

- *Advanced* Object-Oriented features(Mix-in, Singleton-method, for
   example)

- Operator Overloading

- Exception Handling

- Iterators and Closures

- Garbage Collection

- Dynamic Loading of Object Files (on some architectures)

- Highly Portable (works on many UNIX machines; DOS, Windows, Mac,
BeOS, and more)

%package devel
Group:          Development/Languages/Ruby
Summary:        Development files to link against Ruby
Requires:       ruby19-devel %{name}
Provides:       rubygems_with_buildroot_patch

%description devel
Development files to link against Ruby.

%package common
Group:          Development/Languages/Ruby
Summary:        Files needed by all ruby versions

%description common
Development files to link against Ruby.

%prep

%build

%install
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT%_bindir/gem_build_cleanup
for bin in erb gem irb rake rdoc ri ruby testrb; do
  ln -s %_bindir/"$bin"1.9 $RPM_BUILD_ROOT%_bindir/$bin
done
mkdir -p $RPM_BUILD_ROOT%_libdir
ln -s %_libdir/libruby1.9.so $RPM_BUILD_ROOT%_libdir/libruby.so
install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby
install -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/rpm/macros.common-ruby
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc
export NO_BRP_STALE_LINK_ERROR=yes

%files
%defattr(-,root,root)
/etc/rpm/macros.ruby
%exclude %_bindir/gem_build_cleanup
%{_bindir}/*

%files devel
%defattr(-,root,root)
%_libdir/libruby.so

%files common
%defattr(-,root,root)
/etc/gemrc
/etc/rpm/macros.common-ruby
%_bindir/gem_build_cleanup

openSUSE Build Service is sponsored by