From d267036e22a1b43ddfb2c1b25b0b70cb8616f824180696076ab4b76030a3c6e1 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 11 Nov 2015 23:40:09 +0000 Subject: [PATCH] - remove the rubinius 2.2 support - add support for rubinius 2.5 and ruby 2.3 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=14 --- rubygem-gem2rpm.changes | 6 +++ rubygem-gem2rpm.spec | 107 ++++++++++++++++++++++++++++++---------- 2 files changed, 88 insertions(+), 25 deletions(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 6b551bb..19868dd 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 11 23:34:13 UTC 2015 - mrueckert@suse.de + +- remove the rubinius 2.2 support +- add support for rubinius 2.5 and ruby 2.3 + ------------------------------------------------------------------- Thu Apr 16 22:04:44 UTC 2015 - mrueckert@suse.de diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 620681c..78217d2 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -22,7 +22,8 @@ %bcond_with ruby20 %bcond_with ruby21 %bcond_with ruby22 -%bcond_with rubinius22 +%bcond_with ruby23 +%bcond_with rubinius25 Name: rubygem-gem2rpm Version: 0.10.1 @@ -380,63 +381,119 @@ fi %doc %{_libdir}/ruby/gems/2.2.0/doc/gem2rpm-%{version} %endif -%if %{with rubinius22} -%package -n rbx2.2-rubygem-gem2rpm +%if %{with ruby23} +%package -n ruby2.3-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +PreReq: update-alternatives + +%description -n ruby2.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 ruby2.3-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby2.3-rubygem-gem2rpm = %{version} + +%description -n ruby2.3-rubygem-gem2rpm-doc +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} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby2.3 gem2rpm.ruby2.3 %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight} + +%preun -n ruby2.3-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.3-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.3-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby2.3 %{_bindir}/gem2rpm.ruby2.3-%{version} +fi + +%files -n ruby2.3-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby2.3-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby2.3-%{version} +%ghost %{_bindir}/gem2rpm.ruby2.3 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.3 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/2.3.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/2.3.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/2.3.0/specifications/gem2rpm-%{version}.gemspec + +%files -n ruby2.3-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/2.3.0/doc/gem2rpm-%{version} +%endif + +%if %{with rubinius25} +%package -n rbx2.5-rubygem-gem2rpm # MANUAL # /MANUAL Summary: Generate rpm specfiles from gems Group: Development/Languages/Ruby PreReq: update-alternatives -%description -n rbx2.2-rubygem-gem2rpm +%description -n rbx2.5-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 rbx2.2-rubygem-gem2rpm-doc +%package -n rbx2.5-rubygem-gem2rpm-doc Summary: RDoc documentation for gem2rpm Group: Development/Languages/Ruby -Requires: rbx2.2-rubygem-gem2rpm = %{version} +Requires: rbx2.5-rubygem-gem2rpm = %{version} -%description -n rbx2.2-rubygem-gem2rpm-doc +%description -n rbx2.5-rubygem-gem2rpm-doc Documentation generated at gem installation time. Usually in RDoc and RI formats. -%post -n rbx2.2-rubygem-gem2rpm +%post -n rbx2.5-rubygem-gem2rpm /usr/sbin/update-alternatives --install \ - /usr/bin/gem2rpm gem2rpm /usr/bin/gem2rpm.rbx2.2-%{version} %{mod_weight} + /usr/bin/gem2rpm gem2rpm /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight} /usr/sbin/update-alternatives --install \ - /usr/bin/gem2rpm-%{version} gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.2-%{version} %{mod_weight} + /usr/bin/gem2rpm-%{version} gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight} /usr/sbin/update-alternatives --install \ - /usr/bin/gem2rpm.rbx2.2 gem2rpm.rbx2.2 /usr/bin/gem2rpm.rbx2.2-%{version} %{mod_weight} + /usr/bin/gem2rpm.rbx2.5 gem2rpm.rbx2.5 /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight} -%preun -n rbx2.2-rubygem-gem2rpm +%preun -n rbx2.5-rubygem-gem2rpm if [ "$1" = 0 ] ; then - /usr/sbin/update-alternatives --remove gem2rpm /usr/bin/gem2rpm.rbx2.2-%{version} - /usr/sbin/update-alternatives --remove gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.2-%{version} - /usr/sbin/update-alternatives --remove gem2rpm.rbx2.2 /usr/bin/gem2rpm.rbx2.2-%{version} + /usr/sbin/update-alternatives --remove gem2rpm /usr/bin/gem2rpm.rbx2.5-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.5-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.rbx2.5 /usr/bin/gem2rpm.rbx2.5-%{version} fi -%files -n rbx2.2-rubygem-gem2rpm +%files -n rbx2.5-rubygem-gem2rpm %defattr(-,root,root,-) # MANUAL # /MANUAL -/usr/share/doc/packages/rbx2.2-rubygem-gem2rpm -%{_bindir}/gem2rpm.rbx2.2-%{version} -%ghost %{_bindir}/gem2rpm.rbx2.2 +/usr/share/doc/packages/rbx2.5-rubygem-gem2rpm +%{_bindir}/gem2rpm.rbx2.5-%{version} +%ghost %{_bindir}/gem2rpm.rbx2.5 %ghost %{_bindir}/gem2rpm-%{version} %ghost %{_bindir}/gem2rpm %ghost /etc/alternatives/gem2rpm -%ghost /etc/alternatives/gem2rpm.rbx2.2 +%ghost /etc/alternatives/gem2rpm.rbx2.5 %ghost /etc/alternatives/gem2rpm-%{version} # cache file -%{_libdir}/rubinius/gems/2.2/cache/gem2rpm-%{version}.gem -%{_libdir}/rubinius/gems/2.2/gems/gem2rpm-%{version} -%{_libdir}/rubinius/gems/2.2/specifications/gem2rpm-%{version}.gemspec +%{_libdir}/rubinius/gems/2.5/cache/gem2rpm-%{version}.gem +%{_libdir}/rubinius/gems/2.5/gems/gem2rpm-%{version} +%{_libdir}/rubinius/gems/2.5/specifications/gem2rpm-%{version}.gemspec -%files -n rbx2.2-rubygem-gem2rpm-doc +%files -n rbx2.5-rubygem-gem2rpm-doc %defattr(-,root,root,-) -%doc %{_libdir}/rubinius/gems/2.2/doc/gem2rpm-%{version} +%doc %{_libdir}/rubinius/gems/2.5/doc/gem2rpm-%{version} %endif %else %gem_packages