summaryrefslogtreecommitdiff
path: root/system/rubygems/rubygems.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/rubygems/rubygems.SlackBuild')
-rw-r--r--system/rubygems/rubygems.SlackBuild23
1 files changed, 16 insertions, 7 deletions
diff --git a/system/rubygems/rubygems.SlackBuild b/system/rubygems/rubygems.SlackBuild
index 5ebc534c39..f35cd54fc6 100644
--- a/system/rubygems/rubygems.SlackBuild
+++ b/system/rubygems/rubygems.SlackBuild
@@ -4,7 +4,7 @@
# Written by Vincent Batts, vbatts@batts.mine.nu
PRGNAM=rubygems
-VERSION=1.3.1
+VERSION=1.3.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,10 +16,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -37,17 +40,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-GEM_HOME=$PKG/usr/lib/ruby/gems/1.8 \
- ruby setup.rb --destdir=$PKG/usr
+GEM_HOME=$PKG/usr/lib${LIBDIRSUFFIX}/ruby/gems/1.8 \
+ ruby setup.rb --destdir=$PKG/
# Setting global GEM_PATH to get rdoc correct for gems installed
mkdir -p $PKG/etc/profile.d/
-cat $CWD/profile.d/gem.sh > $PKG/etc/profile.d/gem.sh
-cat $CWD/profile.d/gem.csh > $PKG/etc/profile.d/gem.csh
-chmod 755 $PKG/etc/profile.d/gem.sh $PKG/etc/profile.d/gem.csh
+cat << EOF > $PKG/etc/profile.d/gem.sh
+#!/bin/sh
+export GEM_PATH=/usr/lib${LIBDIRSUFFIX}/ruby/gems/1.8
+EOF
+cat << EOF > $PKG/etc/profile.d/gem.csh
+#!/bin/csh
+setenv GEM_PATH /usr/lib${LIBDIRSUFFIX}/ruby/gems/1.8
+EOF
+chmod 0755 $PKG/etc/profile.d/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README ChangeLog LICENSE.txt TODO GPL.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README ChangeLog LICENSE.txt GPL.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install