1
0
rubygem-gem2rpm/0024-add-ability-to-provide-alternative-main-Source.patch

30 lines
992 B
Diff
Raw Normal View History

From 3888b107af6ce5721ff40abe2bedcede1893732b Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <tampakrap@gmail.com>
Date: Tue, 23 Aug 2016 23:49:40 +0200
Subject: [PATCH 24/26] add ability to provide alternative main Source
this is useful in cases where the gem is not taken from rubygems.org
---
templates/opensuse.spec.erb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index 5b62b26..ae2d458 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -73,7 +73,11 @@ BuildRequires: update-alternatives
<% unless spec.homepage.nil? || spec.homepage.empty? -%>
Url: <%= spec.homepage %>
<% end -%>
+<% if config[:sourceurl] -%>
+Source: <%= config[:sourceurl] %>
+<% else -%>
Source: http://rubygems.org/gems/%{mod_full_name}.gem
+<% end -%>
<% if config[:sources]
config[:sources].each_with_index do |src, i| -%>
Source<%= i+1 %>: <%= src %>
--
2.10.2