]> git.pld-linux.org Git - packages/gem2rpm.git/blob - pld.spec.erb
shebang fix
[packages/gem2rpm.git] / pld.spec.erb
1 %define pkgname <%= spec.name %>
2 Summary:        <%= spec.summary %>
3 Name:           ruby-%{pkgname}
4 Version:        <%= spec.version %>
5 Release:        0.1
6 License:        Distributable
7 Group:          Development/Languages
8 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
9 # Source0-md5:  -
10 URL:            <%= spec.homepage %>
11 BuildRequires:  rpm-rubyprov
12 BuildRequires:  rpmbuild(macros) >= 1.656
13 <% if ! spec.executables.empty? -%>
14 BuildRequires:  sed >= 4.0
15 <% end -%>
16 <% for d in spec.dependencies -%>
17 <% for req in d.requirement -%>
18 Requires:       ruby-<%= d.name %> <%= req %>
19 <% end -%>
20 <% end -%>
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 <%= spec.description %>
26
27 %prep
28 %setup -q -n %{pkgname}-%{version}
29 <% if ! spec.executables.empty? -%>
30 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
31 <% end -%>
32
33 %install
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}
39 <% end -%>
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %files
45 %defattr(644,root,root,755)
46 <% for f in spec.executables -%>
47 %attr(755,root,root) %{_bindir}/<%= f %>
48 <% end -%>
49 %{ruby_vendorlibdir}/%{pkgname}.rb
50 %{ruby_vendorlibdir}/%{pkgname}
This page took 0.06234 seconds and 4 git commands to generate.