void-packages/srcpkgs/sauerbraten/template

47 lines
1.4 KiB
Bash

# Template file for 'sauerbraten'
pkgname=sauerbraten
version=2020.12.29
revision=1
build_wrksrc=src
build_style=gnu-makefile
makedepends="SDL2_image-devel SDL2_mixer-devel zlib-devel"
depends="${pkgname}-data-${version}_${revision}"
short_desc="3D game engine (more powerful redesign of the Cube engine) and FPS game"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="Zlib"
homepage="http://sauerbraten.org"
distfiles="${SOURCEFORGE_SITE}/sauerbraten/sauerbraten_${version//./_}_linux.tar.bz2"
checksum=cdba7c4a47cefd30d0afdd6a912199a1384319cf1619923cb7189e72e468be70
# Build is only supported on i686 and x86_64, and enet doesn't cross compile
archs="i686* x86_64*"
post_install() {
vbin $wrksrc/bin_unix/native_client sauer_client
vbin ${FILESDIR}/sauerbraten
}
sauerbraten-data_package() {
short_desc+=" - data files"
pkg_install() {
vmkdir usr/share/$sourcepkg
vcopy $wrksrc/data usr/share/$sourcepkg/data
vcopy $wrksrc/packages usr/share/$sourcepkg/packages
}
}
sauerbraten-server_package() {
conf_files="/etc/sauerbraten/server-init.cfg"
short_desc+=" - standalone server"
pkg_install() {
vbin $wrksrc/bin_unix/native_server sauer_server
vmkdir etc/$sourcepkg
vcopy $wrksrc/server-init.cfg etc/$sourcepkg/server-init.cfg
vbin ${FILESDIR}/sauerbraten-server
# No service directory because this server isn't really suited
# to running for long periods of time.
}
}