Accepting request 221227 from OBS:Server:Unstable
- reintroduce update-alternatives for rake,rdoc and ri as those can come from more uptodate gems OBS-URL: https://build.opensuse.org/request/show/221227 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=73
This commit is contained in:
parent
b81ea6e4c8
commit
2106091d7a
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 7 12:05:32 UTC 2014 - coolo@suse.com
|
||||||
|
|
||||||
|
- reintroduce update-alternatives for rake,rdoc and ri as those
|
||||||
|
can come from more uptodate gems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 1 11:51:30 UTC 2014 - coolo@suse.com
|
Sat Feb 1 11:51:30 UTC 2014 - coolo@suse.com
|
||||||
|
|
||||||
|
29
ruby.spec
29
ruby.spec
@ -92,6 +92,8 @@ Conflicts: ruby18
|
|||||||
Conflicts: ruby19
|
Conflicts: ruby19
|
||||||
Conflicts: ruby20
|
Conflicts: ruby20
|
||||||
Requires: ruby-stdlib
|
Requires: ruby-stdlib
|
||||||
|
PreReq: update-alternatives
|
||||||
|
BuildRequires: update-alternatives
|
||||||
|
|
||||||
Provides: ruby-macros = %{rpm_macros_version}
|
Provides: ruby-macros = %{rpm_macros_version}
|
||||||
|
|
||||||
@ -336,6 +338,27 @@ install -D -m 0755 %{S:6} $RPM_BUILD_ROOT/usr/lib/rpm/gem_install.sh
|
|||||||
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT/usr/lib/rpm/gem_build_cleanup.sh
|
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT/usr/lib/rpm/gem_build_cleanup.sh
|
||||||
install -D -m 0755 %{S:7} $RPM_BUILD_ROOT/usr/lib/rpm/generate_buildrequires.sh
|
install -D -m 0755 %{S:7} $RPM_BUILD_ROOT/usr/lib/rpm/generate_buildrequires.sh
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
|
for bin in rake rdoc ri; do
|
||||||
|
# dummy
|
||||||
|
touch %{buildroot}%{_sysconfdir}/alternatives/$bin
|
||||||
|
mv %{buildroot}%_bindir/$bin %{buildroot}%_bindir/$bin.ruby
|
||||||
|
ln -s %{_sysconfdir}/alternatives/$bin %{buildroot}%_bindir/$bin
|
||||||
|
done
|
||||||
|
|
||||||
|
%post
|
||||||
|
for bin in rake rdoc ri; do
|
||||||
|
/usr/sbin/update-alternatives --install \
|
||||||
|
%{_bindir}/$bin $bin %{_bindir}/$bin.ruby 2
|
||||||
|
done
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ "$1" = 0 ] ; then
|
||||||
|
for bin in rake rdoc ri; do
|
||||||
|
/usr/sbin/update-alternatives --remove $bin %{_bindir}/$bin.ruby
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
%if 0%{?run_tests}
|
%if 0%{?run_tests}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -353,6 +376,9 @@ make check V=1 ||:
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%config(noreplace) /etc/rpm/macros.ruby
|
%config(noreplace) /etc/rpm/macros.ruby
|
||||||
|
%ghost %{_sysconfdir}/alternatives/rake
|
||||||
|
%ghost %{_sysconfdir}/alternatives/rdoc
|
||||||
|
%ghost %{_sysconfdir}/alternatives/ri
|
||||||
%{_bindir}/erb
|
%{_bindir}/erb
|
||||||
%{_bindir}/gem
|
%{_bindir}/gem
|
||||||
%{_bindir}/irb
|
%{_bindir}/irb
|
||||||
@ -361,6 +387,9 @@ make check V=1 ||:
|
|||||||
%{_bindir}/ri
|
%{_bindir}/ri
|
||||||
%{_bindir}/ruby
|
%{_bindir}/ruby
|
||||||
%{_bindir}/testrb
|
%{_bindir}/testrb
|
||||||
|
%{_bindir}/rake.ruby
|
||||||
|
%{_bindir}/rdoc.ruby
|
||||||
|
%{_bindir}/ri.ruby
|
||||||
%if 0%{?tk_version_supported} > 0
|
%if 0%{?tk_version_supported} > 0
|
||||||
%exclude %{rb_libdir}/multi-tk.rb
|
%exclude %{rb_libdir}/multi-tk.rb
|
||||||
%exclude %{rb_libdir}/remote-tk.rb
|
%exclude %{rb_libdir}/remote-tk.rb
|
||||||
|
Loading…
Reference in New Issue
Block a user