]> git.pld-linux.org Git - packages/gem2rpm.git/blame_incremental - pld.spec.erb
sort dependencies
[packages/gem2rpm.git] / pld.spec.erb
... / ...
CommitLineData
1<% if ! spec.development_dependencies.empty? -%>
2#
3# Conditional build:
4%bcond_without tests # build without tests
5
6<% end -%>
7%define pkgname <%= spec.name %>
8Summary: <%= spec.summary %>
9Name: ruby-%{pkgname}
10Version: <%= spec.version %>
11Release: 0.1
12License: <%= spec.licenses.empty? ? "GPL v2+ or Ruby" : spec.licenses.join(", ") %>
13Group: Development/Languages
14Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
15# Source0-md5: -
16URL: <%= spec.homepage %>
17BuildRequires: rpm-rubyprov
18BuildRequires: rpmbuild(macros) >= 1.656
19<% if ! spec.extensions.empty? -%>
20BuildRequires: ruby-devel
21<% end -%>
22<% if ! spec.executables.empty? -%>
23BuildRequires: sed >= 4.0
24<% end -%>
25<% if ! spec.required_rubygems_version.empty? and ! spec.required_rubygems_version.first.empty? -%>
26Requires: ruby-rubygems <%= spec.required_rubygems_version.first %>
27<% end -%>
28<% for d in spec.runtime_dependencies.sort -%>
29<% for req in d.requirement -%>
30Requires: ruby-<%= d.name %> <%= req %>
31<% end -%>
32<% end -%>
33<% if ! spec.development_dependencies.empty? -%>
34%if %{with tests}
35<% for d in spec.development_dependencies.sort -%>
36<% for req in d.requirement -%>
37Requires: ruby-<%= d.name %> <%= req %>
38<% end -%>
39<% end -%>
40%endif
41<% end -%>
42<% if spec.extensions.empty? -%>
43BuildArch: noarch
44<% end -%>
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48<%= spec.description %>
49
50%prep
51%setup -q -n %{pkgname}-%{version}
52<% if ! spec.executables.empty? -%>
53%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
54<% end -%>
55
56%install
57rm -rf $RPM_BUILD_ROOT
58install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
59cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
60<% if ! spec.executables.empty? -%>
61cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
62<% end -%>
63
64%clean
65rm -rf $RPM_BUILD_ROOT
66
67%files
68%defattr(644,root,root,755)
69<% for f in spec.executables.sort -%>
70%attr(755,root,root) %{_bindir}/<%= f %>
71<% end -%>
72%{ruby_vendorlibdir}/%{pkgname}.rb
73%{ruby_vendorlibdir}/%{pkgname}
This page took 0.072129 seconds and 4 git commands to generate.