diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2016-01-08 10:14:48 -0700 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2016-01-08 10:14:48 -0700 |
commit | 216d6728c2d237cd5c70912522ea2ee8a41fc20b (patch) | |
tree | 7c7a22fc2a31b579dd1cd11f328ac6dd6cbfb97b | |
download | rubygem-mimemagic-216d6728c2d237cd5c70912522ea2ee8a41fc20b.tar.gz rubygem-mimemagic-216d6728c2d237cd5c70912522ea2ee8a41fc20b.tar.xz rubygem-mimemagic-216d6728c2d237cd5c70912522ea2ee8a41fc20b.zip |
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rubygem-mimemagic.spec | 72 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 74 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6ec6f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mimemagic-0.3.1.gem diff --git a/rubygem-mimemagic.spec b/rubygem-mimemagic.spec new file mode 100644 index 0000000..c9ae88a --- /dev/null +++ b/rubygem-mimemagic.spec @@ -0,0 +1,72 @@ +%global gem_name mimemagic + +Name: rubygem-%{gem_name} +Version: 0.3.1 +Release: 1%{?dist} +Summary: Fast mime detection by extension or content +Group: Development/Languages +License: MIT +URL: https://github.com/minad/mimemagic +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: rubygem(bacon) +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} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +for f in .gitignore .travis.yml .yardopts Gemfile Rakefile script/*; do + rm $f + sed -i "s|\"$f\",||g" %{gem_name}.gemspec +done + +%build +gem build %{gem_name}.gemspec +%gem_install +# remove unnecessary gemspec +rm .%{gem_instdir}/%{gem_name}.gemspec + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} + ruby -Ilib test/*_test.rb +popd + +%files +%dir %{gem_instdir} +%license %{gem_instdir}/LICENSE +%doc %{gem_instdir}/README.md +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} +%exclude %{gem_instdir}/test + +%files doc +%doc %{gem_docdir} + +%changelog +* Fri Jan 08 2016 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.1-1 +- Initial package @@ -0,0 +1 @@ +5f8234dafea4fde5fabd69cefb8dff3e mimemagic-0.3.1.gem |