# Maintainer: exponential # Contributor: Stefan J. Betz (AUR) pkgname=zod-engine _version=2011_09_06 pkgver=0.2011.09.06 pkgrel=2 # fork "zed online" https://sourceforge.net/projects/zedonline/ pkgdesc="The Zod Engine - An Open Source Remake of the 1996 Game Z by Bitmap Brothers" depends=('libsdl1.2debian' 'libsdl-mixer1.2' 'libsdl-ttf2.0-0' 'libsdl-image1.2' 'libmariadb3' 'libwxgtk3.2-1') bullseye_depends=('libsdl1.2debian' 'libsdl-mixer1.2' 'libsdl-ttf2.0-0' 'libsdl-image1.2' 'libmariadb3' 'libwxgtk3.0-gtk3-0v5') makedepends=('libsdl1.2-dev' 'libsdl-mixer1.2-dev' 'libsdl-ttf2.0-dev' 'libsdl-image1.2-dev' 'libmariadb-dev-compat' 'libwxgtk3.2-dev' 'sed') bullseye_makedepends=('libsdl1.2-dev' 'libsdl-mixer1.2-dev' 'libsdl-ttf2.0-dev' 'libsdl-image1.2-dev' 'libmariadb-dev-compat' 'libwxgtk3.0-gtk3-dev' 'sed') arch=('i386' 'amd64') license=('GPL3') url="http://zod.sourceforge.net/" source=("https://sourceforge.net/projects/zod/files/linux_releases/zod_linux-${_version//_/-}.tar.gz") b2sums=('01ce342df4f95bdc2feedb759dd8b8e1e5fd91d5a0b71a159f706b42ba8c47ffdedb9f98a756bd8f978043e78b4ef1f7b6380d8585efb7ef7fa81cd019e79533') prepare(){ cd $srcdir sed -i 's/#include /#include \n#include /' zod_engine/zod_src/common.cpp sed -i 's!check\.replace(i,1,1,'\''_'\'');!check\.replace(i,1,1, (wxUniChar)'\''_'\'');!' 'zod_engine/zod_launcher_src/zod_launcherFrm.cpp' find $srcdir/zod_engine/assets/ -name Thumbs.db -delete rm $srcdir/zod_engine/assets/{splash.png,splash.xcf} } build() { cd $srcdir make -C $srcdir/zod_engine/zod_src make -C $srcdir/zod_engine/zod_src map_editor make -C $srcdir/zod_engine/zod_launcher_src } package() { # Creating Directories install -m755 -d $pkgdir/usr/{games,libexec/$pkgname,share/{applications,pixmaps,games/$pkgname,doc/$pkgname}} # Copy files cp -R $srcdir/zod_engine/{assets,blank_maps,*.txt,*.map} $pkgdir/usr/share/games/$pkgname install -Dm755 $srcdir/zod_engine/zod_src/zod $pkgdir/usr/games/ install -Dm755 $srcdir/zod_engine/zod_src/zod_map_editor $pkgdir/usr/games/zod-map-editor install -Dm755 $srcdir/zod_engine/zod_launcher_src/zod_launcher $pkgdir/usr/libexec/$pkgname/zod-launcher # Launcher wrapper echo "#!/bin/sh config_dir=\${XDG_CONFIG_HOME:-\$HOME/.config}/$pkgname if [ ! -e \$config_dir ]; then cp -as /usr/share/games/$pkgname/ \$config_dir ln -sf /usr/games/zod \$config_dir/zod cp --remove-destination /usr/share/games/$pkgname/default_settings.txt \$config_dir/ fi cd \$config_dir exec /usr/libexec/$pkgname/zod-launcher" > $pkgdir/usr/games/zod-launcher chmod 755 $pkgdir/usr/games/zod-launcher # Deskrop file echo "[Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=$pkgname.png Name=Zod Engine Exec=zod-launcher Categories=Application;Game;" > $pkgdir/usr/share/applications/$pkgname.desktop # Adjustments ln -s /usr/share/games/$pkgname/assets/icon.png $pkgdir/usr/share/pixmaps/$pkgname.png mv $pkgdir/usr/share/games/$pkgname/{*help.txt,readme_linux.txt} $pkgdir/usr/share/doc/$pkgname/ ln -s /usr/share/common-licenses/GPL-3 "$pkgdir/usr/share/doc/$pkgname/" }