52 lines
1.7 KiB
Bash
52 lines
1.7 KiB
Bash
# Template file for 'srb2'
|
|
pkgname=srb2
|
|
version=2.2.10
|
|
revision=1
|
|
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="feb3a95a15ea04218282e5c4f01ae3733672e14d219e2792dcfc500dcf89a3c2
|
|
e69ac5cacc86f85eeaba14644a37cad932f7d7031b667892d2f9ba9bfb437d25"
|
|
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}.pk3 models models.dat; do
|
|
vcopy ../${f} /usr/share/games/SRB2
|
|
done
|
|
}
|