1 %define pkgname <%= spec.name %>
2 Summary: <%= spec.summary %>
4 Version: <%= spec.version %>
7 Group: Development/Languages
8 Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
10 URL: <%= spec.homepage %>
11 BuildRequires: rpm-rubyprov
12 BuildRequires: rpmbuild(macros) >= 1.656
13 <% if ! spec.executables.empty? -%>
14 BuildRequires: sed >= 4.0
16 <% for d in spec.dependencies -%>
17 <% for req in d.requirement -%>
18 Requires: ruby-<%= d.name %> <%= req %>
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 <%= spec.description %>
28 %setup -q -n %{pkgname}-%{version}
29 <% if ! spec.executables.empty? -%>
30 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
36 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
37 <% if ! spec.executables.empty? -%>
38 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
42 rm -rf $RPM_BUILD_ROOT
45 %defattr(644,root,root,755)
46 <% for f in spec.executables -%>
47 %attr(755,root,root) %{_bindir}/<%= f %>
49 %{ruby_vendorlibdir}/%{pkgname}.rb
50 %{ruby_vendorlibdir}/%{pkgname}