2007-01-16 00:35:31 +01:00
|
|
|
#
|
2011-02-22 21:30:58 +01:00
|
|
|
# spec file for package ruby
|
2007-01-16 00:35:31 +01:00
|
|
|
#
|
2013-01-22 09:21:57 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:35:31 +01:00
|
|
|
#
|
2008-09-08 01:38:25 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-16 00:35:31 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-07-02 16:18:33 +02:00
|
|
|
|
2007-01-16 00:35:31 +01:00
|
|
|
Name: ruby
|
2013-05-02 09:41:27 +02:00
|
|
|
Version: 2.0
|
2011-03-18 14:47:34 +01:00
|
|
|
Release: 0
|
2007-01-16 00:35:31 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-05-08 13:54:54 +02:00
|
|
|
Source0: ruby.macros
|
|
|
|
Source2: gemrc
|
2007-01-16 00:35:31 +01:00
|
|
|
Provides: /usr/bin/ruby
|
2007-10-11 22:07:03 +02:00
|
|
|
Url: http://www.ruby-lang.org/
|
2007-01-16 00:35:31 +01:00
|
|
|
Summary: An Interpreted Object-Oriented Scripting Language
|
2012-07-02 16:18:33 +02:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Ruby
|
2012-08-01 20:58:56 +02:00
|
|
|
BuildRequires: ruby-common
|
2013-05-02 09:41:27 +02:00
|
|
|
BuildRequires: ruby20-devel
|
2012-08-01 20:58:56 +02:00
|
|
|
BuildRequires: update-alternatives
|
2012-11-03 16:32:07 +01:00
|
|
|
#!BuildIgnore: ruby ruby-devel
|
2013-01-22 09:21:57 +01:00
|
|
|
#!BuildIgnore: rubygems
|
2013-05-02 09:41:27 +02:00
|
|
|
%requires_eq ruby20
|
2012-05-08 13:54:54 +02:00
|
|
|
Provides: rubygems = 1.8.15
|
|
|
|
Obsoletes: rubygems < 1.8.15
|
2012-08-01 20:58:56 +02:00
|
|
|
Requires: update-alternatives
|
|
|
|
|
2013-05-02 09:41:27 +02:00
|
|
|
%{expand:%(rpm -ql ruby20 | fgrep .gemspec | /usr/bin/ruby2.0 /usr/lib/rpm/rubygemsdeps.rb --provides | sed -e 's,^,Provides:,')}
|
2012-05-08 13:54:54 +02:00
|
|
|
|
2007-01-16 00:35:31 +01:00
|
|
|
%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
|
2007-08-06 18:21:32 +02:00
|
|
|
Summary: Development files to link against Ruby
|
2012-07-02 16:18:33 +02:00
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
Requires: %{name}
|
2013-05-02 09:41:27 +02:00
|
|
|
Requires: ruby20-devel
|
2012-05-08 13:54:54 +02:00
|
|
|
Provides: rubygems_with_buildroot_patch
|
|
|
|
|
2007-01-16 00:35:31 +01:00
|
|
|
%description devel
|
|
|
|
Development files to link against Ruby.
|
|
|
|
|
|
|
|
%prep
|
2011-03-18 14:47:34 +01:00
|
|
|
|
2007-01-16 00:35:31 +01:00
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2012-07-26 09:25:42 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%_bindir
|
2012-05-08 13:54:54 +02:00
|
|
|
for bin in erb gem irb rake rdoc ri ruby testrb; do
|
2013-05-02 09:41:27 +02:00
|
|
|
ln -s %_bindir/"$bin"2.0 $RPM_BUILD_ROOT%_bindir/$bin
|
2012-05-08 13:54:54 +02:00
|
|
|
done
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%_libdir
|
2013-05-02 09:41:27 +02:00
|
|
|
ln -s %_libdir/libruby2.0.so $RPM_BUILD_ROOT%_libdir/libruby.so
|
2012-05-08 13:54:54 +02:00
|
|
|
install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby
|
|
|
|
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc
|
2012-08-01 20:58:56 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
for bin in erb gem irb rake rdoc ri ruby testrb; do
|
|
|
|
/usr/sbin/update-alternatives --install \
|
2013-05-02 09:41:27 +02:00
|
|
|
%{_bindir}/$bin $bin %{_bindir}/$bin"2.0" 20
|
2012-08-01 20:58:56 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
for bin in erb gem irb rake rdoc ri ruby testrb; do
|
2013-05-02 09:41:27 +02:00
|
|
|
/usr/sbin/update-alternatives --remove $bin %{_bindir}/$bin"2.0"
|
2012-08-01 20:58:56 +02:00
|
|
|
done
|
|
|
|
fi
|
2007-01-16 00:35:31 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-07-26 09:36:40 +02:00
|
|
|
%config /etc/gemrc
|
|
|
|
%config /etc/rpm/macros.ruby
|
2012-08-01 20:58:56 +02:00
|
|
|
%ghost %{_bindir}/erb
|
|
|
|
%ghost %{_bindir}/gem
|
|
|
|
%ghost %{_bindir}/irb
|
|
|
|
%ghost %{_bindir}/rake
|
|
|
|
%ghost %{_bindir}/rdoc
|
|
|
|
%ghost %{_bindir}/ri
|
|
|
|
%ghost %{_bindir}/ruby
|
|
|
|
%ghost %{_bindir}/testrb
|
2007-01-16 00:35:31 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2012-05-08 13:54:54 +02:00
|
|
|
%_libdir/libruby.so
|
2007-01-16 00:35:31 +01:00
|
|
|
|
2012-07-02 16:18:33 +02:00
|
|
|
%changelog
|