void-packages/srcpkgs/teeworlds/template

42 lines
1.2 KiB
Bash

# Template file for 'teeworlds'
pkgname=teeworlds
version=0.6.4
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="Christian Neukirchen <chneukirchen@gmail.com>"
license="custom"
homepage="https://www.teeworlds.com"
distfiles="https://downloads.teeworlds.com/${pkgname}-${version}-src.tar.gz"
checksum=c261d19ebb00b5451faa2ceb4a7ca945cad2add48b06046eb43b40ccc9fd98e2
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
sed -i "/cc.includes:Add/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 -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
}