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