46 lines
1.6 KiB
Bash
46 lines
1.6 KiB
Bash
# Template file for 'srb2'
|
|
pkgname=srb2
|
|
version=2.2.8
|
|
revision=1
|
|
create_wrksrc=true
|
|
build_wrksrc="SRB2-SRB2_release_${version}"
|
|
build_style=gnu-makefile
|
|
make_use_env=yes
|
|
make_build_args=" -C src 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="bbb2777a05a16019d8b4a3fcef9829e6e7cfd795710b3ffcce009120f0e2c43c
|
|
7a3805b1127bd42db6432a9fe3e25927269e334497d48bdc9c2751edc114d718"
|
|
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 [ -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
|
|
}
|