]> git.pld-linux.org Git - packages/gem2rpm.git/blobdiff - pld.spec.erb
add tests bcond if spec.development_dependencies present
[packages/gem2rpm.git] / pld.spec.erb
index 65ca1e59e8543a8aadefe41e378ba06dd7c507aa..4f4b720012749a302d13f87c8642f73ad4babff4 100644 (file)
@@ -1,3 +1,9 @@
+<% if ! spec.development_dependencies.empty? -%>
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
+<% end -%>
 %define        pkgname <%= spec.name %>
 Summary:       <%= spec.summary %>
 Name:          ruby-%{pkgname}
 %define        pkgname <%= spec.name %>
 Summary:       <%= spec.summary %>
 Name:          ruby-%{pkgname}
@@ -16,11 +22,23 @@ BuildRequires:      ruby-devel
 <% if ! spec.executables.empty? -%>
 BuildRequires: sed >= 4.0
 <% end -%>
 <% if ! spec.executables.empty? -%>
 BuildRequires: sed >= 4.0
 <% end -%>
+<% if ! spec.required_rubygems_version.empty? and ! spec.required_rubygems_version.first.empty? -%>
+Requires:      ruby-rubygems <%= spec.required_rubygems_version.first %>
+<% end -%>
 <% for d in spec.runtime_dependencies -%>
 <% for req in d.requirement -%>
 Requires:      ruby-<%= d.name %> <%= req %>
 <% end -%>
 <% end -%>
 <% for d in spec.runtime_dependencies -%>
 <% for req in d.requirement -%>
 Requires:      ruby-<%= d.name %> <%= req %>
 <% end -%>
 <% end -%>
+<% if ! spec.development_dependencies.empty? -%>
+%if %{with tests}
+<% for d in spec.development_dependencies -%>
+<% for req in d.requirement -%>
+Requires:      ruby-<%= d.name %> <%= req %>
+<% end -%>
+<% end -%>
+%endif
+<% end -%>
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
This page took 0.089975 seconds and 4 git commands to generate.