File rubygems.spec of Package rubygems

#
# spec file for package rubygems
#
# 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/
#

# norootforbuild


Name:           rubygems
Version:        1.8.15
Release:        1
#
License:        Ruby
Group:          Development/Languages/Ruby
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  ruby-devel
Requires:       ruby-devel
Provides:       rubygems_with_buildroot_patch
#
Url:            http://rubyforge.org/projects/rubygems/
# from          http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
Source:         rubygems-%{version}.tar.bz2
Source1:        gem_build_cleanup
Source2:        rubygems-rpmlintrc
Source3:        rubygems.macros
Patch:          rubygems-1.8.15_buildroot.patch
# SLES and openSUSE 11.2 have ruby 1.8.7p72 and some gems fail to build
# see http://revision-zero.org/history-of-a-bug
Patch2:         hashvalue_too_big.patch
Summary:        The Ruby standard for publishing and managing third party libraries

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

%package testsuite
Summary:        Test suite for rubygems. Useful mainly for developers
Group:          Development/Languages/Ruby
Requires:       %{name} = %{version}

%description testsuite
Tests for rubygems. Useful for developers to check changes againts testsuite.

%prep
%setup -n %{name}-%{version}
%patch
#if 0%{?suse_version} < 1130
%patch2
#endif

%build

%install
GEM_HOME=%{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \
    ruby -rvendor-specific setup.rb --destdir=%{buildroot}
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_bindir}/gem_build_cleanup
%{__install} -D -m 0644 %{S:3} %{buildroot}/etc/rpm/macros.rubygems
%{__mkdir_p} %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/cache/
%{__mkdir_p} %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/doc/
%{__mkdir_p} %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/
%{__mkdir_p} %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/specifications/

%check
rake test ||:

%clean
%{__rm} -rf %{buildroot};

%files
%defattr(-,root,root)
%config(noreplace) /etc/rpm/macros.rubygems
%doc LICENSE.txt README.rdoc History.txt
%{_bindir}/gem_build_cleanup
%{_bindir}/gem
%dir %{_libdir}/ruby/vendor_ruby/%{rb_ver}/rbconfig/
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/rbconfig/datadir.rb
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/*ubygems.rb
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/rubygems/
%dir %{_libdir}/ruby/gems/
%dir %{_libdir}/ruby/gems/%{rb_ver}
%dir %{_libdir}/ruby/gems/%{rb_ver}/cache/
%dir %{_libdir}/ruby/gems/%{rb_ver}/doc/
%dir %{_libdir}/ruby/gems/%{rb_ver}/gems/
%dir %{_libdir}/ruby/gems/%{rb_ver}/specifications/

%files testsuite
%defattr(-,root,root)
%doc test

%changelog
openSUSE Build Service is sponsored by