Blame SPECS/rubygem-mime-types.spec

26bd4b
%{?scl:%scl_package rubygem-%{gem_name}}
26bd4b
%{!?scl:%global pkg_name %{name}}
26bd4b
26bd4b
# Generated from mime-types-1.16.gem by gem2rpm -*- rpm-spec -*-
26bd4b
%global gem_name mime-types
26bd4b
26bd4b
Summary: The mime-types library provides a library
26bd4b
Name: %{?scl_prefix}rubygem-%{gem_name}
26bd4b
Version: 3.1
26bd4b
Release: 1%{?dist}
26bd4b
Group: Development/Languages
26bd4b
License: MIT
26bd4b
URL: https://github.com/mime-types/ruby-mime-types/
26bd4b
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
26bd4b
26bd4b
Requires:      %{?scl_prefix_ruby}ruby(release)
26bd4b
Requires:      %{?scl_prefix_ruby}ruby(rubygems)
26bd4b
Requires:      %{?scl_prefix}rubygem(mime-types-data) >= 3.2015
26bd4b
BuildRequires: %{?scl_prefix_ruby}ruby
26bd4b
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
26bd4b
BuildRequires: %{?scl_prefix_ruby}ruby(release)
26bd4b
BuildRequires: %{?scl_prefix_ruby}ruby(rubygems)
26bd4b
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
26bd4b
BuildRequires: %{?scl_prefix}rubygem(mime-types-data) >= 3.2015
26bd4b
BuildArch: noarch
26bd4b
Provides:      %{?scl_prefix}rubygem(%{gem_name}) = %{version}
26bd4b
26bd4b
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
26bd4b
%{?scl:Requires: %{?scl_prefix}runtime}
26bd4b
26bd4b
%description
26bd4b
The mime-types library provides a library and registry for information about
26bd4b
MIME content type definitions. It can be used to determine defined filename
26bd4b
extensions for MIME types, or to use filename extensions to look up the likely
26bd4b
MIME type definitions.
26bd4b
Version 3.0 is a major release that requires Ruby 2.0 compatibility and
26bd4b
removes
26bd4b
deprecated functions. The columnar registry format introduced in 2.6 has been
26bd4b
made the primary format; the registry data has been extracted from this
26bd4b
library
26bd4b
and put into {mime-types-data}[https://github.com/mime-types/mime-types-data].
26bd4b
Additionally, mime-types is now licensed exclusively under the MIT licence and
26bd4b
there is a code of conduct in effect. There are a number of other smaller
26bd4b
changes described in the History file.
26bd4b
26bd4b
%package doc
26bd4b
Summary: Documentation for %{pkg_name}
26bd4b
Group: Documentation
26bd4b
26bd4b
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
26bd4b
26bd4b
%description doc
26bd4b
This package contains documentation for %{pkg_name}.
26bd4b
26bd4b
%prep
26bd4b
%setup -n %{pkg_name}-%{version} -q -c -T
26bd4b
26bd4b
%{?scl:scl enable %{scl} - << \EOF}
26bd4b
%gem_install -n %{SOURCE0}
26bd4b
%{?scl:EOF}
26bd4b
26bd4b
%build
26bd4b
26bd4b
%install
26bd4b
rm -rf %{buildroot}
26bd4b
mkdir -p %{buildroot}%{gem_dir}
26bd4b
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
26bd4b
26bd4b
# These aren't executables
26bd4b
find %{buildroot}%{gem_instdir}/{Rakefile,test} -type f | \
26bd4b
  xargs -n 1 sed -i  -e '/^#! \/usr\/bin\/env .*/d'
26bd4b
26bd4b
%check
26bd4b
pushd .%{gem_instdir}
26bd4b
26bd4b
# We don't have these rubygem packages in Fedora yet.
26bd4b
sed -i '7,11s/^/#/' test/minitest_helper.rb
26bd4b
26bd4b
# Add assert_has_keys manually not to load minitest-bonus-assertions.
26bd4b
# https://github.com/halostatue/minitest-bonus-assertions/blob/v2.0/lib/minitest-bonus-assertions.rb#L53-57
26bd4b
cat << EOF >> test/minitest_helper.rb
26bd4b
26bd4b
def assert_has_keys obj, keys, msg = nil
26bd4b
  keys = [ keys ] unless keys.kind_of?(Array)
26bd4b
  keys.all? { |key| assert obj.key?(key) }
26bd4b
end
26bd4b
EOF
26bd4b
26bd4b
# We don't have minitest-hooks in Fedora yet.
26bd4b
mv test/test_mime_types_cache.rb{,.disable}
26bd4b
26bd4b
%{?scl:scl enable %{scl} - << \EOF}
26bd4b
ruby -Ilib:test -rminitest/autorun -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
26bd4b
%{?scl:EOF}
26bd4b
26bd4b
popd
26bd4b
26bd4b
%files
26bd4b
# There is no %%license macro on RHEL6.
26bd4b
# https://bugzilla.redhat.com/show_bug.cgi?id=1386246
26bd4b
%{!?_licensedir:%global license %%doc}
26bd4b
26bd4b
%license %{gem_instdir}/Licence.rdoc
26bd4b
%dir %{gem_instdir}
26bd4b
%exclude %{gem_instdir}/.*
26bd4b
%{gem_libdir}
26bd4b
%exclude %{gem_cache}
26bd4b
%{gem_spec}
26bd4b
26bd4b
%files doc
26bd4b
%doc %{gem_instdir}/Code-of-Conduct.rdoc
26bd4b
%doc %{gem_instdir}/Contributing.rdoc
26bd4b
%doc %{gem_instdir}/History.rdoc
26bd4b
%doc %{gem_instdir}/README.rdoc
26bd4b
%{gem_instdir}/Rakefile
26bd4b
%{gem_instdir}/Manifest.txt
26bd4b
%{gem_instdir}/test
26bd4b
%doc %{gem_docdir}
26bd4b
26bd4b
%changelog
26bd4b
* Mon Oct 17 2016 Jun Aruga <jaruga@redhat.com> - 3.1-1
26bd4b
- Update to mime-types 3.1.
26bd4b
26bd4b
* Thu Feb 25 2016 Pavel Valena <pvalena@redhat.com> - 1.25.1-4
26bd4b
- Rebuilt for rh-ror42
26bd4b
26bd4b
* Fri Jan 16 2015 Josef Stribny <jstribny@redhat.com> - 1.25.1-1
26bd4b
- Update to 1.25.1
26bd4b
26bd4b
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 1.19-4
26bd4b
- Rebuid against new scl-utils to depend on -runtime package.
26bd4b
  Resolves: rhbz#1069109
26bd4b
26bd4b
* Thu Jan 23 2014 Vít Ondruch <vondruch@redhat.com> - 1.19-3
26bd4b
- Fix ruby prefix macro.
26bd4b
26bd4b
* Thu Jun 20 2013 Josef Stribny <jstribny@redhat.com> - 1.19-2
26bd4b
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
26bd4b
26bd4b
* Thu Jul 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.19-1
26bd4b
- Update to Mime-Types 1.19.
26bd4b
- Specfile cleanup
26bd4b
26bd4b
* Tue Apr 03 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.18-1
26bd4b
- Rebuilt for scl.
26bd4b
- Updated to 1.18.
26bd4b
26bd4b
* Tue Jan 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.16-7
26bd4b
- Rebuilt for Ruby 1.9.3.
26bd4b
26bd4b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-6
26bd4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
26bd4b
26bd4b
* Mon Aug 08 2011 Mo Morsi <mmorsi@redhat.com> - 1.16-5
26bd4b
- Replace BR(check) with BR
26bd4b
26bd4b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
26bd4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
26bd4b
26bd4b
* Wed Dec 30 2009 Matthew Kent <mkent@magoazul.com> - 1.16-3
26bd4b
- Remove needless rcov task in Rakefile causing issue (#544964).
26bd4b
26bd4b
* Sun Dec 27 2009 Matthew Kent <mkent@magoazul.com> - 1.16-2
26bd4b
- Fix license (#544964).
26bd4b
- Add note about rcov warning in test phase (#544964).
26bd4b
26bd4b
* Sun Dec 06 2009 Matthew Kent <mkent@magoazul.com> - 1.16-1
26bd4b
- Initial package