void-packages/srcpkgs/Cataclysm-DDA/template

79 lines
1.8 KiB
Bash

# Template file for 'Cataclysm-DDA'
pkgname=Cataclysm-DDA
version=0.D
revision=2
build_style=cmake
configure_args="-DRELEASE=1 $(vopt_bool backtrace BACKTRACE) $(vopt_bool lua LUA)
-DUSE_HOME_DIR=1 -DPREFIX=/usr"
hostmakedepends="pkg-config"
makedepends="$(vopt_if tiles 'SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel') freetype-devel
gettext-devel ncurses-devel $(vopt_if lua lua-devel)"
depends="Cataclysm-DDA-data"
short_desc="Turn-based survival game set in a post-apocalyptic world"
maintainer="John <johnz@posteo.net>"
license="CC-BY-SA-3.0, CC-BY-3.0"
homepage="https://cataclysmdda.org/"
distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz"
checksum=6cc97b3e1e466b8585e8433a6d6010931e9a073f6ec060113161b38052d82882
build_options="lua tiles backtrace"
build_options_default="tiles"
case $XBPS_TARGET_MACHINE in
*-musl);;
*) build_options_default+=" backtrace";;
esac
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" lua"
fi
if [ "$build_option_tiles" ]; then
subpackages="Cataclysm-DDA-tiles-data Cataclysm-DDA-tiles"
post_configure() {
local cmake_builddir=build-tiles
configure_args+=" -DTILES=ON -DSOUND=ON"
do_configure
}
post_build() {
local cmake_builddir=build-tiles
do_build
}
post_install() {
local cmake_builddir=build-tiles
do_install
}
fi
subpackages+=" Cataclysm-DDA-data"
do_check() {
: #needs tap++.h
}
Cataclysm-DDA-tiles_package() {
short_desc+=" - SDL tiles version"
depends="Cataclysm-DDA-data Cataclysm-DDA-tiles-data"
pkg_install() {
vmove usr/bin/cataclysm-tiles
}
}
Cataclysm-DDA-tiles-data_package() {
short_desc+=" - tiles data files"
archs=noarch
pkg_install() {
vmove usr/share/cataclysm-dda/gfx
vmove usr/share/cataclysm-dda/sound
}
}
Cataclysm-DDA-data_package() {
short_desc+=" - data files"
archs=noarch
pkg_install() {
vmove usr/share/
}
}