From 299f65fe929fb91baf5677383b04e4dfd61c1625a5456cf2ee8f77da0546c896 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 24 Jun 2019 10:52:24 +0000 Subject: [PATCH] Accepting request 711581 from home:darix:apps - build without gem docs - added support for 2.7.0 OBS-URL: https://build.opensuse.org/request/show/711581 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=37 --- rubygem-gem2rpm.changes | 10 +++++ rubygem-gem2rpm.spec | 86 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 93 insertions(+), 3 deletions(-) diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index ad1fa93..21f8351 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Jun 23 02:24:56 UTC 2019 - Marcus Rueckert + +- build without gem docs + +------------------------------------------------------------------- +Sun Jun 23 02:12:56 UTC 2019 - Marcus Rueckert + +- added support for 2.7.0 + ------------------------------------------------------------------- Sat Feb 23 06:54:36 UTC 2019 - Stephan Kulow diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 1153b1f..ca36415 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -17,9 +17,11 @@ %bcond_without gem2rpm_bootstrap +%if 0%{?suse_version} && 0%{?suse_version} < 1315 %bcond_with ruby18 %bcond_with ruby19 %bcond_with ruby20 +%endif %bcond_with ruby21 %if ! (0%{?suse_version} == 1315) %bcond_with ruby22 @@ -28,6 +30,7 @@ %endif %bcond_with ruby25 %bcond_with ruby26 +%bcond_with ruby27 %bcond_with rubinius25 Name: rubygem-gem2rpm @@ -37,8 +40,6 @@ Release: 0 %define mod_full_name %{mod_name}-%{version} %define mod_branch -%{version} %define mod_weight 1001 -#define rb_build_versions %{rb_default_ruby} -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 %if %{with gem2rpm_bootstrap} @@ -136,7 +137,7 @@ perl -p -i -e 's|("templates/opensuse.spec.erb".freeze)|$1, "templates/gem_packa %gem_build %install -%gem_install -f --symlink-binaries --doc-files="AUTHORS LICENSE README" +%gem_install -f --no-rdoc --no-ri --symlink-binaries --doc-files="AUTHORS LICENSE README" for i in %{buildroot}%{_docdir}/*rubygem-gem2rpm*/ ; do install -m 0644 %{S:1} $i/gem2rpm.yml done @@ -194,10 +195,12 @@ fi %{_libdir}/ruby/gems/2.1.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.1.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.1-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.1.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby18} %package -n ruby1.8-rubygem-gem2rpm @@ -251,10 +254,12 @@ fi %{_libdir}/ruby/gems/1.8/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/1.8/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby1.8-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/1.8/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby19} %package -n ruby1.9-rubygem-gem2rpm @@ -308,10 +313,12 @@ fi %{_libdir}/ruby/gems/1.9.1/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/1.9.1/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby1.9-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/1.9.1/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby20} %package -n ruby2.0-rubygem-gem2rpm @@ -365,10 +372,12 @@ fi %{_libdir}/ruby/gems/2.0.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.0.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.0-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.0.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby22} %package -n ruby2.2-rubygem-gem2rpm @@ -422,10 +431,12 @@ fi %{_libdir}/ruby/gems/2.2.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.2.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.2-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.2.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby23} %package -n ruby2.3-rubygem-gem2rpm @@ -479,10 +490,12 @@ fi %{_libdir}/ruby/gems/2.3.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.3.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.3-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.3.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby24} %package -n ruby2.4-rubygem-gem2rpm @@ -536,10 +549,12 @@ fi %{_libdir}/ruby/gems/2.4.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.4.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.4-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.4.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby25} %package -n ruby2.5-rubygem-gem2rpm @@ -593,10 +608,12 @@ fi %{_libdir}/ruby/gems/2.5.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.5.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.5-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.5.0/doc/gem2rpm-%{version} %endif +%endif %if %{with ruby26} %package -n ruby2.6-rubygem-gem2rpm @@ -650,10 +667,71 @@ fi %{_libdir}/ruby/gems/2.6.0/gems/gem2rpm-%{version} %{_libdir}/ruby/gems/2.6.0/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n ruby2.6-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/ruby/gems/2.6.0/doc/gem2rpm-%{version} %endif +%endif + +%if %{with ruby27} +%package -n ruby2.7-rubygem-gem2rpm +Summary: Generate rpm specfiles from gems +Group: Development/Languages/Ruby +Requires(post): update-alternatives +Requires(preun): update-alternatives + +%description -n ruby2.7-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.7-rubygem-gem2rpm-doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: ruby2.7-rubygem-gem2rpm = %{version} + +%description -n ruby2.7-rubygem-gem2rpm-doc +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} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.7-%{version} %{mod_weight} +/usr/sbin/update-alternatives --install \ + %{_bindir}/gem2rpm.ruby2.7 gem2rpm.ruby2.7 %{_bindir}/gem2rpm.ruby2.7-%{version} %{mod_weight} + +%preun -n ruby2.7-rubygem-gem2rpm +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.7-%{version} + /usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.7-%{version} + /usr/sbin/update-alternatives --remove gem2rpm.ruby2.7 %{_bindir}/gem2rpm.ruby2.7-%{version} +fi + +%files -n ruby2.7-rubygem-gem2rpm +%defattr(-,root,root,-) +%{_docdir}/ruby2.7-rubygem-gem2rpm +#{_bindir}/gem2rpm-opensuse +%{_bindir}/gem2rpm.ruby2.7-%{version} +%ghost %{_bindir}/gem2rpm.ruby2.7 +%ghost %{_bindir}/gem2rpm-%{version} +%ghost %{_bindir}/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm +%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.7 +%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version} +# cache file +%{_libdir}/ruby/gems/2.7.0/cache/gem2rpm-%{version}.gem +%{_libdir}/ruby/gems/2.7.0/gems/gem2rpm-%{version} +%{_libdir}/ruby/gems/2.7.0/specifications/gem2rpm-%{version}.gemspec + +%if %{with docs} +%files -n ruby2.7-rubygem-gem2rpm-doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/2.7.0/doc/gem2rpm-%{version} +%endif +%endif %if %{with rubinius25} %package -n rbx2.5-rubygem-gem2rpm @@ -710,10 +788,12 @@ fi %{_libdir}/rubinius/gems/2.5/gems/gem2rpm-%{version} %{_libdir}/rubinius/gems/2.5/specifications/gem2rpm-%{version}.gemspec +%if %{with docs} %files -n rbx2.5-rubygem-gem2rpm-doc %defattr(-,root,root,-) %doc %{_libdir}/rubinius/gems/2.5/doc/gem2rpm-%{version} %endif +%endif %else %gem_packages %endif