summaryrefslogtreecommitdiffstats
path: root/games/lutris/lutris.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/lutris/lutris.SlackBuild')
-rw-r--r--games/lutris/lutris.SlackBuild54
1 files changed, 44 insertions, 10 deletions
diff --git a/games/lutris/lutris.SlackBuild b/games/lutris/lutris.SlackBuild
index 73ddf9f8b9..da2c7c69d8 100644
--- a/games/lutris/lutris.SlackBuild
+++ b/games/lutris/lutris.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for lutris
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
-# Copyright 2018 Brenton Earl <brent@exitstatusone.com>
+# Copyright 2018, 2022 Brenton Earl <brent@exitstatusone.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lutris
-VERSION=${VERSION:-0.4.23}
+VERSION=${VERSION:-0.5.13}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -35,23 +35,38 @@ if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
+ aarch64) ARCH=$( uname -m ) ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
-PKG=${PKG:-$TMP/package-$PRGNAM}
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS CHANGELOG LICENSE INSTALL.rst README.rst"
+DOCS="AUTHORS LICENSE README.rst"
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
set -e
@@ -59,8 +74,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
-tar xvf $CWD/$PRGNAM\_$VERSION.tar.xz
-cd $PRGNAM
+tar xvf $CWD/$PRGNAM\-$VERSION.tar.?z
+cd $PRGNAM\-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -68,11 +83,30 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python3 setup.py install --root $PKG
+mkdir -p build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Derrorlogs=false \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild