diff --git a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch index f835e51..08caa71 100644 --- a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch +++ b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch @@ -1,7 +1,7 @@ From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 16:46:19 +0200 -Subject: [PATCH 1/7] - use the ID from os-release to use the proper template +Subject: [PATCH 1/8] - use the ID from os-release to use the proper template --- bin/gem2rpm | 10 ++++++++++ @@ -29,5 +29,5 @@ index 736a645..fa7ce6b 100755 else begin -- -1.8.4.5 +2.1.0 diff --git a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch index 746c188..4bd1c90 100644 --- a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch +++ b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch @@ -1,7 +1,7 @@ From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 16:54:45 +0200 -Subject: [PATCH 2/7] added basic config file support to gem2rpm in yaml +Subject: [PATCH 2/8] added basic config file support to gem2rpm in yaml format. There is no validation as it is basically a hash where certain keys are @@ -89,5 +89,5 @@ index 017ecd1..e5e2693 100644 unless local begin -- -1.8.4.5 +2.1.0 diff --git a/0003-sle-12-templates.-they-require-the-config-file-suppo.patch b/0003-sle-12-templates.-they-require-the-config-file-suppo.patch index 6a6da04..e973d2f 100644 --- a/0003-sle-12-templates.-they-require-the-config-file-suppo.patch +++ b/0003-sle-12-templates.-they-require-the-config-file-suppo.patch @@ -1,7 +1,7 @@ From 152e9ec100f30a3c46535a65fa411d014cb264e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 16:55:57 +0200 -Subject: [PATCH 3/7] sle 12 templates. they require the config file support. +Subject: [PATCH 3/8] sle 12 templates. they require the config file support. --- templates/sles12.gem_packages.spec.erb | 233 +++++++++++++++++++++++++++++++++ @@ -471,5 +471,5 @@ index 0000000..25fdec3 + +%changelog -- -1.8.4.5 +2.1.0 diff --git a/0004-openSUSE-template-fixes.patch b/0004-openSUSE-template-fixes.patch index 8f39d0d..2d10bbb 100644 --- a/0004-openSUSE-template-fixes.patch +++ b/0004-openSUSE-template-fixes.patch @@ -1,7 +1,7 @@ From fff45bc96294b974a25c99f626e2d5359c06d717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:01:17 +0200 -Subject: [PATCH 4/7] openSUSE template fixes +Subject: [PATCH 4/8] openSUSE template fixes --- templates/opensuse.spec.erb | 194 ++++++++++++++++++++++++++++++++++++-------- @@ -239,5 +239,5 @@ index 37de592..2fb605d 100644 +<% end -%> %changelog -- -1.8.4.5 +2.1.0 diff --git a/0005-added-example-gem2rpm.yml.patch b/0005-added-example-gem2rpm.yml.patch index 0fa4d78..8564b22 100644 --- a/0005-added-example-gem2rpm.yml.patch +++ b/0005-added-example-gem2rpm.yml.patch @@ -1,7 +1,7 @@ From 4eba3dc8c65e4298e650852eeb79461fb648b675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:02:56 +0200 -Subject: [PATCH 5/7] added example gem2rpm.yml +Subject: [PATCH 5/8] added example gem2rpm.yml --- Rakefile | 2 +- @@ -86,5 +86,5 @@ index 0000000..5e444eb +# /bin/echo foo +# -- -1.8.4.5 +2.1.0 diff --git a/0006-properly-shorten-description-and-summary.patch b/0006-properly-shorten-description-and-summary.patch index 0d067b2..14bd67b 100644 --- a/0006-properly-shorten-description-and-summary.patch +++ b/0006-properly-shorten-description-and-summary.patch @@ -1,7 +1,7 @@ From b6a01a354d9b7fb0f1c9cb68c3ea58ffc34240ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:09:35 +0200 -Subject: [PATCH 6/7] properly shorten description and summary +Subject: [PATCH 6/8] properly shorten description and summary This also includes the description if we reuse the summary. --- @@ -54,5 +54,5 @@ index 9a8d5a1..2e4f7b2 100644 def development_dependencies super.map {|d| Gem2Rpm::Dependency.new d} -- -1.8.4.5 +2.1.0 diff --git a/0007-Preserve-the-license-header-found-in-the-output-file.patch b/0007-Preserve-the-license-header-found-in-the-output-file.patch index d8d468d..a133d75 100644 --- a/0007-Preserve-the-license-header-found-in-the-output-file.patch +++ b/0007-Preserve-the-license-header-found-in-the-output-file.patch @@ -1,7 +1,7 @@ From 3f955d9ed723ecf5a72bc73f3252b0d247329648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:17:33 +0200 -Subject: [PATCH 7/7] Preserve the license header found in the output file +Subject: [PATCH 7/8] Preserve the license header found in the output file --- bin/gem2rpm | 13 +++++++++++-- @@ -57,5 +57,5 @@ index 5261ae1..d30e0f6 100644 download_path = "" unless local -- -1.8.4.5 +2.1.0 diff --git a/0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch b/0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch new file mode 100644 index 0000000..c36a865 --- /dev/null +++ b/0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch @@ -0,0 +1,27 @@ +From 078c5914e4374ee4fec369f188eb89876e09aad1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Wed, 17 Sep 2014 16:50:21 +0200 +Subject: [PATCH 8/8] dont allow suffixes with just a plain number. prefix them + with ruby. + +--- + templates/sles12.gem_packages.spec.erb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/templates/sles12.gem_packages.spec.erb b/templates/sles12.gem_packages.spec.erb +index 5b02f2c..63078ef 100644 +--- a/templates/sles12.gem_packages.spec.erb ++++ b/templates/sles12.gem_packages.spec.erb +@@ -49,6 +49,9 @@ + + rb_suffix = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby/, '') + rb_pkgname = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby\./, '') ++ if rb_suffix =~ /\d+\.\d+/ ++ rb_suffix = '.ruby' + rb_suffix ++ end + pkg_basename = rb_pkgname + '-rubygem-' + spec.name + + mod_full_name = "#{spec.name}-#{spec.version}" +-- +2.1.0 + diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 0eb173d..5c46214 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon Sep 22 16:12:08 UTC 2014 - mrueckert@suse.de + +- added ruby 1.9 support + +------------------------------------------------------------------- +Wed Sep 17 16:16:59 UTC 2014 - mrueckert@suse.de + +- added ruby 1.8 support +- also guarded the 2.1 part + +------------------------------------------------------------------- +Wed Sep 17 14:55:33 UTC 2014 - mrueckert@suse.de + +- added 0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch + Dont allow an suffix with just a plain number. prefix it with + ruby. + +------------------------------------------------------------------- +Wed Sep 17 13:25:27 UTC 2014 - mrueckert@suse.de + +- added ruby 2.0 support + ------------------------------------------------------------------- Mon Sep 8 11:02:50 UTC 2014 - mrueckert@suse.de diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 8925245..bf51806 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -15,6 +15,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %bcond_without gem2rpm_bootstrap +%bcond_with ruby18 +%bcond_with ruby19 +%bcond_with ruby20 +%bcond_with ruby21 %bcond_with ruby22 %bcond_with rubinius22 @@ -47,6 +51,7 @@ Patch3: 0004-openSUSE-template-fixes.patch Patch4: 0005-added-example-gem2rpm.yml.patch Patch5: 0006-properly-shorten-description-and-summary.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 Summary: Generate rpm specfiles from gems License: GPL-2.0+ Group: Development/Languages/Ruby @@ -65,6 +70,7 @@ The spec file tries to follow the gem as closely as possible %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %gem_build @@ -77,6 +83,7 @@ for i in %{buildroot}%{_docdir}/*rubygem-gem2rpm*/ ; do done %if %{with gem2rpm_bootstrap} +%if %{with ruby21} %package -n ruby2.1-rubygem-gem2rpm Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby @@ -130,6 +137,175 @@ fi %files -n ruby2.1-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.1.0/doc/gem2rpm-%{version} +%endif + +%if %{with ruby18} +%package -n ruby1.8-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +PreReq: update-alternatives + +%description -n ruby1.8-rubygem-gem2rpm +Generate source rpms and rpm spec files from a Ruby Gem. +The spec file tries to follow the gem as closely as possible + +%package -n ruby1.8-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby1.8-rubygem-gem2rpm = %{version} + +%description -n ruby1.8-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + + +%post -n ruby1.8-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby1.8 gem2rpm.ruby1.8 %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight} + +%preun -n ruby1.8-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby1.8-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.8-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby1.8 %{_bindir}/gem2rpm.ruby1.8-%{version} +fi + +%files -n ruby1.8-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby1.8-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby1.8-%{version} +%ghost %{_bindir}/gem2rpm.ruby1.8 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby1.8 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/1.8/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/1.8/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/1.8/specifications/gem2rpm-%{version}.gemspec + +%files -n ruby1.8-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/1.8/doc/gem2rpm-%{version} +%endif + +%if %{with ruby19} +%package -n ruby1.9-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +PreReq: update-alternatives + +%description -n ruby1.9-rubygem-gem2rpm +Generate source rpms and rpm spec files from a Ruby Gem. +The spec file tries to follow the gem as closely as possible + +%package -n ruby1.9-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby1.9-rubygem-gem2rpm = %{version} + +%description -n ruby1.9-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + + +%post -n ruby1.9-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby1.9 gem2rpm.ruby1.9 %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight} + +%preun -n ruby1.9-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby1.9-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.9-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby1.9 %{_bindir}/gem2rpm.ruby1.9-%{version} +fi + +%files -n ruby1.9-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby1.9-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby1.9-%{version} +%ghost %{_bindir}/gem2rpm.ruby1.9 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby1.9 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/1.9.1/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/1.9.1/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/1.9.1/specifications/gem2rpm-%{version}.gemspec + +%files -n ruby1.9-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/1.9.1/doc/gem2rpm-%{version} +%endif + +%if %{with ruby20} +%package -n ruby2.0-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +PreReq: update-alternatives + +%description -n ruby2.0-rubygem-gem2rpm +Generate source rpms and rpm spec files from a Ruby Gem. +The spec file tries to follow the gem as closely as possible + +%package -n ruby2.0-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby2.0-rubygem-gem2rpm = %{version} + +%description -n ruby2.0-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + + +%post -n ruby2.0-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby2.0 gem2rpm.ruby2.0 %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight} + +%preun -n ruby2.0-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.0-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.0-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby2.0 %{_bindir}/gem2rpm.ruby2.0-%{version} +fi + +%files -n ruby2.0-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby2.0-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby2.0-%{version} +%ghost %{_bindir}/gem2rpm.ruby2.0 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.0 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/2.0.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/2.0.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/2.0.0/specifications/gem2rpm-%{version}.gemspec + +%files -n ruby2.0-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/2.0.0/doc/gem2rpm-%{version} +%endif %if %{with ruby22} %package -n ruby2.2-rubygem-gem2rpm