From bf3ad1430f795625c52d06a7024dec1abe1660aeccb3fa40ae7f44d0ead06372 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 14 Sep 2023 14:57:10 +0000 Subject: [PATCH 1/2] - enable building for ruby 3.3 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=55 --- rubygem-gem2rpm.changes | 5 ++++ rubygem-gem2rpm.spec | 59 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 22e8d95..3202d13 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 14 14:57:00 UTC 2023 - Marcus Rueckert + +- enable building for ruby 3.3 + ------------------------------------------------------------------- Mon May 8 19:40:38 UTC 2023 - Software System diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 98a27c4..ec53919 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -34,6 +34,7 @@ %bcond_with ruby30 %bcond_with ruby31 %bcond_with ruby32 +%bcond_with ruby33 %bcond_with rubinius25 Name: rubygem-gem2rpm @@ -903,6 +904,64 @@ fi %endif %endif +%if %{with ruby33} +%package -n ruby3.3-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +Requires(post): update-alternatives +Requires(preun):update-alternatives + +%description -n ruby3.3-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 ruby3.3-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby3.3-rubygem-gem2rpm = %{version} + +%description -n ruby3.3-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + +%post -n ruby3.3-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby3.3-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.3-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby3.3 gem2rpm.ruby3.3 %{_bindir}/gem2rpm.ruby3.3-%{version} %{mod_weight} + +%preun -n ruby3.3-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby3.3-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.3-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby3.3 %{_bindir}/gem2rpm.ruby3.3-%{version} +fi + +%files -n ruby3.3-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby3.3-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby3.3-%{version} +%ghost %{_bindir}/gem2rpm.ruby3.3 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby3.3 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/3.3.0+0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/3.3.0+0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/3.3.0+0/specifications/gem2rpm-%{version}.gemspec + +%if %{with docs} +%files -n ruby3.3-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/3.3.0+0/doc/gem2rpm-%{version} +%endif +%endif + %if %{with rubinius25} %package -n rbx2.5-rubygem-gem2rpm # MANUAL From 40714c2988d992bdcd55c931b0382d859918349be8be9ffeaed40742a8390caf Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 25 Dec 2023 07:20:05 +0000 Subject: [PATCH 2/2] update to ruby 3.3 final OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=56 --- rubygem-gem2rpm.changes | 6 ++++++ rubygem-gem2rpm.spec | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 3202d13..853b9ca 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 25 07:15:47 UTC 2023 - Marcus Rueckert + +- Update the ruby ABI version in the 3.3.0 paths to the final + string. + ------------------------------------------------------------------- Thu Sep 14 14:57:00 UTC 2023 - Marcus Rueckert diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index ec53919..c231545 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -951,14 +951,14 @@ fi %ghost %{_sysconfdir}/alternatives/gem2rpm.ruby3.3 %ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} # cache file -%{_libdir}/ruby/gems/3.3.0+0/cache/gem2rpm-%{version}.gem -%{_libdir}/ruby/gems/3.3.0+0/gems/gem2rpm-%{version} -%{_libdir}/ruby/gems/3.3.0+0/specifications/gem2rpm-%{version}.gemspec +%{_libdir}/ruby/gems/3.3.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/3.3.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/3.3.0/specifications/gem2rpm-%{version}.gemspec %if %{with docs} %files -n ruby3.3-rubygem-gem2rpm-doc %defattr(-,root,root,-) -%doc %{_libdir}/ruby/gems/3.3.0+0/doc/gem2rpm-%{version} +%doc %{_libdir}/ruby/gems/3.3.0/doc/gem2rpm-%{version} %endif %endif