Accepting request 181438 from devel:languages:ruby

- change too strict ruby20 requires with _ge

- use update-alternatives the right way - which is portable too

- remove --force usage in favor of portable rm (SLE11)

OBS-URL: https://build.opensuse.org/request/show/181438
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ruby?expand=0&rev=45
This commit is contained in:
Stephan Kulow 2013-07-03 14:53:12 +00:00 committed by Git OBS Bridge
commit b0f815da31
2 changed files with 41 additions and 16 deletions

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Sat Jun 29 12:38:12 UTC 2013 - coolo@suse.com
- change too strict ruby20 requires with _ge
-------------------------------------------------------------------
Wed Jun 26 15:01:32 UTC 2013 - coolo@suse.com
- use update-alternatives the right way - which is portable too
-------------------------------------------------------------------
Tue Jun 25 09:02:48 UTC 2013 - coolo@suse.com
- remove --force usage in favor of portable rm (SLE11)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 4 17:04:50 UTC 2013 - coolo@suse.com Tue Jun 4 17:04:50 UTC 2013 - coolo@suse.com

View File

@ -32,7 +32,7 @@ BuildRequires: ruby20-devel
BuildRequires: update-alternatives BuildRequires: update-alternatives
#!BuildIgnore: ruby ruby-devel #!BuildIgnore: ruby ruby-devel
#!BuildIgnore: rubygems #!BuildIgnore: rubygems
%requires_eq ruby20 %requires_ge ruby20
Provides: rubygems = 1.8.15 Provides: rubygems = 1.8.15
Obsoletes: rubygems < 1.8.15 Obsoletes: rubygems < 1.8.15
Requires: update-alternatives Requires: update-alternatives
@ -83,18 +83,20 @@ Development files to link against Ruby.
%build %build
%install %install
mkdir -p $RPM_BUILD_ROOT%_bindir mkdir -p %{buildroot}%_bindir %{buildroot}%{_sysconfdir}/alternatives
for bin in erb gem irb rake rdoc ri ruby testrb; do for bin in erb gem irb rake rdoc ri ruby testrb; do
ln -s %_bindir/"$bin"2.0 $RPM_BUILD_ROOT%_bindir/$bin # dummy
touch %{buildroot}%{_sysconfdir}/alternatives/$bin
ln -s %{_sysconfdir}/alternatives/$bin %{buildroot}%_bindir/$bin
done done
mkdir -p $RPM_BUILD_ROOT%_libdir mkdir -p %{buildroot}%_libdir
ln -s %_libdir/libruby2.0.so $RPM_BUILD_ROOT%_libdir/libruby.so ln -s %_libdir/libruby2.0.so %{buildroot}%_libdir/libruby.so
install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby install -D -m 0644 %{S:0} %{buildroot}/etc/rpm/macros.ruby
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc install -D -m 0644 %{S:2} %{buildroot}/etc/gemrc
%post %post
for bin in erb gem irb rake rdoc ri ruby testrb; do for bin in erb gem irb rake rdoc ri ruby testrb; do
/usr/sbin/update-alternatives --force --install \ /usr/sbin/update-alternatives --install \
%{_bindir}/$bin $bin %{_bindir}/$bin"2.0" 20 %{_bindir}/$bin $bin %{_bindir}/$bin"2.0" 20
done done
@ -109,14 +111,22 @@ fi
%defattr(-,root,root) %defattr(-,root,root)
%config /etc/gemrc %config /etc/gemrc
%config /etc/rpm/macros.ruby %config /etc/rpm/macros.ruby
%ghost %{_bindir}/erb %ghost %_sysconfdir/alternatives/erb
%ghost %{_bindir}/gem %{_bindir}/erb
%ghost %{_bindir}/irb %ghost %_sysconfdir/alternatives/gem
%ghost %{_bindir}/rake %{_bindir}/gem
%ghost %{_bindir}/rdoc %ghost %_sysconfdir/alternatives/irb
%ghost %{_bindir}/ri %{_bindir}/irb
%ghost %{_bindir}/ruby %ghost %_sysconfdir/alternatives/rake
%ghost %{_bindir}/testrb %{_bindir}/rake
%ghost %_sysconfdir/alternatives/rdoc
%{_bindir}/rdoc
%ghost %_sysconfdir/alternatives/ri
%{_bindir}/ri
%ghost %_sysconfdir/alternatives/ruby
%{_bindir}/ruby
%ghost %_sysconfdir/alternatives/testrb
%{_bindir}/testrb
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)