# HG changeset patch # User Guido Berhoerster # Date 1398699136 -7200 # Node ID cedb2740aee1029e5a7246f119dc7fbceb545506 Initial revision diff -r 000000000000 -r cedb2740aee1 rubygem-magic.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rubygem-magic.spec Mon Apr 28 17:32:16 2014 +0200 @@ -0,0 +1,79 @@ +%global gemname magic + +%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%global geminstdir %{gemdir}/gems/%{gemname}-%{version} +%global gemdocdir %{gemdir}/doc/%{gemname}-%{version} +%global rubyabi 1.8 + +Name: rubygem-%{gemname} +Version: 0.2.8 +Release: 1%{?dist} +Summary: Ruby FFI bindings to libmagic + +Group: Development/Languages +License: MIT +URL: http://rubygems.org/gems/magic +Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: ruby(abi) = 1.8 +BuildRequires: ruby +BuildRequires: ruby(rubygems) +Requires: ruby(abi) = 1.8 +Requires: ruby +Requires: ruby(rubygems) +Requires: rubygem(ffi) >= 0.6.3 +Requires: file-libs +Provides: rubygem(%{gemname}) = %{version} + +%description +Ruby FFI wrapper to the "magic" library, that determines content type and +encoding of files and strings. The library does three types of tests: +filesystem tests, magic number tests, and language tests. The first test that +succeeds causes the file type to be returned. + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +%setup -q -c -T + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{gemdir} +gem install --local --install-dir %{buildroot}%{gemdir} \ + --force %{SOURCE0} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%dir %{geminstdir} +%doc %{geminstdir}/LICENSE.txt +%{geminstdir}/.gitignore +%{geminstdir}/Gemfile +%{geminstdir}/Rakefile +%{geminstdir}/lib +%{geminstdir}/magic.gemspec +%{geminstdir}/test +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec + +%files doc +%defattr(-,root,root,-) +%doc %{gemdocdir} +%doc %{geminstdir}/README.rdoc + +%changelog +* Mon Apr 28 2014 Guido Berhoerster - 0.2.8-1 +- Initial packaging diff -r 000000000000 -r cedb2740aee1 sources --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources Mon Apr 28 17:32:16 2014 +0200 @@ -0,0 +1,1 @@ +fa833273c17d801d374411c931d1a35e magic-0.2.8.gem