view rubygem-ruby-feedparser.spec @ 2:1994a0a86f86

Update to version 0.9.3
author Guido Berhoerster <guido+packaging@berhoerster.name>
date Mon, 28 Apr 2014 17:33:20 +0200
parents 96f724280bbf
children 299cdbca3f7a
line wrap: on
line source

%global gemname ruby-feedparser

%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:        0.9.3
Release:        1%{?dist}
Summary:        Ruby Library to Parse ATOM and RSS Feeds

Group:          Development/Languages
License:        BSD
URL:            http://rubygems.org/gems/ruby-feedparser
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)
Requires:       rubygem(magic)
Provides:       rubygem(%{gemname}) = %{version}

%description
ruby-feedparser is an RSS and Atom parser for Ruby. It was initially developed
for Feed2Imap, but it is now a standalone library.

ruby-feedparser is:

* based on REXML
* built for robustness : most feeds are not valid, a parser can't ignore that
* fully unit-tested
* easy to use (it can output text or HTML easily)

%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}
find %{buildroot}%{geminstdir} %{buildroot}%{gemdocdir} \
    -type f -exec chmod 644 {} \+
find %{buildroot}%{geminstdir}/test %{buildroot}%{geminstdir}/tools \
    %{buildroot}%{geminstdir}/setup.rb -type f -exec chmod 755 {} \+

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root, -)
%dir %{geminstdir}
%doc %{geminstdir}/LICENSE
%doc %{geminstdir}/COPYING
%{geminstdir}/Rakefile
%{geminstdir}/setup.rb
%{geminstdir}/lib
%{geminstdir}/test
%{geminstdir}/tools
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec

%files doc
%defattr(-,root,root,-)
%doc %{gemdocdir}
%doc %{geminstdir}/ChangeLog
%doc %{geminstdir}/README

%changelog
* Mon Apr 28 2014 Guido Berhoerster <guido+packaging@berhoerster.name> - 0.9.3-1
- Update to version 0.9.3

* Wed Jan 09 2013 Guido Berhoerster <guido+packaging@berhoerster.name> - 0.7-1
- Initial packaging