2020-08-25 11:01:38 +08:00
|
|
|
%global gem_name mimemagic
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2022-07-01 16:50:27 +08:00
|
|
|
Version: 0.4.3
|
2020-08-25 11:01:38 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: Fast mime detection by extension or content
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/minad/mimemagic
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
|
2022-07-01 16:50:27 +08:00
|
|
|
BuildRequires: rubygem-rake shared-mime-info
|
2020-08-25 11:01:38 +08:00
|
|
|
BuildArch: noarch
|
2022-07-01 16:50:27 +08:00
|
|
|
|
2020-08-25 11:01:38 +08:00
|
|
|
%description
|
|
|
|
|
Fast mime detection by extension or content in pure ruby (Uses
|
|
|
|
|
freedesktop.org.xml shared-mime-info database).
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%exclude %{gem_instdir}/.*
|
|
|
|
|
%license %{gem_instdir}/LICENSE
|
2022-07-01 16:50:27 +08:00
|
|
|
%{gem_instdir}/CHANGELOG.md
|
2020-08-25 11:01:38 +08:00
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%{gem_instdir}/Gemfile
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
2022-07-01 16:50:27 +08:00
|
|
|
%{gem_instdir}/ext/mimemagic/Rakefile
|
2020-08-25 11:01:38 +08:00
|
|
|
%{gem_instdir}/mimemagic.gemspec
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-07-01 16:50:27 +08:00
|
|
|
* Fri Jul 01 2022 xu_ping <xuping33@h-partners.com> - 0.4.3-1
|
|
|
|
|
- Upgrade 0.4.3
|
|
|
|
|
|
2020-08-25 11:01:38 +08:00
|
|
|
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 0.3.2-1
|
|
|
|
|
- package init
|