Accepting request 132173 from devel:languages:ruby:extensions
OBS-URL: https://build.opensuse.org/request/show/132173 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=2
This commit is contained in:
parent
0e2db665e5
commit
3dda26a508
@ -12,7 +12,7 @@ Index: gem2rpm-0.8.1/templates/opensuse.spec.erb
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,58 +15,103 @@
|
||||
@@ -15,58 +15,106 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
@ -45,8 +45,8 @@ Index: gem2rpm-0.8.1/templates/opensuse.spec.erb
|
||||
<% end -%>
|
||||
-<% for d in spec.dependencies -%>
|
||||
+<% end -%>
|
||||
+<% if false -%>
|
||||
+<% for d in spec.runtime_dependencies -%>
|
||||
+<% if ['rdoc'].include? d.name.to_s -%>
|
||||
+# <%= d.name %> <%= d.__getobj__().requirement %>
|
||||
<% for req in d.requirement -%>
|
||||
-BuildRequires: rubygem-<%= d.name %> <%= req %>
|
||||
@ -56,6 +56,9 @@ Index: gem2rpm-0.8.1/templates/opensuse.spec.erb
|
||||
<% end -%>
|
||||
-#
|
||||
+<% end -%>
|
||||
+<% unless spec.rdoc_options.empty? -%>
|
||||
+BuildRequires: rubygem(rdoc) > 3.10
|
||||
+<% end -%>
|
||||
+<% unless spec.homepage.nil? || spec.homepage.empty? -%>
|
||||
Url: <%= spec.homepage %>
|
||||
-Source: %{mod_name}-%{version}.gem
|
||||
@ -74,7 +77,7 @@ Index: gem2rpm-0.8.1/templates/opensuse.spec.erb
|
||||
%description
|
||||
-<%= spec.description %>
|
||||
+<%= spec.description -%>
|
||||
|
||||
+
|
||||
+<% if spec.has_rdoc -%>
|
||||
+%package doc
|
||||
+Summary: RDoc documentation for %{mod_name}
|
||||
@ -84,7 +87,7 @@ Index: gem2rpm-0.8.1/templates/opensuse.spec.erb
|
||||
+%description doc
|
||||
+Documentation generated at gem installation time.
|
||||
+Usually in RDoc and RI formats.
|
||||
+
|
||||
|
||||
+<% end -%>
|
||||
+<% test_frameworks = %w(test spec).select { |framework| format.file_entries.any? { |entry, data| path = entry['path'] ; path.index(framework + "/") == 0 } } -%>
|
||||
+<% unless test_frameworks.empty? -%>
|
||||
@ -160,12 +163,30 @@ Index: gem2rpm-0.8.1/lib/gem2rpm/specification.rb
|
||||
- Helpers::word_wrap(super.to_s.chomp, 78) + "\n"
|
||||
+ text=super
|
||||
+ if text.nil? or text.empty?
|
||||
+ text=self.summary
|
||||
+ text=self.__getobj__().summary
|
||||
+ end
|
||||
+ Helpers::word_wrap(text.to_s.chomp, 78) + "\n"
|
||||
end
|
||||
|
||||
# A list of Gem::Dependency objects this gem depends on (includes every
|
||||
@@ -15,6 +19,17 @@ module Gem2Rpm
|
||||
super.map {|d| Gem2Rpm::Dependency.new d}
|
||||
end
|
||||
|
||||
+ # a short summary trimmed to 70 characters
|
||||
+ def summary
|
||||
+ text = super
|
||||
+ if text.length >= 70
|
||||
+ text = text[0,70].split(/\s/)
|
||||
+ text = text[0, text.length-1].join(" ")
|
||||
+ end
|
||||
+ text = text[0, text.length-1] if text[-1] == '.'
|
||||
+ text
|
||||
+ end
|
||||
+
|
||||
# List of dependencies that are used for development.
|
||||
def development_dependencies
|
||||
super.map {|d| Gem2Rpm::Dependency.new d}
|
||||
Index: gem2rpm-0.8.1/lib/gem2rpm.rb
|
||||
===================================================================
|
||||
--- gem2rpm-0.8.1.orig/lib/gem2rpm.rb
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 6 10:54:32 UTC 2012 - coolo@suse.com
|
||||
|
||||
- buildrequire rdoc if there are options (I just picked 3.10 as
|
||||
minimum, which is one higher than what ruby 1.9.1 offers in itself)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 1 06:07:50 UTC 2012 - coolo@suse.com
|
||||
|
||||
- shorten the summary
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 30 12:43:00 UTC 2012 - cfarrell@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user