summaryrefslogtreecommitdiff
path: root/network/js/js.SlackBuild
diff options
context:
space:
mode:
authorDavid Woodfall <dave@unrealize.co.uk>2010-05-13 00:36:51 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:36:51 +0200
commit1649a3172daf21c387d09a3a75e741d76c694328 (patch)
tree467f213f90a4b3f0aa4d2ddc9bf60801c03dd23c /network/js/js.SlackBuild
parentf93704664eb83e78a0157e045ee607df8998fc3b (diff)
downloadslackbuilds-1649a3172daf21c387d09a3a75e741d76c694328.tar.gz
network/js: Updated for version 1.8.0_rc1
Diffstat (limited to 'network/js/js.SlackBuild')
-rw-r--r--network/js/js.SlackBuild38
1 files changed, 19 insertions, 19 deletions
diff --git a/network/js/js.SlackBuild b/network/js/js.SlackBuild
index aebc298c0e..a898e1e4f8 100644
--- a/network/js/js.SlackBuild
+++ b/network/js/js.SlackBuild
@@ -10,11 +10,13 @@
# me if you make any nice improvements.
PRGNAM=js
-VERSION=${VERSION:-1.7.0}
+VERSION=${VERSION:-1.8.0_rc1}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRC_VERSION=$(echo $VERSION | tr _ -)
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -22,22 +24,28 @@ 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 # Exit on most errors
+CFLAGS="$SLKCFLAGS"
+CXXFLAGS="$SLKCFLAGS"
+XLDFLAGS="-s"
+OPTIMIZER="$SLKCFLAGS"
-SOURCE=$TMP/$PRGNAM # For convenience
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SOURCE
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $SOURCE
+rm -rf $PRGNAM
+tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.gz
+cd $PRGNAM
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
find . \
@@ -46,20 +54,16 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Dynamic linking patch
patch -p1 < $CWD/dynamic-link.patch
-# Set some flags
-CFLAGS="$SLKCFLAGS" ; export CFLAGS
-CXXFLAGS="$SLKCFLAGS" ; export CXXFLAGS
-XLDFLAGS="-s" ; export XLDFLAGS
-OPTIMIZER="$SLKCFLAGS" ; export OPTIMIZER
-
cd src
gmake -f Makefile.ref all export BUILD_OPT=1
+
mv -v ../../dist $PKG/usr
-unset CFLAGS CXXFLAGS XLDFLAGS OPTIMIZER
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp ../README README.html $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
@@ -68,12 +72,8 @@ unset CFLAGS CXXFLAGS XLDFLAGS OPTIMIZER
xargs strip --strip-unneeded 2> /dev/null
)
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp ../README README.html $PKG/usr/doc/$PRGNAM-$VERSION/
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}