void-packages/srcpkgs/teeworlds/template

47 lines
1.2 KiB
Bash

# Template file for 'teeworlds'
pkgname=teeworlds
version=0.6.5
revision=1
wrksrc="${pkgname}-${version}-src"
hostmakedepends="bam python"
makedepends="zlib-devel SDL-devel glu-devel freetype-devel"
short_desc="A retro multiplayer shooter"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="custom"
homepage="https://www.teeworlds.com"
distfiles="https://downloads.teeworlds.com/${pkgname}-${version}-src.tar.gz"
checksum=0bd3b85c76437138438f8cd7848251d0085e19026e0f89656a2fb44398ec941e
do_configure() {
if [ -n "$CROSS_BUILD" ]; then
sed -i -e "s;\(option.use_sdlconfig =\) false;\1 true;" \
other/sdl/sdl.lua
sed -i -e "s;\(option.use_ftconfig =\) false;\1 true;" \
other/freetype/freetype.lua
fi
if [ "$CC" = cc ]; then
# argh, bam is useless
export CC=gcc
fi
sed -i "/cc.includes:Add.\"src\"/a\
settings.cc.exe_c = '$CC'; \
settings.cc.exe_cxx = '$CXX'; \
settings.cc.flags_c:Add('$CFLAGS'); \
settings.cc.flags_cxx:Add('$CXXFLAGS'); \
settings.link.exe = '$CXX'; \
settings.link.flags:Add('${LDFLAGS}');" bam.lua
bam -t -v config
}
do_build() {
bam -v server_release client_release
}
do_install() {
vbin teeworlds
vbin teeworlds_srv
vmkdir usr/share/teeworlds
cp -r data ${DESTDIR}/usr/share/teeworlds/data
vlicense license.txt LICENSE
}