]>
Commit | Line | Data |
---|---|---|
f0d3c1e6 | 1 | Summary: Generate rpm specfiles from gems |
e8e50a98 | 2 | Name: gem2rpm |
f0d3c1e6 | 3 | Version: 0.8.1 |
e8e50a98 | 4 | Release: 0.1 |
f0d3c1e6 ER |
5 | License: GPL v2+ |
6 | Group: Development/Languages | |
e8e50a98 | 7 | Source0: http://rubygems.org/gems/%{name}-%{version}.gem |
f0d3c1e6 ER |
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/ | |
e8e50a98 | 11 | Source1: %{name}-%{version}-tests.tgz |
f0d3c1e6 | 12 | # Source1-md5: d7d8bc231dc405bbce00f570c89f530e |
e8e50a98 ER |
13 | URL: https://github.com/lutter/gem2rpm/ |
14 | BuildRequires: rpm-rubyprov | |
15 | BuildRequires: rpmbuild(macros) >= 1.656 | |
f0d3c1e6 ER |
16 | Requires: ruby |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Generate source rpms and rpm spec files from a Ruby Gem. The spec file | |
22 | tries to follow the gem as closely as possible, and be compliant with | |
23 | the Fedora rubygem packaging guidelines | |
24 | ||
25 | %package doc | |
26 | Summary: Documentation for %{name} | |
27 | Group: Documentation | |
28 | Requires: %{name} = %{version}-%{release} | |
29 | ||
30 | %description doc | |
31 | Documentation for %{name}. | |
32 | ||
33 | %prep | |
e8e50a98 | 34 | %setup -q |
f0d3c1e6 ER |
35 | |
36 | %build | |
37 | %if %{with tests} | |
38 | testrb -Itest test/ | |
39 | %endif | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}} | |
44 | ||
45 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
46 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
47 | ||
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
53 | %doc README AUTHORS | |
54 | %attr(755,root,root) %{_bindir}/gem2rpm | |
55 | %{ruby_rubylibdir}/gem2rpm.rb | |
56 | %{ruby_rubylibdir}/gem2rpm | |
57 | ||
58 | %if 0 | |
59 | %files doc | |
60 | %defattr(644,root,root,755) | |
61 | %doc %{gem_docdir} | |
62 | %doc %{gem_instdir}/README | |
63 | %doc %{gem_instdir}/AUTHORS | |
64 | %endif |