]> git.pld-linux.org Git - packages/gem2rpm.git/commitdiff
add tests bcond if spec.development_dependencies present
authorElan Ruusamäe <glen@delfi.ee>
Mon, 29 Apr 2013 21:23:20 +0000 (00:23 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 29 Apr 2013 21:23:20 +0000 (00:23 +0300)
pld.spec.erb

index 09ff21f12006efacbeca8ae863879c181b2b2544..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}
@@ -24,6 +30,15 @@ Requires:    ruby-rubygems <%= spec.required_rubygems_version.first %>
 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)
 
This page took 0.103282 seconds and 4 git commands to generate.