[packages/ruby/RUBY_1_8] add default_ruby bcond to be able to use this ruby as system default ruby
glen
glen at pld-linux.org
Tue Apr 30 10:30:04 CEST 2013
commit 189d37cf2852f239b50dd495e42afe684f5cc359
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Apr 30 11:27:59 2013 +0300
add default_ruby bcond to be able to use this ruby as system default ruby
ruby.spec | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/ruby.spec b/ruby.spec
index bf09612..a93d772 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -3,6 +3,7 @@
%bcond_without doc # skip generating docs (which is time-consuming). Intended for speed up test builds
%bcond_without emacs # skip building package with ruby-mode for emacs
%bcond_without tk # skip building package with Tk bindings
+%bcond_with default_ruby # use this Ruby as default system Ruby
%bcond_with onigurma
%if "%{pld_release}" == "th"
@@ -324,6 +325,11 @@ emacs --no-site-file -q -batch -l path.el -f batch-byte-compile $RPM_BUILD_ROOT%
rm -f path.el*
%endif
+%if %{with default_ruby}
+ln -s ruby%{ruby_suffix} $RPM_BUILD_ROOT%{_bindir}/ruby
+echo '.so man1/ruby%{ruby_suffix}.1' > $RPM_BUILD_ROOT%{_mandir}/man1/ruby.1
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -340,9 +346,15 @@ rm -rf $RPM_BUILD_ROOT
%doc README README.EXT ChangeLog ToDo
%attr(755,root,root) %{_bindir}/ruby%{ruby_suffix}
%attr(755,root,root) %{_libdir}/libruby%{ruby_suffix}.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libruby%{ruby_suffix}.so.1.8
+%attr(755,root,root) %ghost %{_libdir}/libruby%{ruby_suffix}.so.%{ruby_ver}
%{_mandir}/man1/ruby%{ruby_suffix}.1*
%{_infodir}/ruby.info*
+
+%if %{with default_ruby}
+%attr(755,root,root) %{_bindir}/ruby
+%{_mandir}/man1/ruby.1
+%endif
+
%dir %{_libdir}/ruby
%dir %{_libdir}/ruby/%{ruby_ver}
%dir %{_libdir}/ruby/%{ruby_ver}/*-linux*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby.git/commitdiff/176b90df792ca6fdf8ab18aa0f1c6192824e7264
More information about the pld-cvs-commit
mailing list