Accepting request 129585 from openSUSE:Tools:Unstable
- add update-alternatives for ruby provided binaries - expand ruby19 gemspecs as provides automatically OBS-URL: https://build.opensuse.org/request/show/129585 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=47
This commit is contained in:
parent
9d8456859a
commit
9ab5cd3949
10
ruby.changes
10
ruby.changes
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 1 13:29:19 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
- add update-alternatives for ruby provided binaries
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 1 12:07:35 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
- expand ruby19 gemspecs as provides automatically
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 26 09:53:19 UTC 2012 - coolo@suse.com
|
Thu Jul 26 09:53:19 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
31
ruby.spec
31
ruby.spec
@ -27,10 +27,16 @@ Url: http://www.ruby-lang.org/
|
|||||||
Summary: An Interpreted Object-Oriented Scripting Language
|
Summary: An Interpreted Object-Oriented Scripting Language
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Ruby
|
Group: Development/Languages/Ruby
|
||||||
Requires: ruby19
|
BuildRequires: ruby-common
|
||||||
|
BuildRequires: ruby19-devel
|
||||||
|
BuildRequires: update-alternatives
|
||||||
|
%requires_eq ruby19
|
||||||
Provides: rubygems = 1.8.15
|
Provides: rubygems = 1.8.15
|
||||||
Obsoletes: rubygems < 1.8.15
|
Obsoletes: rubygems < 1.8.15
|
||||||
Requires: ruby-common >= 1.0
|
Requires: ruby-common >= 1.0
|
||||||
|
Requires: update-alternatives
|
||||||
|
|
||||||
|
%{expand:%(rpm -ql ruby19 | fgrep .gemspec | /usr/bin/ruby1.9 /usr/lib/rpm/rubygemsdeps.rb --provides | sed -e 's,^,Provides:,')}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Ruby is an interpreted scripting language for quick and easy
|
Ruby is an interpreted scripting language for quick and easy
|
||||||
@ -84,13 +90,32 @@ mkdir -p $RPM_BUILD_ROOT%_libdir
|
|||||||
ln -s %_libdir/libruby1.9.so $RPM_BUILD_ROOT%_libdir/libruby.so
|
ln -s %_libdir/libruby1.9.so $RPM_BUILD_ROOT%_libdir/libruby.so
|
||||||
install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby
|
install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby
|
||||||
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc
|
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc
|
||||||
export NO_BRP_STALE_LINK_ERROR=yes
|
|
||||||
|
%post
|
||||||
|
for bin in erb gem irb rake rdoc ri ruby testrb; do
|
||||||
|
/usr/sbin/update-alternatives --install \
|
||||||
|
%{_bindir}/$bin $bin %{_bindir}/$bin"1.9" 19
|
||||||
|
done
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ "$1" = 0 ] ; then
|
||||||
|
for bin in erb gem irb rake rdoc ri ruby testrb; do
|
||||||
|
/usr/sbin/update-alternatives --remove $bin %{_bindir}/$bin"1.9"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%config /etc/gemrc
|
%config /etc/gemrc
|
||||||
%config /etc/rpm/macros.ruby
|
%config /etc/rpm/macros.ruby
|
||||||
%{_bindir}/*
|
%ghost %{_bindir}/erb
|
||||||
|
%ghost %{_bindir}/gem
|
||||||
|
%ghost %{_bindir}/irb
|
||||||
|
%ghost %{_bindir}/rake
|
||||||
|
%ghost %{_bindir}/rdoc
|
||||||
|
%ghost %{_bindir}/ri
|
||||||
|
%ghost %{_bindir}/ruby
|
||||||
|
%ghost %{_bindir}/testrb
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user