# Generated from rmail-1.0.0.gem by gem2rpm -*- rpm-spec -*- %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname rmail %global geminstdir %{gemdir}/gems/%{gemname}-%{version} Summary: A MIME mail parsing and generation library Name: rubygem-%{gemname} Version: 1.0.0 Release: 3%{?dist} Group: Development/Languages License: BSD URL: http://rubyforge.org/projects/rubymail Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem Requires: ruby(abi) = 1.8 Requires: rubygems BuildRequires: ruby BuildRequires: rubygems BuildRequires: rubygem(rake) BuildArch: noarch Provides: rubygem(%{gemname}) = %{version} %package doc Summary: Documentation for %{name} Group: Documentation Requires:%{name} = %{version}-%{release} %description doc Documentation for %{name} %description RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modify, and generate MIME mail messages. %prep %build %install mkdir -p %{buildroot}%{gemdir} gem install --local --install-dir %{buildroot}%{gemdir} \ --force --rdoc %{SOURCE0} # Remove shebang from files that do not have executable permissions for file in `find %{buildroot}/%{geminstdir} -type f ! -perm /a+x -name "*.rb"`; do [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && sed -i -e '/^#!\//, 1d' $file done # Remove install file rm -f %{buildroot}/%{geminstdir}/install.rb %check pushd %{buildroot}%{geminstdir} rake test --trace popd %files %defattr(-, root, root, -) %dir %{geminstdir} %{geminstdir}/lib %{geminstdir}/version %doc %{geminstdir}/README %doc %{geminstdir}/NEWS %doc %{geminstdir}/THANKS %doc %{geminstdir}/NOTES %doc %{geminstdir}/TODO %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec %files doc %defattr(-, root, root, -) %{gemdir}/doc/%{gemname}-%{version} %{geminstdir}/test %{geminstdir}/guide %{geminstdir}/Rakefile %changelog * Wed Jun 2 2010 Shreyank Gupta - 1.0.0-3 - Removed Requires:ruby(rubygems) from -docs subpackage - Moved NEWS, THANKS, NOTES and TODO to main package - dir ownership of geminstdir by main package - gemdir/doc not owned by docs subpackage * Tue Jun 1 2010 Shreyank Gupta - 1.0.0-2 - Removed ruby_sitelib macro - Requires ruby(abi) and BuildRequires ruby and rake - Added Subpackage -doc - Remove isntall.rb - Keeping zero-length file data.17 for rake test - rake test added * Mon May 31 2010 Shreyank Gupta - 1.0.0-1 - Initial package