]>
Commit | Line | Data |
---|---|---|
f0d3c1e6 | 1 | Summary: Generate rpm specfiles from gems |
e8e50a98 | 2 | Name: gem2rpm |
a0c08b44 ER |
3 | Version: 0.9.2 |
4 | Release: 0.8 | |
f0d3c1e6 ER |
5 | License: GPL v2+ |
6 | Group: Development/Languages | |
e8e50a98 | 7 | Source0: http://rubygems.org/gems/%{name}-%{version}.gem |
a0c08b44 | 8 | # Source0-md5: 6988e28332369a79067d45b8c61f2851 |
f0d3c1e6 ER |
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/ | |
a0c08b44 | 11 | Source1: %{name}-0.8.1-tests.tgz |
f0d3c1e6 | 12 | # Source1-md5: d7d8bc231dc405bbce00f570c89f530e |
7d625e4e | 13 | Source2: pld.spec.erb |
f51775da | 14 | Patch0: gems.patch |
7d625e4e | 15 | Patch1: pld.patch |
bf1dd385 | 16 | Patch2: style.patch |
e8e50a98 ER |
17 | URL: https://github.com/lutter/gem2rpm/ |
18 | BuildRequires: rpm-rubyprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.656 | |
f0d3c1e6 ER |
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 | |
e8e50a98 | 38 | %setup -q |
f51775da | 39 | %patch0 -p1 |
7d625e4e | 40 | %patch1 -p1 |
bf1dd385 | 41 | %patch2 -p1 |
7d625e4e | 42 | cp -p %{SOURCE2} templates |
f0d3c1e6 | 43 | |
b978c369 ER |
44 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
45 | ||
f0d3c1e6 ER |
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 | ||
c2e552c8 ER |
58 | install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates |
59 | cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates | |
60 | ||
f0d3c1e6 ER |
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 | |
c2e552c8 | 70 | %{_datadir}/ruby/templates |
f0d3c1e6 ER |
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 |