]> git.pld-linux.org Git - packages/gem2rpm.git/blob - pld.spec.erb
up to 0.9.2
[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:        <%= spec.licenses.empty? ? "GPL v2+ or Ruby" : spec.licenses.join(", ") %>
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.extensions.empty? -%>
14 BuildRequires:  ruby-devel
15 <% end -%>
16 <% if ! spec.executables.empty? -%>
17 BuildRequires:  sed >= 4.0
18 <% end -%>
19 <% for d in spec.runtime_dependencies -%>
20 <% for req in d.requirement -%>
21 Requires:       ruby-<%= d.name %> <%= req %>
22 <% end -%>
23 <% end -%>
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 <%= spec.description %>
29
30 %prep
31 %setup -q -n %{pkgname}-%{version}
32 <% if ! spec.executables.empty? -%>
33 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
34 <% end -%>
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
39 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
40 <% if ! spec.executables.empty? -%>
41 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
42 <% end -%>
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %files
48 %defattr(644,root,root,755)
49 <% for f in spec.executables -%>
50 %attr(755,root,root) %{_bindir}/<%= f %>
51 <% end -%>
52 %{ruby_vendorlibdir}/%{pkgname}.rb
53 %{ruby_vendorlibdir}/%{pkgname}
This page took 0.054862 seconds and 4 git commands to generate.