diff options
Diffstat (limited to 'source/x/glew')
-rwxr-xr-x | source/x/glew/glew.SlackBuild | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/x/glew/glew.SlackBuild b/source/x/glew/glew.SlackBuild index d210557fb..5187bb76c 100755 --- a/source/x/glew/glew.SlackBuild +++ b/source/x/glew/glew.SlackBuild @@ -22,7 +22,8 @@ # Slackware build script for glew -VERSION=1.5.7 +PKGNAM=glew +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: @@ -39,7 +40,7 @@ NUMJOBS=${NUMJOBS:--j8} CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-glew +PKG=$TMP/package-$PKGNAM if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -58,9 +59,9 @@ fi rm -rf $PKG mkdir -p $TMP $PKG cd $TMP || exit 1 -rm -rf glew-$VERSION -tar xvf $CWD/glew-${VERSION}.tar.?z* || exit 1 -cd glew-${VERSION} || exit 1 +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-${VERSION}.tar.?z* || exit 1 +cd $PKGNAM-${VERSION} || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -83,13 +84,13 @@ make install GLEW_DEST=$PKG/usr || exit 1 xargs strip --strip-unneeded 2> /dev/null ) -mkdir -p $PKG/usr/doc/glew-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ LICENSE* README* doc/* \ - $PKG/usr/doc/glew-$VERSION + $PKG/usr/doc/$PKGNAM-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/glew-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz |