1 Star 0 Fork 4

GYN / rubygem-mimemagic

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rubygem-mimemagic.spec 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
GYN 提交于 2020-08-25 11:01 . change spec
%global gem_name mimemagic
Name: rubygem-%{gem_name}
Version: 0.3.2
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
Patch0: rubygem-mimemagic-0.3.2-use-minitest.patch
Patch1: rubygem-mimemagic-0.3.2-use-minitest-test.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
BuildArch: noarch
%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}
%patch0 -p1
%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}
cat "%{PATCH1}" | patch -p1
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%{gem_instdir}/script
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/mimemagic.gemspec
%{gem_instdir}/test
%changelog
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 0.3.2-1
- package init
1
https://gitee.com/gyn_emma/rubygem-mimemagic.git
git@gitee.com:gyn_emma/rubygem-mimemagic.git
gyn_emma
rubygem-mimemagic
rubygem-mimemagic
master

搜索帮助