diff options
author | Andres Fuentes <rafu@riseup.net> | 2010-12-10 00:01:53 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-01-02 00:21:10 -0600 |
commit | cbe3aeb7546079f272faaff3bfda668bc635d958 (patch) | |
tree | 1efbc8eaaa5b66778688c0e984f40e3c811dd8b8 /development/mtasc/mtasc.SlackBuild | |
parent | bf4727e8be20b37f6405367f972a94527c9f088f (diff) | |
download | slackbuilds-cbe3aeb7546079f272faaff3bfda668bc635d958.tar.gz |
development/mtasc: Added (free ActionScript 2 compiler)
I did quite a bit of tweaking on this one before merging
it, primarily putting it in its own subdirectory of /opt,
so if it doesn't work, you should probably blame me as
opposed to the submitter/maintainer.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/mtasc/mtasc.SlackBuild')
-rw-r--r-- | development/mtasc/mtasc.SlackBuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/development/mtasc/mtasc.SlackBuild b/development/mtasc/mtasc.SlackBuild new file mode 100644 index 0000000000..b3ea4d17f5 --- /dev/null +++ b/development/mtasc/mtasc.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +# Slackware build script for MTASC + +# Written by Andres Fuentes (rafu@riseup.net) +# This script is public domain + +# Modified by Robby Workman <rworkman@slackbuilds.org> + +PRGNAM=mtasc +VERSION=${VERSION:-1.15} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SRCTAR="$PRGNAM-$VERSION-linux.tgz" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SRCTAR="$PRGNAM-$VERSION-linux-$ARCH.tgz" + LIBDIRSUFFIX="64" +else + printf "\n$ARCH is not supported.\n\n" ; exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $PKG/opt/$PRGNAM $OUTPUT +tar xvf $CWD/$SRCTAR -C $PKG/opt/$PRGNAM + +chown -R root:root $PKG +find $PKG \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +mkdir -p $PKG/etc/profile.d/ +cat << EOF > $PKG/etc/profile.d/mtasc.sh +#!/bin/sh +export PATH="\${PATH}:/opt/mtasc" +EOF +cat << EOF > $PKG/etc/profile.d/mtasc.csh +#!/bin/csh +setenv PATH \${PATH}:/opt/mtasc +EOF + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/opt/$PRGNAM/*.txt $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.${PKGTYPE:-tgz} |