comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:cedb2740aee1
1 %global gemname magic
2
3 %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
4 %global geminstdir %{gemdir}/gems/%{gemname}-%{version}
5 %global gemdocdir %{gemdir}/doc/%{gemname}-%{version}
6 %global rubyabi 1.8
7
8 Name: rubygem-%{gemname}
9 Version: 0.2.8
10 Release: 1%{?dist}
11 Summary: Ruby FFI bindings to libmagic
12
13 Group: Development/Languages
14 License: MIT
15 URL: http://rubygems.org/gems/magic
16 Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 BuildArch: noarch
19
20 BuildRequires: ruby(abi) = 1.8
21 BuildRequires: ruby
22 BuildRequires: ruby(rubygems)
23 Requires: ruby(abi) = 1.8
24 Requires: ruby
25 Requires: ruby(rubygems)
26 Requires: rubygem(ffi) >= 0.6.3
27 Requires: file-libs
28 Provides: rubygem(%{gemname}) = %{version}
29
30 %description
31 Ruby FFI wrapper to the "magic" library, that determines content type and
32 encoding of files and strings. The library does three types of tests:
33 filesystem tests, magic number tests, and language tests. The first test that
34 succeeds causes the file type to be returned.
35
36 %package doc
37 Summary: Documentation for %{name}
38 Group: Documentation
39 Requires: %{name} = %{version}-%{release}
40 BuildArch: noarch
41
42 %description doc
43 Documentation for %{name}.
44
45 %prep
46 %setup -q -c -T
47
48 %build
49
50 %install
51 rm -rf %{buildroot}
52 mkdir -p %{buildroot}%{gemdir}
53 gem install --local --install-dir %{buildroot}%{gemdir} \
54 --force %{SOURCE0}
55
56 %clean
57 rm -rf %{buildroot}
58
59 %files
60 %defattr(-, root, root, -)
61 %dir %{geminstdir}
62 %doc %{geminstdir}/LICENSE.txt
63 %{geminstdir}/.gitignore
64 %{geminstdir}/Gemfile
65 %{geminstdir}/Rakefile
66 %{geminstdir}/lib
67 %{geminstdir}/magic.gemspec
68 %{geminstdir}/test
69 %{gemdir}/cache/%{gemname}-%{version}.gem
70 %{gemdir}/specifications/%{gemname}-%{version}.gemspec
71
72 %files doc
73 %defattr(-,root,root,-)
74 %doc %{gemdocdir}
75 %doc %{geminstdir}/README.rdoc
76
77 %changelog
78 * Mon Apr 28 2014 Guido Berhoerster <guido+packaging@berhoerster.name> - 0.2.8-1
79 - Initial packaging