changeset 0:6a2bbb1f9321

Initial revision
author Guido Berhoerster <guido+packaging@berhoerster.name>
date Wed, 09 Jan 2013 17:31:55 +0100
parents
children 27b75293a94b
files rubygem-rmail.spec sources
diffstat 2 files changed, 89 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rubygem-rmail.spec	Wed Jan 09 17:31:55 2013 +0100
@@ -0,0 +1,88 @@
+%global gemname rmail
+
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global gemdocdir %{gemdir}/doc/%{gemname}-%{version}
+%global rubyabi 1.8
+
+Name:           rubygem-%{gemname}
+Version:        1.0.0
+Release:        1%{?dist}
+Summary:        Lightweight Ruby Mail Library
+
+Group:          Development/Languages
+License:        BSD
+URL:            http://rubygems.org/gems/rmail
+Source0:        http://rubygems.org/downloads/%{gemname}-%{version}.gem
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  ruby(abi) = 1.8
+BuildRequires:  ruby
+BuildRequires:  ruby(rubygems)
+Requires:       ruby(abi) = 1.8
+Requires:       ruby
+Requires:       ruby(rubygems)
+Provides:       rubygem(%{gemname}) = %{version}
+
+%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.
+
+%package doc
+Summary:        Documentation for %{name}
+Group:          Documentation
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+%description doc
+Documentation for %{name}.
+
+%prep
+%setup -q -c -T
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+gem install --local --install-dir %{buildroot}%{gemdir} \
+    --force %{SOURCE0}
+for f in %{buildroot}%{geminstdir}/test/*.rb; do
+    sed -i 's|^#!/usr/bin/env ruby|#!/usr/bin/ruby|' "$f"
+    chmod 755 "$f"
+done
+sed -i '/^#!\/usr\/bin\/env /d' %{buildroot}%{geminstdir}/lib/rmail.rb \
+    %{buildroot}%{geminstdir}/lib/rmail/mailbox.rb
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%dir %{geminstdir}
+%doc %{geminstdir}/README
+%{geminstdir}/Rakefile
+%{geminstdir}/install.rb
+%{geminstdir}/version
+%{geminstdir}/lib
+%{geminstdir}/test
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+%files doc
+%defattr(-,root,root,-)
+%doc %{gemdocdir}
+%doc %{geminstdir}/NEWS
+%doc %{geminstdir}/NOTES
+%doc %{geminstdir}/THANKS
+%doc %{geminstdir}/TODO
+%dir %{geminstdir}/guide
+%doc %{geminstdir}/guide/Intro.txt
+%doc %{geminstdir}/guide/MIME.txt
+%doc %{geminstdir}/guide/TableOfContents.txt
+
+%changelog
+* Wed Jan 09 2013 Guido Berhoerster <guido+packaging@berhoerster.name> - 1.0.0-1
+- Initial packaging
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources	Wed Jan 09 17:31:55 2013 +0100
@@ -0,0 +1,1 @@
+c94a6595a71aec61da5723699caea38c rmail-1.0.0.gem