]> 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 37515db028b86cec8d017890f49035d708d84200..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}
@@ -16,11 +22,23 @@ BuildRequires:      ruby-devel
 <% 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 -%>
+<% 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)
 
@@ -46,7 +64,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-<% for f in spec.executables -%>
+<% for f in spec.executables.sort -%>
 %attr(755,root,root) %{_bindir}/<%= f %>
 <% end -%>
 %{ruby_vendorlibdir}/%{pkgname}.rb
This page took 0.057718 seconds and 4 git commands to generate.