1 Summary: Generate rpm specfiles from gems
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
17 URL: https://github.com/lutter/gem2rpm/
18 BuildRequires: rpm-rubyprov
19 BuildRequires: rpmbuild(macros) >= 1.656
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
30 Summary: Documentation for %{name}
32 Requires: %{name} = %{version}-%{release}
35 Documentation for %{name}.
42 cp -p %{SOURCE2} templates
44 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}}
55 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
56 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
58 install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
59 cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %attr(755,root,root) %{_bindir}/gem2rpm
68 %{ruby_rubylibdir}/gem2rpm.rb
69 %{ruby_rubylibdir}/gem2rpm
70 %{_datadir}/ruby/templates
74 %defattr(644,root,root,755)
76 %doc %{gem_instdir}/README
77 %doc %{gem_instdir}/AUTHORS