void-packages/srcpkgs/srb2/template

52 lines
1.7 KiB
Bash

# Template file for 'srb2'
pkgname=srb2
version=2.2.9
revision=2
create_wrksrc=true
build_wrksrc="SRB2-SRB2_release_${version}"
build_style=gnu-makefile
make_use_env=yes
make_build_args=" -C src ECHO=1 LINUX=1 USE_OPENMP=1 EXENAME=${pkgname}
DBGNAME=${pkgname}-debug NOOBJDUMP=1 NOUPX=1"
hostmakedepends="pkg-config gettext"
makedepends="SDL2-devel SDL2_mixer-devel libpng-devel libupnp-devel libcurl-devel libgme-devel libopenmpt-devel"
short_desc="3D Sonic fan game based off of Doom Legacy"
maintainer="oreo639 <oreo6391@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://srb2.org/"
distfiles="https://github.com/STJr/SRB2/archive/SRB2_release_${version}.tar.gz
https://github.com/STJr/SRB2/releases/download/SRB2_release_${version}/SRB2-v${version//./}-Full.zip"
checksum="5f7eeb08e90323e28cdcb02ad25c904eef25ce75316720609b995a1e4ffd154a
48e644604bed81b5ce6b12ef23a2f4042d0118d0ba70f18c534dfe86ebe6f37d"
restricted=yes
case "$XBPS_TARGET_MACHINE" in
i686*) makedepends+=" nasm" ;;
x86_64*) make_build_args+=" X86_64=1 NONX86=1" ;;
*) make_build_args+=" NONX86=1" ;;
esac
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" libexecinfo-devel"
export LIBS="-lexecinfo"
fi
if [ -n "$CROSS_BUILD" ]; then
make_build_args+=" OBJCOPY=${XBPS_CROSS_TRIPLET}-objcopy"
fi
do_install() {
vbin bin/Linux/Release/${pkgname}
PROGRAM_NAME="${pkgname}" PROGRAM_DESCRIPTION="${short_desc}" \
PACKAGE_INSTALL_PATH="/usr/bin" PROGRAM_FILENAME="${pkgname}" \
envsubst < debian-template/srb2.desktop > srb2.desktop
vinstall srb2.png 644 /usr/share/pixmaps/
vinstall srb2.desktop 644 /usr/share/applications/
vmkdir /usr/share/games/SRB2
for f in {music,player}.dta {srb2,zones,patch,patch_music}.pk3 models models.dat; do
vcopy ../${f} /usr/share/games/SRB2
done
}