1
0

- added 0009-rubinius-has-no-extensions-docdir.patch

special casing for rubinius
- added 0010-switch-to-new-packaging-scheme-by-default.patch
  move to new packaging templates by default

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=3
This commit is contained in:
Marcus Rückert 2014-10-13 14:00:09 +00:00 committed by Git OBS Bridge
parent acbd130355
commit 73c6792b02
13 changed files with 1089 additions and 21 deletions

View File

@ -1,7 +1,7 @@
From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001 From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:46:19 +0200 Date: Thu, 24 Jul 2014 16:46:19 +0200
Subject: [PATCH 1/8] - use the ID from os-release to use the proper template Subject: [PATCH 01/10] - use the ID from os-release to use the proper template
--- ---
bin/gem2rpm | 10 ++++++++++ bin/gem2rpm | 10 ++++++++++
@ -29,5 +29,5 @@ index 736a645..fa7ce6b 100755
else else
begin begin
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001 From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:54:45 +0200 Date: Thu, 24 Jul 2014 16:54:45 +0200
Subject: [PATCH 2/8] added basic config file support to gem2rpm in yaml Subject: [PATCH 02/10] added basic config file support to gem2rpm in yaml
format. format.
There is no validation as it is basically a hash where certain keys are There is no validation as it is basically a hash where certain keys are
@ -89,5 +89,5 @@ index 017ecd1..e5e2693 100644
unless local unless local
begin begin
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From 152e9ec100f30a3c46535a65fa411d014cb264e2 Mon Sep 17 00:00:00 2001 From 152e9ec100f30a3c46535a65fa411d014cb264e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:55:57 +0200 Date: Thu, 24 Jul 2014 16:55:57 +0200
Subject: [PATCH 3/8] sle 12 templates. they require the config file support. Subject: [PATCH 03/10] sle 12 templates. they require the config file support.
--- ---
templates/sles12.gem_packages.spec.erb | 233 +++++++++++++++++++++++++++++++++ templates/sles12.gem_packages.spec.erb | 233 +++++++++++++++++++++++++++++++++
@ -471,5 +471,5 @@ index 0000000..25fdec3
+ +
+%changelog +%changelog
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From fff45bc96294b974a25c99f626e2d5359c06d717 Mon Sep 17 00:00:00 2001 From fff45bc96294b974a25c99f626e2d5359c06d717 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:01:17 +0200 Date: Thu, 24 Jul 2014 17:01:17 +0200
Subject: [PATCH 4/8] openSUSE template fixes Subject: [PATCH 04/10] openSUSE template fixes
--- ---
templates/opensuse.spec.erb | 194 ++++++++++++++++++++++++++++++++++++-------- templates/opensuse.spec.erb | 194 ++++++++++++++++++++++++++++++++++++--------
@ -239,5 +239,5 @@ index 37de592..2fb605d 100644
+<% end -%> +<% end -%>
%changelog %changelog
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From 4eba3dc8c65e4298e650852eeb79461fb648b675 Mon Sep 17 00:00:00 2001 From 4eba3dc8c65e4298e650852eeb79461fb648b675 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:02:56 +0200 Date: Thu, 24 Jul 2014 17:02:56 +0200
Subject: [PATCH 5/8] added example gem2rpm.yml Subject: [PATCH 05/10] added example gem2rpm.yml
--- ---
Rakefile | 2 +- Rakefile | 2 +-
@ -86,5 +86,5 @@ index 0000000..5e444eb
+# /bin/echo foo +# /bin/echo foo
+# +#
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From b6a01a354d9b7fb0f1c9cb68c3ea58ffc34240ba Mon Sep 17 00:00:00 2001 From b6a01a354d9b7fb0f1c9cb68c3ea58ffc34240ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:09:35 +0200 Date: Thu, 24 Jul 2014 17:09:35 +0200
Subject: [PATCH 6/8] properly shorten description and summary Subject: [PATCH 06/10] properly shorten description and summary
This also includes the description if we reuse the summary. This also includes the description if we reuse the summary.
--- ---
@ -54,5 +54,5 @@ index 9a8d5a1..2e4f7b2 100644
def development_dependencies def development_dependencies
super.map {|d| Gem2Rpm::Dependency.new d} super.map {|d| Gem2Rpm::Dependency.new d}
-- --
2.1.0 1.8.4.5

View File

@ -1,7 +1,7 @@
From 3f955d9ed723ecf5a72bc73f3252b0d247329648 Mon Sep 17 00:00:00 2001 From 3f955d9ed723ecf5a72bc73f3252b0d247329648 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:17:33 +0200 Date: Thu, 24 Jul 2014 17:17:33 +0200
Subject: [PATCH 7/8] Preserve the license header found in the output file Subject: [PATCH 07/10] Preserve the license header found in the output file
--- ---
bin/gem2rpm | 13 +++++++++++-- bin/gem2rpm | 13 +++++++++++--
@ -57,5 +57,5 @@ index 5261ae1..d30e0f6 100644
download_path = "" download_path = ""
unless local unless local
-- --
2.1.0 1.8.4.5

View File

@ -1,27 +1,27 @@
From 078c5914e4374ee4fec369f188eb89876e09aad1 Mon Sep 17 00:00:00 2001 From 3bd29ca337636665ecca5b68590d0c32fd11e92d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Wed, 17 Sep 2014 16:50:21 +0200 Date: Wed, 17 Sep 2014 16:50:21 +0200
Subject: [PATCH 8/8] dont allow suffixes with just a plain number. prefix them Subject: [PATCH 08/10] dont allow suffixes with just a plain number. prefix
with ruby. them with ruby.
--- ---
templates/sles12.gem_packages.spec.erb | 3 +++ templates/sles12.gem_packages.spec.erb | 3 +++
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/templates/sles12.gem_packages.spec.erb b/templates/sles12.gem_packages.spec.erb diff --git a/templates/sles12.gem_packages.spec.erb b/templates/sles12.gem_packages.spec.erb
index 5b02f2c..63078ef 100644 index 5b02f2c..e148494 100644
--- a/templates/sles12.gem_packages.spec.erb --- a/templates/sles12.gem_packages.spec.erb
+++ b/templates/sles12.gem_packages.spec.erb +++ b/templates/sles12.gem_packages.spec.erb
@@ -49,6 +49,9 @@ @@ -49,6 +49,9 @@
rb_suffix = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby/, '') rb_suffix = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby/, '')
rb_pkgname = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby\./, '') rb_pkgname = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby\./, '')
+ if rb_suffix =~ /\d+\.\d+/ + if rb_suffix =~ /\A\d+\.\d+\z/
+ rb_suffix = '.ruby' + rb_suffix + rb_suffix = '.ruby' + rb_suffix
+ end + end
pkg_basename = rb_pkgname + '-rubygem-' + spec.name pkg_basename = rb_pkgname + '-rubygem-' + spec.name
mod_full_name = "#{spec.name}-#{spec.version}" mod_full_name = "#{spec.name}-#{spec.version}"
-- --
2.1.0 1.8.4.5

View File

@ -0,0 +1,25 @@
From 0abcc03623950eafddf0dd2bd1a96cea6756063f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Wed, 17 Sep 2014 17:11:52 +0200
Subject: [PATCH 09/10] rubinius has no extensions docdir
---
templates/sles12.gem_packages.spec.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/sles12.gem_packages.spec.erb b/templates/sles12.gem_packages.spec.erb
index e148494..d1734db 100644
--- a/templates/sles12.gem_packages.spec.erb
+++ b/templates/sles12.gem_packages.spec.erb
@@ -9,7 +9,7 @@
end
def self.get_extension_doc_dir(gem_spec)
- if gem_spec.respond_to? :extensions_dir
+ if gem_spec.respond_to?(:extensions_dir) && RUBY_ENGINE != 'rbx'
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
end
--
1.8.4.5

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 13 13:46:58 UTC 2014 - mrueckert@suse.de
- added 0009-rubinius-has-no-extensions-docdir.patch
special casing for rubinius
- added 0010-switch-to-new-packaging-scheme-by-default.patch
move to new packaging templates by default
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 22 16:12:08 UTC 2014 - mrueckert@suse.de Mon Sep 22 16:12:08 UTC 2014 - mrueckert@suse.de

View File

@ -52,6 +52,8 @@ Patch4: 0005-added-example-gem2rpm.yml.patch
Patch5: 0006-properly-shorten-description-and-summary.patch Patch5: 0006-properly-shorten-description-and-summary.patch
Patch6: 0007-Preserve-the-license-header-found-in-the-output-file.patch Patch6: 0007-Preserve-the-license-header-found-in-the-output-file.patch
Patch7: 0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.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
Summary: Generate rpm specfiles from gems Summary: Generate rpm specfiles from gems
License: GPL-2.0+ License: GPL-2.0+
Group: Development/Languages/Ruby Group: Development/Languages/Ruby
@ -71,6 +73,8 @@ The spec file tries to follow the gem as closely as possible
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
%patch9 -p1
%build %build
%gem_build %gem_build
@ -79,7 +83,6 @@ The spec file tries to follow the gem as closely as possible
%gem_install -f --symlink-binaries --doc-files="AUTHORS LICENSE README" %gem_install -f --symlink-binaries --doc-files="AUTHORS LICENSE README"
for i in %{buildroot}%{_docdir}/*rubygem-gem2rpm*/ ; do for i in %{buildroot}%{_docdir}/*rubygem-gem2rpm*/ ; do
install -m 0644 %{S:1} $i/gem2rpm.yml install -m 0644 %{S:1} $i/gem2rpm.yml
install -m 0644 %{mod_full_name}/templates/sles12*.spec.erb $i/
done done
%if %{with gem2rpm_bootstrap} %if %{with gem2rpm_bootstrap}

3
series
View File

@ -5,3 +5,6 @@
0005-added-example-gem2rpm.yml.patch -p1 0005-added-example-gem2rpm.yml.patch -p1
0006-properly-shorten-description-and-summary.patch -p1 0006-properly-shorten-description-and-summary.patch -p1
0007-Preserve-the-license-header-found-in-the-output-file.patch -p1 0007-Preserve-the-license-header-found-in-the-output-file.patch -p1
0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch -p1
0009-rubinius-has-no-extensions-docdir.patch -p1
0010-switch-to-new-packaging-scheme-by-default.patch -p1