51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
# Template file for 'teeworlds'
|
|
pkgname=teeworlds
|
|
version=0.7.3.1
|
|
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=62da301f20dfc20e2e480223dc1fc4ea5f9bfbfa6bc304c4c7732071a319ffd4
|
|
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
|
|
vinstall other/teeworlds.desktop 644 usr/share/applications
|
|
}
|