[packages/gem2rpm] add tests bcond if spec.development_dependencies present
glen
glen at pld-linux.org
Mon Apr 29 23:23:47 CEST 2013
commit 891ab30e46d074f51bf3976d3a9ac404ecbcb1be
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Apr 30 00:23:20 2013 +0300
add tests bcond if spec.development_dependencies present
pld.spec.erb | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/pld.spec.erb b/pld.spec.erb
index 09ff21f..4f4b720 100644
--- a/pld.spec.erb
+++ b/pld.spec.erb
@@ -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)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gem2rpm.git/commitdiff/891ab30e46d074f51bf3976d3a9ac404ecbcb1be
More information about the pld-cvs-commit
mailing list