packages/rhel6/rubygem-ruby-feedparser

view rubygem-ruby-feedparser.spec @ 0:96f724280bbf

Initial revision
author Guido Berhoerster <guido+packaging@berhoerster.name>
date Wed Jan 09 17:33:26 2013 +0100 (2013-01-09)
parents
children 1994a0a86f86
line source
1 %global gemname ruby-feedparser
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
8 Name: rubygem-%{gemname}
9 Version: 0.7
10 Release: 1%{?dist}
11 Summary: Ruby Library to Parse ATOM and RSS Feeds
13 Group: Development/Languages
14 License: BSD
15 URL: http://rubygems.org/gems/ruby-feedparser
16 Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 BuildArch: noarch
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}
28 %description
29 ruby-feedparser is an RSS and Atom parser for Ruby. It was initially developed
30 for Feed2Imap, but it is now a standalone library.
32 ruby-feedparser is:
34 * based on REXML
35 * built for robustness : most feeds are not valid, a parser can't ignore that
36 * fully unit-tested
37 * easy to use (it can output text or HTML easily)
39 %package doc
40 Summary: Documentation for %{name}
41 Group: Documentation
42 Requires: %{name} = %{version}-%{release}
43 BuildArch: noarch
45 %description doc
46 Documentation for %{name}.
48 %prep
49 %setup -q -c -T
51 %build
53 %install
54 rm -rf %{buildroot}
55 mkdir -p %{buildroot}%{gemdir}
56 gem install --local --install-dir %{buildroot}%{gemdir} \
57 --force %{SOURCE0}
58 find %{buildroot}%{geminstdir} %{buildroot}%{gemdocdir} \
59 -type f -exec chmod 644 {} \+
60 find %{buildroot}%{geminstdir}/test %{buildroot}%{geminstdir}/tools \
61 %{buildroot}%{geminstdir}/setup.rb -type f -exec chmod 755 {} \+
63 %clean
64 rm -rf %{buildroot}
66 %files
67 %defattr(-, root, root, -)
68 %dir %{geminstdir}
69 %doc %{geminstdir}/LICENSE
70 %doc %{geminstdir}/COPYING
71 %{geminstdir}/Rakefile
72 %{geminstdir}/setup.rb
73 %{geminstdir}/lib
74 %{geminstdir}/test
75 %{geminstdir}/tools
76 %{gemdir}/cache/%{gemname}-%{version}.gem
77 %{gemdir}/specifications/%{gemname}-%{version}.gemspec
79 %files doc
80 %defattr(-,root,root,-)
81 %doc %{gemdocdir}
82 %doc %{geminstdir}/ChangeLog
83 %doc %{geminstdir}/README
85 %changelog
86 * Wed Jan 09 2013 Guido Berhoerster <guido+packaging@berhoerster.name> - 0.7-1
87 - Initial packaging