56 lines
1.3 KiB
Bash
56 lines
1.3 KiB
Bash
# Template file for 'teeworlds'
|
|
pkgname=teeworlds
|
|
version=0.7.3.1
|
|
revision=2
|
|
hostmakedepends="bam python pkg-config"
|
|
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
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686) _ARCH=x86;;
|
|
x86_64*) _ARCH=x86_64;;
|
|
ppc64*) _ARCH=ppc64;;
|
|
ppc*) _ARCH=ppc;;
|
|
armv7l*) _ARCH=armv7l;;
|
|
arm*) _ARCH=arm;;
|
|
aarch64*) _ARCH=aarch64;;
|
|
*) _ARCH=${XBPS_TARGET_MACHINE%%-musl};;
|
|
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
|
|
}
|