]> git.pld-linux.org Git - packages/gem2rpm.git/blob - gem2rpm.spec
use '>=' not '=>' in specs
[packages/gem2rpm.git] / gem2rpm.spec
1 Summary:        Generate rpm specfiles from gems
2 Name:           gem2rpm
3 Version:        0.8.1
4 Release:        0.7
5 License:        GPL v2+
6 Group:          Development/Languages
7 Source0:        http://rubygems.org/gems/%{name}-%{version}.gem
8 # Source0-md5:  d3c9416f225ae944fd195e69e122d46e
9 # git clone https://github.com/lutter/gem2rpm.git && cd gem2rpm && git checkout v0.8.1
10 # tar czvf gem2rpm-0.8.1-tests.tgz test/
11 Source1:        %{name}-%{version}-tests.tgz
12 # Source1-md5:  d7d8bc231dc405bbce00f570c89f530e
13 Source2:        pld.spec.erb
14 Patch0:         gems.patch
15 Patch1:         pld.patch
16 Patch2:         style.patch
17 URL:            https://github.com/lutter/gem2rpm/
18 BuildRequires:  rpm-rubyprov
19 BuildRequires:  rpmbuild(macros) >= 1.656
20 Requires:       ruby
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Generate source rpms and rpm spec files from a Ruby Gem. The spec file
26 tries to follow the gem as closely as possible, and be compliant with
27 the Fedora rubygem packaging guidelines
28
29 %package doc
30 Summary:        Documentation for %{name}
31 Group:          Documentation
32 Requires:       %{name} = %{version}-%{release}
33
34 %description doc
35 Documentation for %{name}.
36
37 %prep
38 %setup -q
39 %patch0 -p1
40 %patch1 -p1
41 %patch2 -p1
42 cp -p %{SOURCE2} templates
43
44 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
45
46 %build
47 %if %{with tests}
48 testrb -Itest test/
49 %endif
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}}
54
55 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
56 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
57
58 install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
59 cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc README AUTHORS
67 %attr(755,root,root) %{_bindir}/gem2rpm
68 %{ruby_rubylibdir}/gem2rpm.rb
69 %{ruby_rubylibdir}/gem2rpm
70 %{_datadir}/ruby/templates
71
72 %if 0
73 %files doc
74 %defattr(644,root,root,755)
75 %doc %{gem_docdir}
76 %doc %{gem_instdir}/README
77 %doc %{gem_instdir}/AUTHORS
78 %endif
This page took 0.058183 seconds and 3 git commands to generate.