Blob Blame History Raw
# Generated from icalendar-1.1.0.gem by gem2rpm -*- rpm-spec -*-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname icalendar
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global rubyabi 1.8

Summary: A ruby implementation of the iCalendar specification (RFC-2445)
Name: rubygem-%{gemname}
Version: 1.1.5
Release: 2%{?dist}
Group: Development/Languages
License: GPL+ or Ruby
URL: http://icalendar.rubyforge.org/
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
# Patch also sent upstream by email 27-Jan-2009
Patch0: rubygem-icalendar-manage_gem.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
BuildRequires: dos2unix
BuildRequires: rubygems
BuildRequires: rubygem(rake)
BuildRequires: rubygem(hoe)
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}

%description
Implements the iCalendar specification (RFC-2445) in Ruby.  This allows for
the generation and parsing of .ics files, which are used by a variety of
calendaring applications.


%prep

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
gem install --local --install-dir %{buildroot}%{gemdir} \
            --force --rdoc %{SOURCE0}

# Website - hasn't actually been written
rm -rf %{buildroot}%{geminstdir}/website
rm -rf %{buildroot}%{geminstdir}/config
# Backup file
rm -rf %{buildroot}%{geminstdir}/lib/icalendar/conversions.rb.orig

# EOL encodings
pushd %{buildroot}%{geminstdir}
for file in Rakefile test.ical test.ics
do
	dos2unix -k $file
done
popd

# Tidy up the file permissions
chmod 0755 %{buildroot}%{geminstdir}/test.rb
chmod 0755 %{buildroot}%{geminstdir}/test2.rb
# The tests are run from the Rakefile
find %{buildroot}%{geminstdir}/test \
    -type f -name '*.rb' | xargs chmod 0644
find %{buildroot}%{geminstdir}/test \
     -type f -name '*.rb' | \
       xargs -n 1 sed -i -e '/^#!\/usr\/.*ruby.*/d'
# ... and the examples are valid scripts ...    
find %{buildroot}%{geminstdir}/examples \
    -type f -name '*.rb' | xargs chmod 0755
# ... and it's perfectly acceptable for users have read access to the
# source gem
chmod 644 %{buildroot}%{gemdir}/cache/%{gemname}-%{version}.gem

pushd %{buildroot}%{geminstdir}
patch -p1 < %{PATCH0}
rm -rf %{buildroot}%{geminstdir}/Rakefile.orig
popd

%clean
rm -rf %{buildroot}

%check
pushd %{buildroot}%{geminstdir}
rake test
popd

%files
%defattr(-, root, root, -)
%dir %{geminstdir}
%{geminstdir}/lib
%{geminstdir}/examples
%{geminstdir}/test
%{geminstdir}/script
%doc %{gemdir}/doc/%{gemname}-%{version}
%doc %{geminstdir}/README.rdoc
%doc %{geminstdir}/History.txt
%doc %{geminstdir}/Manifest.txt
%doc %{geminstdir}/PostInstall.txt
%doc %{geminstdir}/COPYING
%doc %{geminstdir}/GPL
%doc %{geminstdir}/icalendar.gemspec
%doc %{geminstdir}/Rakefile
%{geminstdir}/test.ical
%{geminstdir}/test.ics
%{geminstdir}/test.rb
%{geminstdir}/test2.rb

%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec


%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Sep 07 2010 Mark Chappell <tremble@fedoraproject.org> - 1.1.5-1
- Update to latest version
- Add BuildRequires rubygem(hoe)
- Update Rakefile patch
- Fix EOL encoding issues

* Wed Feb 03 2010 M D Chappell <tremble@fedoraproject.org> - 1.1.0-4
- Version bump to force rebuild

* Mon Feb 01 2010 M D Chappell <tremble@fedoraproject.org> - 1.1.0-3
- Requires rubygem(rake) rather that rubygem-rake

* Wed Jan 27 2010 M D Chappell <tremble@fedoraproject.org> - 1.1.0-2
- Various Formatting changes
- Run tests
- Fix Rakefile for recent verions of gem
- Correction of SRPM permissions

* Tue Jan 26 2010 M Chappell <tremble@fedoraproject.org> - 1.1.0-1
- Initial package