From bb63ee48ea4b274daf5dc030ceb4a84ca816f5a1da90d513c4aa1da7659189dd Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 9 Jul 2012 05:18:17 +0000 Subject: [PATCH] - rename $bin19 binaries to $bin OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=36 --- ruby.changes | 5 +++++ ruby.macros | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ruby.changes b/ruby.changes index 105364d..5923af7 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 9 05:17:40 UTC 2012 - coolo@suse.com + +- rename $bin19 binaries to $bin + ------------------------------------------------------------------- Wed Jul 4 08:59:02 UTC 2012 - saschpe@suse.de diff --git a/ruby.macros b/ruby.macros index 03e8044..0a02d8a 100644 --- a/ruby.macros +++ b/ruby.macros @@ -1,8 +1,7 @@ -%gem_install %{gem19_install} %rubygems_requires %{rubygems19_requires} %rb_binary %{rb19_binary} -%gem_binary /usr/bin/gem +%gem_binary /usr/bin/gem1.9 %rb_arch %{rb19_arch} %rb_ver %{rb19_ver} @@ -56,11 +55,20 @@ cd $GEMSPEC_SOURCE_DIR && %{gem_binary} build --verbose *.gemspec \ # %gem_install() \ if [ %# -ge 1 ]; then \ - %{gem_binary} install --verbose --local --build-root=%{buildroot} %* \ + %{gem_binary} install --verbose --local --build-root=%{buildroot} %* ;\ else \ GEM_FILE=`find . -maxdepth 2 -type f -name "%{mod_name}-%{version}.gem"` \ %{gem_binary} install --verbose --local --bindir %{buildroot}%{_bindir} --install-dir %{buildroot}%{_libdir}/ruby/gems/%{rb_ver} $GEM_FILE \ -fi \ +fi; \ +if test -d $RPM_BUILD_ROOT/usr/bin; then \ + cd $RPM_BUILD_ROOT/usr/bin; \ + bins=`ls -1 *1.9 2> /dev/null`; \ + if test -n "$bins"; then \ + for bin in $bins; do \ + mv -v $bin $(echo "$bin" | sed -e 's,1.9$,,'); \ + done ;\ + fi ;\ +fi ;\ %{nil} %gem_cleanup() \