makedeb


wipeout-git 0.r68.90702ce-1


Futuristic anti-gravity racing game. A re-implementation of the 1995 game wipEout.

Click here to go back to the commit logs for wipeout-git.

Commit:


Hash: d466cb788b912a63888a52d147a94ff086485d23

Message: fix config folder hack, add compile option for assets

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 0ed230d..9814b6b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,7 +3,7 @@ pkgname = wipeout-git
 pkgbase = wipeout-git
 pkgdesc = Futuristic anti-gravity racing game. A re-implementation of the 1995 game wipEout.
 pkgrel = 1
-pkgver = 0.r1.4139923
+pkgver = 0.r23.ecf1e63
 url = https://phoboslab.org/log/2023/08/rewriting-wipeout
 arch = amd64
 conflicts = wipeout
diff --git a/PKGBUILD b/PKGBUILD
index 6a813af..3a9cd16 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 pkgname=wipeout-git
 _pkgname=wipeout
 _srcname=wipeout-rewrite
-pkgver=0.r1.4139923
+pkgver=0.r23.ecf1e63
 pkgrel=1
 pkgdesc="Futuristic anti-gravity racing game. A re-implementation of the 1995 game wipEout."
 arch=('amd64')
@@ -16,6 +16,8 @@ depends=("libsdl2-2.0-0" "libglew2.2")
 #depends=('libx11-6' 'libxcursor1' 'libxi6' 'libasound2')
 provides=('wipeout')
 conflicts=('wipeout')
+# alternate data link, "makedeb -g" for the checksum
+#https://archive.org/download/wipeout-data.tar/wipeout-data.tar.zst
 source=("git+https://github.com/phoboslab/wipeout-rewrite"
         "https://phoboslab.org/files/wipeout-data-v01.zip"
         "${_pkgname}.png::https://static.wikia.nocookie.net/wipeout/images/f/fa/F3600.png/revision/latest/scale-to-width-down/350")
@@ -31,9 +33,9 @@ pkgver() {
 build() {
   cd ${srcdir}/${_srcname}
   # sdl
-  make DEBUG=false USE_GLX=false RENDERER=GL sdl
+  make USER_CFLAGS="-DPATH_ASSETS=/usr/share/games/" DEBUG=false USE_GLX=false RENDERER=GL sdl
   # sokol
-  #make DEBUG=false USE_GLX=false RENDERER=GL sokol
+  #make USER_CFLAGS="-DPATH_ASSETS=/usr/share/games/" DEBUG=false USE_GLX=false RENDERER=GL sokol
 }
 
 package() {
@@ -49,6 +51,7 @@ package() {
 
   # Adjustments
   rm $pkgdir/usr/share/games/${_pkgname}/game_data_goes_here.txt
+  md5checksum="$(md5sum "$srcdir/${_srcname}/wipegame" | sed "s!$srcdir/${_srcname}/wipegame!$_pkgname-bin!")"
 
   # Desktop file
 echo "[Desktop Entry]
@@ -70,14 +73,18 @@ Categories=Application;Game" > $pkgdir/usr/share/applications/wipeout.desktop
   # Wrapper script
 echo "#!/bin/sh
 
-config_dir=\${XDG_CONFIG_HOME:-\$HOME/.config}/${_pkgname}
+config_dir=\"\${XDG_CONFIG_HOME:-\$HOME/.config}/${_pkgname}\"
+md5checksum=\"$md5checksum\"
 
 if [ ! -e \$config_dir/$_pkgname ]; then
-  mkdir -p \$config_dir
+  mkdir -p \"\$config_dir\"
   ln -s /usr/share/games/${_pkgname} \$config_dir/
 fi
 
 cd \$config_dir
-exec /usr/libexec/${_pkgname}" > $pkgdir/usr/games/wipeout
+
+echo \"\$md5checksum\" | md5sum -c --status || cp /usr/libexec/${_pkgname} ${_pkgname}-bin
+
+exec ./${_pkgname}-bin" > $pkgdir/usr/games/wipeout
 chmod 755 $pkgdir/usr/games/wipeout
 }