Accepting request 257887 from devel:languages:ruby:backports

- restore changes lost by the previous change
  - load rbconfigpackagingsupport if available and fail gracefully
    if not.
  - dont use not() it breaks the build on 1.8
  - remove requires onto the ruby version

OBS-URL: https://build.opensuse.org/request/show/257887
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=76
This commit is contained in:
Marcus Rückert 2014-10-21 15:56:21 +00:00 committed by Git OBS Bridge
parent dd9e5e4b5d
commit 96d3b7f5ee
2 changed files with 16 additions and 7 deletions

View File

@ -1,4 +1,9 @@
<%
begin
require 'rbconfigpackagingsupport'
rescue LoadError => ex
end
def self.patch_mod_full_name(path, mod_full_name)
path.gsub(/\/-/, "/#{mod_full_name}")
end
@ -77,11 +82,6 @@
#/ruby2.1
%>
%package -n <%= pkg_basename %><%= config[:version_suffix] %>
<% for req in spec.required_ruby_version -%>
<% unless req.empty? -%>
Requires: <%= rb_pkgname %> <%= req %>
<% end -%>
<% end -%>
# MANUAL
<% if config[:main] && config[:main][:preamble] -%>
<%= config[:main][:preamble] %>
@ -96,7 +96,7 @@ PreReq: update-alternatives
%description -n <%= pkg_basename %><%= config[:version_suffix] %>
<%= config[:description] or spec.description -%>
<% if spec.has_rdoc && not(config[:disable_docs]) -%>
<% if spec.has_rdoc && !(config[:disable_docs]) -%>
%package -n <%= pkg_basename %>-doc<%= config[:version_suffix] %>
Summary: RDoc documentation for <%= spec.name %>
Group: Development/Languages/Ruby
@ -191,7 +191,7 @@ fi
<% end -%>
<%= gem_spec_dir %>/<%= mod_full_name -%>.gemspec
<% if spec.has_rdoc && not(config[:disable_docs]) -%>
<% if spec.has_rdoc && !(config[:disable_docs]) -%>
%files -n <%= pkg_basename %>-doc<%= config[:version_suffix] %>
%defattr(-,root,root,-)
%doc <%= gem_doc_dir %>

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Oct 21 15:50:45 UTC 2014 - mrueckert@suse.de
- restore changes lost by the previous change
- load rbconfigpackagingsupport if available and fail gracefully
if not.
- dont use not() it breaks the build on 1.8
- remove requires onto the ruby version
-------------------------------------------------------------------
Sat Oct 18 05:37:19 UTC 2014 - coolo@suse.com