void-packages/srcpkgs/teeworlds/template
2019-01-22 10:26:21 -02:00

49 lines
1.2 KiB
Bash

# Template file for 'teeworlds'
pkgname=teeworlds
version=0.7.2
revision=1
hostmakedepends="bam python"
makedepends="zlib-devel SDL2-devel glu-devel freetype-devel"
short_desc="Retro multiplayer shooter"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="custom"
homepage="https://www.teeworlds.com"
distfiles="https://github.com/teeworlds/teeworlds/archive/${version}.tar.gz"
checksum=00847425ea8c5add663cafe83d9bb2a17bbc15dc5970ff9237b2046d1c8ed179
nocross="Only supports i686 and x86_64"
case "$XBPS_MACHINE" in
i686) _ARCH=x86;;
x86_64*) _ARCH=x86_64;;
esac
do_configure() {
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 conf=release arch=${_ARCH}
}
do_install() {
pushd build/${_ARCH}/release
vbin teeworlds
vbin teeworlds_srv
vmkdir usr/share/teeworlds
cp -r data ${DESTDIR}/usr/share/teeworlds/data
popd
vlicense license.txt LICENSE
}