From 1ee0b3e4a056692c210abcf0dd2d0914ea4b895ee57c75e2116f4dd616b5737f Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 11 Nov 2022 17:22:59 +0000 Subject: [PATCH 1/2] - added support for 3.2.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=42 --- rubygem-gem2rpm.changes | 5 ++++ rubygem-gem2rpm.spec | 61 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 80bf6e5..77a6ab9 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 11 17:22:10 UTC 2022 - Marcus Rueckert + +- added support for 3.2.0 + ------------------------------------------------------------------- Sun Dec 26 19:56:42 UTC 2021 - Marcus Rueckert diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 9a36d35..647511c 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rubygem-gem2rpm # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,6 +33,7 @@ %bcond_with ruby27 %bcond_with ruby30 %bcond_with ruby31 +%bcond_with ruby32 %bcond_with rubinius25 Name: rubygem-gem2rpm @@ -841,6 +842,64 @@ fi %endif %endif +%if %{with ruby32} +%package -n ruby3.2-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +Requires(post): update-alternatives +Requires(preun):update-alternatives + +%description -n ruby3.2-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.2-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby3.2-rubygem-gem2rpm = %{version} + +%description -n ruby3.2-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + +%post -n ruby3.2-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby3.2-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.2-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby3.2 gem2rpm.ruby3.2 %{_bindir}/gem2rpm.ruby3.2-%{version} %{mod_weight} + +%preun -n ruby3.2-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby3.2-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.2-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby3.2 %{_bindir}/gem2rpm.ruby3.2-%{version} +fi + +%files -n ruby3.2-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby3.2-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby3.2-%{version} +%ghost %{_bindir}/gem2rpm.ruby3.2 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby3.2 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/3.2.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/3.2.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/3.2.0/specifications/gem2rpm-%{version}.gemspec + +%if %{with docs} +%files -n ruby3.2-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/3.2.0/doc/gem2rpm-%{version} +%endif +%endif + %if %{with rubinius25} %package -n rbx2.5-rubygem-gem2rpm # MANUAL From f91393272b1c31faf77b9c5beb0ab51a661cc3acec8f29e540537d71e2784134 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 17 Nov 2022 12:00:58 +0000 Subject: [PATCH 2/2] - Fix filelist for 3.2.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=43 --- rubygem-gem2rpm.changes | 5 +++++ rubygem-gem2rpm.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 77a6ab9..6f2ec96 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 17 12:00:27 UTC 2022 - Marcus Rueckert + +- Fix filelist for 3.2.0 + ------------------------------------------------------------------- Fri Nov 11 17:22:10 UTC 2022 - Marcus Rueckert diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 647511c..b512a3b 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -889,14 +889,14 @@ fi %ghost %{_sysconfdir}/alternatives/gem2rpm.ruby3.2 %ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} # cache file -%{_libdir}/ruby/gems/3.2.0/cache/gem2rpm-%{version}.gem -%{_libdir}/ruby/gems/3.2.0/gems/gem2rpm-%{version} -%{_libdir}/ruby/gems/3.2.0/specifications/gem2rpm-%{version}.gemspec +%{_libdir}/ruby/gems/3.2.0+3/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/3.2.0+3/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/3.2.0+3/specifications/gem2rpm-%{version}.gemspec %if %{with docs} %files -n ruby3.2-rubygem-gem2rpm-doc %defattr(-,root,root,-) -%doc %{_libdir}/ruby/gems/3.2.0/doc/gem2rpm-%{version} +%doc %{_libdir}/ruby/gems/3.2.0+3/doc/gem2rpm-%{version} %endif %endif