From 681bf2325c26c9c32d8f371d598a9e4e55fc48011f7e356db6a5bbba6c7cfb98 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 15 Oct 2014 08:44:28 +0000 Subject: [PATCH] - add 0011-fixes-for-the-opensuse-template.patch to survive format_spec formatting OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=4 --- 0011-fixes-for-the-opensuse-template.patch | 50 ++++++++++++++++++++++ rubygem-gem2rpm.changes | 6 +++ rubygem-gem2rpm.spec | 2 + 3 files changed, 58 insertions(+) create mode 100644 0011-fixes-for-the-opensuse-template.patch diff --git a/0011-fixes-for-the-opensuse-template.patch b/0011-fixes-for-the-opensuse-template.patch new file mode 100644 index 0000000..aacfbb1 --- /dev/null +++ b/0011-fixes-for-the-opensuse-template.patch @@ -0,0 +1,50 @@ +commit eed51b54253c303c593d9466ed8ed17523bda3d1 +Author: Stephan Kulow +Date: Wed Oct 15 10:38:29 2014 +0200 + + fixes for the opensuse template: + + - add one more space for sources + - add empty lines in front of the warning preamble - otherwise format_spec_file + removes it as old license comment + - don't %ghost %_bindir + +diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb +index d1734db..058660b 100644 +--- a/templates/gem_packages.spec.erb ++++ b/templates/gem_packages.spec.erb +@@ -173,9 +173,9 @@ fi + <% end -%> + <% spec.executables.each do |executable| -%> + <%= rb_bindir %>/<%= "#{executable}#{rb_suffix}-#{spec.version}" %> +-%ghost <%= rb_bindir %>/<%= "#{executable}#{rb_suffix}" %> +-%ghost <%= rb_bindir %>/<%= "#{executable}-#{spec.version}" %> +-%ghost <%= rb_bindir %>/<%= executable %> ++<%= rb_bindir %>/<%= "#{executable}#{rb_suffix}" %> ++<%= rb_bindir %>/<%= "#{executable}-#{spec.version}" %> ++<%= rb_bindir %>/<%= executable %> + %ghost <%= rb_sysconfdir %>/alternatives/<%= executable %> + %ghost <%= rb_sysconfdir %>/alternatives/<%= "#{executable}#{rb_suffix}" %> + %ghost <%= rb_sysconfdir %>/alternatives/<%= "#{executable}-#{spec.version}" %> +diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb +index 25fdec3..8bc281c 100644 +--- a/templates/opensuse.spec.erb ++++ b/templates/opensuse.spec.erb +@@ -15,6 +15,8 @@ + # Please submit bugfixes or comments via http://bugs.opensuse.org/ + # + <% if config && not(config.empty?) -%> ++ ++ + # + # This file was generated with a gem2rpm.yml and not just plain gem2rpm. + # All sections marked as MANUAL, license headers, summaries and descriptions +@@ -74,7 +76,7 @@ Url: <%= spec.homepage %> + Source: http://rubygems.org/gems/%{mod_full_name}.gem + <% if config[:sources] + config[:sources].each_with_index do |src, i| -%> +-Source<%= i+1 %>: <%= src %> ++Source<%= i+1 %>: <%= src %> + <% end + end -%> + <% if config[:patches] -%> diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index b04a610..2f73095 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 15 08:44:14 UTC 2014 - coolo@suse.com + +- add 0011-fixes-for-the-opensuse-template.patch to survive + format_spec formatting + ------------------------------------------------------------------- Mon Oct 13 13:46:58 UTC 2014 - mrueckert@suse.de diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 11c2347..cf34edd 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -54,6 +54,7 @@ Patch6: 0007-Preserve-the-license-header-found-in-the-output-file.patch Patch7: 0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch Patch8: 0009-rubinius-has-no-extensions-docdir.patch Patch9: 0010-switch-to-new-packaging-scheme-by-default.patch +Patch10: 0011-fixes-for-the-opensuse-template.patch Summary: Generate rpm specfiles from gems License: GPL-2.0+ Group: Development/Languages/Ruby @@ -75,6 +76,7 @@ The spec file tries to follow the gem as closely as possible %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build %gem_build