Mercurial > packages > rhel6 > rubygem-rmail
comparison rubygem-rmail.spec @ 0:6a2bbb1f9321
Initial revision
author | Guido Berhoerster <guido+packaging@berhoerster.name> |
---|---|
date | Wed, 09 Jan 2013 17:31:55 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6a2bbb1f9321 |
---|---|
1 %global gemname rmail | |
2 | |
3 %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) | |
4 %global geminstdir %{gemdir}/gems/%{gemname}-%{version} | |
5 %global gemdocdir %{gemdir}/doc/%{gemname}-%{version} | |
6 %global rubyabi 1.8 | |
7 | |
8 Name: rubygem-%{gemname} | |
9 Version: 1.0.0 | |
10 Release: 1%{?dist} | |
11 Summary: Lightweight Ruby Mail Library | |
12 | |
13 Group: Development/Languages | |
14 License: BSD | |
15 URL: http://rubygems.org/gems/rmail | |
16 Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem | |
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
18 BuildArch: noarch | |
19 | |
20 BuildRequires: ruby(abi) = 1.8 | |
21 BuildRequires: ruby | |
22 BuildRequires: ruby(rubygems) | |
23 Requires: ruby(abi) = 1.8 | |
24 Requires: ruby | |
25 Requires: ruby(rubygems) | |
26 Provides: rubygem(%{gemname}) = %{version} | |
27 | |
28 %description | |
29 RMail is a lightweight mail library containing various utility classes and | |
30 modules that allow ruby scripts to parse, modify, and generate MIME mail | |
31 messages. | |
32 | |
33 %package doc | |
34 Summary: Documentation for %{name} | |
35 Group: Documentation | |
36 Requires: %{name} = %{version}-%{release} | |
37 BuildArch: noarch | |
38 | |
39 %description doc | |
40 Documentation for %{name}. | |
41 | |
42 %prep | |
43 %setup -q -c -T | |
44 | |
45 %build | |
46 | |
47 %install | |
48 rm -rf %{buildroot} | |
49 mkdir -p %{buildroot}%{gemdir} | |
50 gem install --local --install-dir %{buildroot}%{gemdir} \ | |
51 --force %{SOURCE0} | |
52 for f in %{buildroot}%{geminstdir}/test/*.rb; do | |
53 sed -i 's|^#!/usr/bin/env ruby|#!/usr/bin/ruby|' "$f" | |
54 chmod 755 "$f" | |
55 done | |
56 sed -i '/^#!\/usr\/bin\/env /d' %{buildroot}%{geminstdir}/lib/rmail.rb \ | |
57 %{buildroot}%{geminstdir}/lib/rmail/mailbox.rb | |
58 | |
59 %clean | |
60 rm -rf %{buildroot} | |
61 | |
62 %files | |
63 %defattr(-, root, root, -) | |
64 %dir %{geminstdir} | |
65 %doc %{geminstdir}/README | |
66 %{geminstdir}/Rakefile | |
67 %{geminstdir}/install.rb | |
68 %{geminstdir}/version | |
69 %{geminstdir}/lib | |
70 %{geminstdir}/test | |
71 %{gemdir}/cache/%{gemname}-%{version}.gem | |
72 %{gemdir}/specifications/%{gemname}-%{version}.gemspec | |
73 | |
74 %files doc | |
75 %defattr(-,root,root,-) | |
76 %doc %{gemdocdir} | |
77 %doc %{geminstdir}/NEWS | |
78 %doc %{geminstdir}/NOTES | |
79 %doc %{geminstdir}/THANKS | |
80 %doc %{geminstdir}/TODO | |
81 %dir %{geminstdir}/guide | |
82 %doc %{geminstdir}/guide/Intro.txt | |
83 %doc %{geminstdir}/guide/MIME.txt | |
84 %doc %{geminstdir}/guide/TableOfContents.txt | |
85 | |
86 %changelog | |
87 * Wed Jan 09 2013 Guido Berhoerster <guido+packaging@berhoerster.name> - 1.0.0-1 | |
88 - Initial packaging |