From 9310761f86d7982224c0bc18befd300bd4ee4bd9632456ef4cd14515d6c8e91f Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Sun, 26 Dec 2021 19:57:02 +0000 Subject: [PATCH] - added support for 3.1.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=41 --- rubygem-gem2rpm.changes | 5 +++ rubygem-gem2rpm.spec | 99 ++++++++++++++++++++++++++++++----------- 2 files changed, 78 insertions(+), 26 deletions(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 76b0990..80bf6e5 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 26 19:56:42 UTC 2021 - Marcus Rueckert + +- added support for 3.1.0 + ------------------------------------------------------------------- Mon Sep 28 00:25:24 UTC 2020 - Marcus Rueckert diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index aea2e46..9a36d35 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rubygem-gem2rpm # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,7 @@ %bcond_with ruby26 %bcond_with ruby27 %bcond_with ruby30 +%bcond_with ruby31 %bcond_with rubinius25 Name: rubygem-gem2rpm @@ -91,7 +92,7 @@ Summary: Generate rpm specfiles from gems License: GPL-2.0-or-later Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description Generate source rpms and rpm spec files from a Ruby Gem. @@ -149,7 +150,7 @@ done Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.1-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -164,7 +165,6 @@ Requires: ruby2.1-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.1-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.1-%{version} %{mod_weight} @@ -208,7 +208,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby1.8-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -223,7 +223,6 @@ Requires: ruby1.8-rubygem-gem2rpm = %{version} 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} @@ -267,7 +266,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby1.9-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -282,7 +281,6 @@ Requires: ruby1.9-rubygem-gem2rpm = %{version} 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} @@ -326,7 +324,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.0-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -341,7 +339,6 @@ Requires: ruby2.0-rubygem-gem2rpm = %{version} 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} @@ -385,7 +382,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.2-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -400,7 +397,6 @@ Requires: ruby2.2-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.2-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.2-%{version} %{mod_weight} @@ -444,7 +440,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.3-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -459,7 +455,6 @@ Requires: ruby2.3-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.3-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight} @@ -503,7 +498,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.4-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -518,7 +513,6 @@ Requires: ruby2.4-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.4-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight} @@ -562,7 +556,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.5-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -577,7 +571,6 @@ Requires: ruby2.5-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.5-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.5-%{version} %{mod_weight} @@ -621,7 +614,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.6-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -636,7 +629,6 @@ Requires: ruby2.6-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.6-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.6-%{version} %{mod_weight} @@ -680,7 +672,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby2.7-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -695,7 +687,6 @@ Requires: ruby2.7-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby2.7-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.7-%{version} %{mod_weight} @@ -739,7 +730,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n ruby3.0-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -754,7 +745,6 @@ Requires: ruby3.0-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n ruby3.0-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby3.0-%{version} %{mod_weight} @@ -793,6 +783,64 @@ fi %endif %endif +%if %{with ruby31} +%package -n ruby3.1-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +Requires(post): update-alternatives +Requires(preun):update-alternatives + +%description -n ruby3.1-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.1-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby3.1-rubygem-gem2rpm = %{version} + +%description -n ruby3.1-rubygem-gem2rpm-doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + +%post -n ruby3.1-rubygem-gem2rpm +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby3.1-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.1-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby3.1 gem2rpm.ruby3.1 %{_bindir}/gem2rpm.ruby3.1-%{version} %{mod_weight} + +%preun -n ruby3.1-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby3.1-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby3.1-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby3.1 %{_bindir}/gem2rpm.ruby3.1-%{version} +fi + +%files -n ruby3.1-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby3.1-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby3.1-%{version} +%ghost %{_bindir}/gem2rpm.ruby3.1 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby3.1 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/3.1.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/3.1.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/3.1.0/specifications/gem2rpm-%{version}.gemspec + +%if %{with docs} +%files -n ruby3.1-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/3.1.0/doc/gem2rpm-%{version} +%endif +%endif + %if %{with rubinius25} %package -n rbx2.5-rubygem-gem2rpm # MANUAL @@ -800,7 +848,7 @@ fi Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives %description -n rbx2.5-rubygem-gem2rpm Generate source rpms and rpm spec files from a Ruby Gem. @@ -815,7 +863,6 @@ Requires: rbx2.5-rubygem-gem2rpm = %{version} Documentation generated at gem installation time. Usually in RDoc and RI formats. - %post -n rbx2.5-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ /usr/bin/gem2rpm gem2rpm /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight}