Summary: RubyGem
Name: rubygems
Version: 1.3.1
Release: 1
requires: ruby >= 1.8.5, ruby-libs >= 1.8.5
Source0: %{name}-%{version}.tgz
License: GPL
URL: http://rubyforge.org/frs/download.php/45905/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildPreReq: ruby >= 1.8.5, ruby-libs >= 1.8.5
Group: Development/Tools
%description
Ruby Gems

%prep
%setup -q

%install
ruby setup.rb --destdir $RPM_BUILD_ROOT/usr --no-rdoc --no-ri

cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}

%files -f ../file.list.%{name}
%clean
rm -rf %{buildroot}

