You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-mime-types/rubygem-mime-types.spec

122 lines
3.3 KiB

# Generated from mime-types-1.16.gem by gem2rpm -*- rpm-spec -*-
%global gem_name mime-types
%global rubyabi 1.9.1
Summary: Return the MIME Content-Type for a given filename
Name: rubygem-%{gem_name}
Version: 1.16
Release: 8%{?dist}
Group: Development/Languages
License: GPL+ or Ruby or Artistic
URL: http://mime-types.rubyforge.org/
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
# Currently produces a "RCov is not available" warning and fails with newer rcov
# installed. Reported upstream via
# http://rubyforge.org/tracker/?func=detail&aid=27623&group_id=293&atid=1191
Patch0: mime-types-1.16-no_rcov.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(rubygems)
Requires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems-devel
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygem(minitest)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
%description
MIME::Types for Ruby manages a MIME Content-Type database that will return the
Content-Type for a given filename.
MIME::Types was originally based on and synchronized with MIME::Types for
Perl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the data
format for the MIME::Type list has changed and the synchronization will no
longer happen.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
gem install -V \
--local \
--install-dir $(pwd)/%{gem_dir} \
--force --rdoc \
%{SOURCE0}
pushd .%{gem_instdir}
%patch0 -p1
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
# These aren't executables
find %{buildroot}%{gem_instdir}/{Rakefile,test} -type f | \
xargs -n 1 sed -i -e '/^#! \/usr\/bin\/env .*/d'
%clean
rm -rf %{buildroot}
%check
pushd .%{gem_instdir}
testrb -Ilib test/*
popd
%files
%defattr(-,root,root,-)
%doc %{gem_instdir}/History.txt
%doc %{gem_instdir}/Install.txt
%doc %{gem_instdir}/Licence.txt
%doc %{gem_instdir}/README.txt
%dir %{gem_instdir}
%{gem_libdir}
%{gem_cache}
%{gem_spec}
%files doc
%defattr(-,root,root,-)
%{gem_instdir}/Rakefile
%{gem_instdir}/setup.rb
%{gem_instdir}/mime-types.gemspec
%{gem_instdir}/Manifest.txt
%{gem_instdir}/test
%{gem_docdir}
%changelog
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jan 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.16-7
- Rebuilt for Ruby 1.9.3.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Aug 08 2011 Mo Morsi <mmorsi@redhat.com> - 1.16-5
- Replace BR(check) with BR
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 30 2009 Matthew Kent <mkent@magoazul.com> - 1.16-3
- Remove needless rcov task in Rakefile causing issue (#544964).
* Sun Dec 27 2009 Matthew Kent <mkent@magoazul.com> - 1.16-2
- Fix license (#544964).
- Add note about rcov warning in test phase (#544964).
* Sun Dec 06 2009 Matthew Kent <mkent@magoazul.com> - 1.16-1
- Initial package