aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-10-19 04:12:47 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-11-02 19:28:36 +0700
commit5a4c845b15ab56e9315b31f646c5a6ec8dbb0a40 (patch)
tree3d5e09d585ccf41d12ccbd5cb50c56c2ebf55488 /games
parentb1864df65a20870e634e9fbb2e5ac9de595aafa1 (diff)
games/cubosphere: Build with lua51.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/cubosphere/cubosphere.SlackBuild34
-rw-r--r--games/cubosphere/cubosphere.desktop2
-rw-r--r--games/cubosphere/cubosphere.info2
3 files changed, 23 insertions, 15 deletions
diff --git a/games/cubosphere/cubosphere.SlackBuild b/games/cubosphere/cubosphere.SlackBuild
index abc46428bb26..4875951bc881 100644
--- a/games/cubosphere/cubosphere.SlackBuild
+++ b/games/cubosphere/cubosphere.SlackBuild
@@ -22,11 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20241019 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - build with luajit.
+# - binary in /usr/games.
+# - don't install the data files +x.
+# TODO: fix the music: transcode to .ogg in this script (see megamario's
+# SlackBuild for an example), and patch the code to actually use .ogg music.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cubosphere
VERSION=${VERSION:-beta0.3a}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +45,6 @@ if [ -z "$ARCH" ]; then
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
@@ -73,27 +77,28 @@ rm -rf ${PRGNAM}_${VERSION}
tar xvf $CWD/${PRGNAM}_${VERSION}_linux_src.tar.gz
cd ${PRGNAM}_${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 {} \;
+
+fixperms() {
+ find "$1" -type f -a -exec chmod 644 {} + -o -type d -a -exec chmod 755 {} +
+}
+
+fixperms .
cd src
# Fix Makefile.
sed -i \
-e '/^PREFIX/s|=.*|=/usr|' \
-e "s|-O3$|$SLKCFLAGS|" \
- -e "s|^LUALIBS=.*|LUALIBS=-llua|" \
- -e "s|^LUAINC=.*|LUAINC=-I/usr/include|" \
+ -e "s|^LUALIBS=.*|LUALIBS=-lluajit-5.1|" \
+ -e "s|^LUAINC=.*|LUAINC=-I/usr/include/luajit-2.0|" \
Makefile
make
make install DESTDIR=$PKG
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
+mv $PKG/usr/bin $PKG/usr/games
+strip $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications
@@ -109,5 +114,8 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+fixperms $PKG
+chmod 755 $PKG/usr/games/*
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/cubosphere/cubosphere.desktop b/games/cubosphere/cubosphere.desktop
index 04947e4d5a87..6b68d19ff127 100644
--- a/games/cubosphere/cubosphere.desktop
+++ b/games/cubosphere/cubosphere.desktop
@@ -3,7 +3,7 @@ Type=Application
Name=Cubosphere
GenericName=Logic Game
Comment=3d puzzle
-Exec=cubosphere
+Exec=/usr/games/cubosphere
Icon=cubosphere
Categories=Game;LogicGame;
Terminal=false
diff --git a/games/cubosphere/cubosphere.info b/games/cubosphere/cubosphere.info
index c8ea12306e5b..ae42b09a3e69 100644
--- a/games/cubosphere/cubosphere.info
+++ b/games/cubosphere/cubosphere.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://downloads.sourceforge.net/cubosphere/cubosphere_beta0.3a_linux
MD5SUM="87a97675806a6722359c48953158b92a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="lua"
+REQUIRES="lua51"
MAINTAINER="Jeremy Hansen"
EMAIL="jebrhansen+SBo@gmail.com"