void-packages/srcpkgs/srb2/template

53 lines
1.7 KiB
Bash

# Template file for 'srb2'
pkgname=srb2
version=2.2.13
revision=1
create_wrksrc=true
build_wrksrc="SRB2-SRB2_release_${version}"
build_style=gnu-makefile
make_use_env=yes
make_build_args="ECHO=1 LINUX=1 USE_OPENMP=1 EXENAME=${pkgname}
DBGNAME=${pkgname}-debug NOOBJDUMP=1 NOUPX=1 PREFIX="
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="0fc460dc93c056c21bfcc389ac0515588673ee692968d9a6711b19e63d283b3f
83b91a351135b63705e49daffa44e7ac3cf3e33b397f56ff347ebb71eda27d4a"
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 LDFLAGS="-lexecinfo"
fi
if [ -n "$CROSS_BUILD" ]; then
make_build_args+=" OBJCOPY=${XBPS_CROSS_TRIPLET}-objcopy"
fi
do_install() {
vbin bin/${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}.pk3 models models.dat; do
vcopy ../${f} /usr/share/games/SRB2
done
}