2021-07-03 19:48:15 +02:00
|
|
|
#!/bin/bash
|
2014-04-10 14:15:01 +02:00
|
|
|
|
|
|
|
# Slackware build script for LÖVE (legacy 0.7 version)
|
|
|
|
|
|
|
|
# Originally written by Dugan Chen (thedoogster [at] gmail [dot] com)
|
|
|
|
|
2022-06-08 18:26:57 +02:00
|
|
|
# Modified for 0.7.2 legacy version by B. Watson (urchlay@slackware.uk)
|
2014-04-10 14:15:01 +02:00
|
|
|
|
2021-09-03 20:23:58 +02:00
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2014-04-10 14:15:01 +02:00
|
|
|
# If you're packaging up a LÖVE game that needs this version (won't work
|
|
|
|
# with 0.8), make sure the shebang line in the .love file says:
|
|
|
|
# #!/usr/bin/env love-0.7.2
|
|
|
|
# See notpacman.SlackBuild for an example.
|
|
|
|
|
2021-09-03 20:23:58 +02:00
|
|
|
# 20210903 bkw: fix build for current/pre15, BUILD=2
|
|
|
|
|
2021-07-04 11:41:06 +02:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2014-04-10 14:15:01 +02:00
|
|
|
PRGNAM=love-legacy072
|
|
|
|
VERSION=${VERSION:-0.7.2}
|
2021-09-03 20:23:58 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2014-04-10 14:15:01 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 12:23:38 +02:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2014-04-10 14:15:01 +02:00
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2016-08-19 10:59:33 +02:00
|
|
|
i?86) ARCH=i586 ;;
|
2014-04-10 14:15:01 +02:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2021-07-04 12:23:38 +02:00
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2014-04-10 14:15:01 +02:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2016-08-19 10:59:33 +02:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
2014-04-10 14:15:01 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
# There's a dirty joke here somewhere...
|
|
|
|
SRCNAM=love
|
|
|
|
SRCVER=HEAD
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $SRCNAM-$SRCVER
|
|
|
|
tar xvf $CWD/$SRCNAM-$VERSION-linux-src.tar.gz
|
|
|
|
cd $SRCNAM-$SRCVER
|
|
|
|
chown -R root:root .
|
2021-09-03 20:23:58 +02:00
|
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
|
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
|
|
|
|
|
|
|
patch -p1 < $CWD/newmesafix.diff
|
2014-04-10 14:15:01 +02:00
|
|
|
|
|
|
|
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.7.2 \
|
|
|
|
--build=$ARCH-slackware-linux
|
|
|
|
|
|
|
|
make
|
|
|
|
make install-strip DESTDIR=$PKG
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a changes.txt license.txt readme.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
|
2021-07-04 12:23:38 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|