# Template file for 'freedroidRPG'. pkgname=freedroidRPG version=0.16 revision=1 _rcver=rc2 wrksrc=${pkgname,,}-${version}${_rcver} build_style=gnu-configure hostmakedepends="pkg-config python" makedepends="SDL_gfx-devel SDL_image-devel SDL_mixer-devel libjpeg-turbo-devel libvorbis-devel lua-devel libpng-devel" depends="${pkgname}-data>=${version}_${revision}" short_desc="Role playing game featuring Tux and evil robots" maintainer="Jürgen Buchmüller " license="GPL-3" homepage="http://www.freedroid.org/" distfiles="http://ftp.osuosl.org/pub/freedroid/${pkgname}-${version}/${pkgname}-${version}${_rcver}.tar.gz" checksum=e93c2f98f0997110c56cd0de5be453b369532596d7beda8c19add52b8bb40333 case "$XBPS_TARGET_MACHINE" in *-musl) configure_args+=" --disable-backtrace" esac post_install() { local script=freedroid # Remove the .UTF-8 suffix from the user's LANG setting, # or otherwise the internal font is wrong when rendering # non-ASCII characters. My assumption is the game expects # ISO-8859-1 (aka Latin1). echo "#!/bin/sh" > ${script} echo "# Strip .UTF-8 extension from the user's LANG" >> ${script} echo "LANG=$(echo \"$LANG\" | sed -e's;\.[Uu][Tt][Ff]-8;;')" >> ${script} echo "exec ${pkgname} $*" >> ${script} # install the wrapper script vbin ${script} # Start the wrapper script from the desktop file sed -i ${PKGDESTDIR}/usr/share/applications/${pkgname}.desktop \ -e "/^Exec/s;=${pkgname};=${script};" } freedroidRPG-data_package() { short_desc+=" - data files" noarch=yes pkg_install() { vmove usr/share/freedroidrpg } }