1
0
rubygem-gem2rpm/0030-gem_package.spec.erb-sync-with-ruby-common.patch
Stephan Kulow 9f40853891 - Update from git. Add:
A    0027-quote-version_suffix-in-gem2rpm.yml.documentation-to.patch
A    0028-add-binary_map-support.patch
A    0029-Use-or-for-the-conditions-instead-of-and.patch
A    0030-gem_package.spec.erb-sync-with-ruby-common.patch
A    0031-use-template-opensuse-on-openSUSE-Tumbleweed-where-e.patch
A    0032-Replace-no-rdoc-no-ri-with-no-document.patch
And refresh all others
Remove:
D    binary_map.patch
D    enhances.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=35
2019-02-23 07:09:23 +00:00

78 lines
3.4 KiB
Diff

From c4557ce4aa7e0f67e5c249c255fe0c0c5df8f793 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Wed, 6 Jun 2018 17:15:35 +0200
Subject: [PATCH 30/32] gem_package.spec.erb: sync with ruby-common
Also drop the Enhances change that sneaked in by accident
---
templates/gem_packages.spec.erb | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb
index b704b91..257c719 100644
--- a/templates/gem_packages.spec.erb
+++ b/templates/gem_packages.spec.erb
@@ -62,6 +62,8 @@
end
rb_suffix = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby/, '')
+ # TODO: "ruby" hardcoded here is wrong. it should support jruby/rubinius or so
+ rb_abi = "ruby:#{RbConfig::CONFIG['ruby_version']}"
rb_pkgname = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby\./, '')
if rb_suffix =~ /\A\d+\.\d+\z/
rb_suffix = '.ruby' + rb_suffix
@@ -78,6 +80,7 @@
gem_spec = Gem::Specification.new
gem_base_dir = patch_libdir(gem_spec.base_dir)
gem_cache_dir = patch_libdir(gem_spec.cache_dir)
+ gem_build_info_dir = patch_libdir(gem_spec.build_info_dir)
gem_gems_dir = patch_libdir(gem_spec.gems_dir)
gem_spec_dir = patch_libdir(gem_spec.spec_dir)
gem_bin_dir = patch_libdir(patch_mod_full_name(gem_spec.bin_dir , mod_full_name ))
@@ -101,7 +104,6 @@ Group: Development/Languages/Ruby
<% unless spec.executables.empty? -%>
PreReq: update-alternatives
<% end -%>
-Enhances: <%= rb_pkgname %>
%description -n <%= pkg_basename %><%= config[:version_suffix] %>
<%= config[:description] or spec.description -%>
@@ -110,7 +112,7 @@ Enhances: <%= rb_pkgname %>
%package -n <%= pkg_basename %>-doc<%= config[:version_suffix] %>
Summary: RDoc documentation for <%= spec.name %>
Group: Development/Languages/Ruby
-Requires: <%= pkg_basename %><%= config[:version_suffix] %> = <%= spec.version %>
+Requires: rubygem(<%= rb_abi %>:<%= spec.name %>) = <%= spec.version %>
%description -n <%= pkg_basename %>-doc<%= config[:version_suffix] %>
Documentation generated at gem installation time.
@@ -155,7 +157,7 @@ Usually in RDoc and RI formats.
%package -n <%= pkg_basename %>-testsuite<%= config[:version_suffix] %>
Summary: Test suite for <%= spec.name %>
Group: Development/Languages/Ruby
-Requires: <%= pkg_basename %><%= config[:version_suffix] %> = <%= spec.version %>
+Requires: rubygem(<%= rb_abi %>:<%= spec.name %>) = <%= spec.version %>
%description -n <%= pkg_basename %>-testsuite<%= config[:version_suffix] %>
Test::Unit or RSpec files, useful for developers.
@@ -205,6 +207,7 @@ fi
# cache file
<%= gem_cache_dir %>/<%= mod_full_name %>.gem
<%= gem_gem_dir %>
+<%= gem_build_info_dir %>
<% unless spec.extensions.empty? or gem_extension_dir.nil? -%>
<%= gem_extension_dir %>
<% end -%>
@@ -240,7 +243,7 @@ fi
Summary: <%= custom_pkg_name %> sub package for <%= spec.name %>
Group: Development/Languages/Ruby
<% end %>
-Requires: <%= pkg_basename %><%= config[:version_suffix] %> = <%= spec.version %>
+Requires: rubygem(<%= rb_abi %>:<%= spec.name %>) = <%= spec.version %>
%description -n <%= pkg_basename %>-<%= custom_pkg_name %><%= config[:version_suffix] %>
<% if data[:description] and data[:description] != '' -%>
<%= data[:description] %>
--
2.20.1