From 891ab30e46d074f51bf3976d3a9ac404ecbcb1be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 30 Apr 2013 00:23:20 +0300 Subject: [PATCH] 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) -- 2.43.0