diff rubygem-magic.spec @ 0:cedb2740aee1 default tip

Initial revision
author Guido Berhoerster <guido+packaging@berhoerster.name>
date Mon, 28 Apr 2014 17:32:16 +0200
parents
children
line wrap: on
line diff
--- /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 <guido+packaging@berhoerster.name> - 0.2.8-1
+- Initial packaging