summaryrefslogtreecommitdiff
path: root/development/love-legacy080/love-legacy080.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-05-01 09:21:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-05-01 09:21:34 +0700
commit4f5d79d6588be7ae859d91c9347c254f1e0f4290 (patch)
treeeffac195efca774501260e71e077a79aa999c459 /development/love-legacy080/love-legacy080.SlackBuild
parent259b9fe7868740ce67406f0de8690964db9ec35f (diff)
downloadslackbuilds-4f5d79d6588be7ae859d91c9347c254f1e0f4290.tar.gz
development/love-legacy080: Added (2D game development framework).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/love-legacy080/love-legacy080.SlackBuild')
-rw-r--r--development/love-legacy080/love-legacy080.SlackBuild86
1 files changed, 86 insertions, 0 deletions
diff --git a/development/love-legacy080/love-legacy080.SlackBuild b/development/love-legacy080/love-legacy080.SlackBuild
new file mode 100644
index 0000000000..a152b36f6e
--- /dev/null
+++ b/development/love-legacy080/love-legacy080.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# Slackware build script for LÖVE (legacy 0.8 version)
+
+# Written by Dugan Chen (thedoogster [at] gmail [dot] com)
+
+# Modified for 0.8.0 legacy version by B. Watson (yalhcru@gmail.com)
+
+# If you're packaging up a LÖVE game that needs this version (won't work
+# with 0.9.x), make sure the shebang line in the .love file says:
+# #!/usr/bin/env love-0.8.0
+# See mari0.SlackBuild for an example.
+
+PRGNAM=love-legacy080
+VERSION=${VERSION:-0.8.0}
+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
+ 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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+SRCNAM=love
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION-linux-src.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --program-suffix=-0.8.0 \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a changes.txt license.txt readme.md $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}