Skip to content

Commit

Permalink
New package: srb2-2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oreo639 committed May 15, 2020
1 parent 0d36ffa commit 0d98a55
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
31 changes: 31 additions & 0 deletions srcpkgs/srb2-data/template
@@ -0,0 +1,31 @@
# Template file for 'srb2-data'
pkgname=srb2-data
version=2.2.4
revision=1
_instver=2.2.1
short_desc="Sonic fangame based on a modified version of Doom Legacy - game data"
maintainer="oreo639 <oreo6391@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://srb2.org/"
distfiles="https://github.com/STJr/SRB2/releases/download/SRB2_release_${_instver}/SRB2-v_${_instver//./}-Installer.exe
https://files.srb2.org/srb2.org/SRB2-v${version//./}-Patch.zip"
checksum="5af82508be353dd41b05b793fa7aaef418eab246df7050f72c569f1809b3160f
8f384643a226041ebd7fed5e4d1e610ffba9da36dc34f51a50d9461d768f6750"

do_extract() {
local f curfile

mkdir -p ${wrksrc}
for f in ${distfiles}; do
curfile="${f#*>}"
curfile="${curfile##*/}"
bsdtar xf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${curfile}
done
}

do_install() {
vmkdir /usr/share/games/SRB2
for f in {music,player}.dta {srb2,zones,patch,patch_music}.pk3; do
vcopy ${f} /usr/share/games/SRB2
done
}
9 changes: 9 additions & 0 deletions srcpkgs/srb2/files/srb2.desktop
@@ -0,0 +1,9 @@
[Desktop Entry]
Name=Sonic Robo Blast 2
Encoding=UTF-8
Exec=srb2
Icon=srb2
Terminal=false
Type=Application
StartupNotify=false
Categories=Application;Game;
36 changes: 36 additions & 0 deletions srcpkgs/srb2/template
@@ -0,0 +1,36 @@
# Template file for 'srb2'
pkgname=srb2
version=2.2.4
revision=1
wrksrc="SRB2-SRB2_release_${version}"
hostmakedepends="pkg-config"
makedepends="SDL2-devel SDL2_mixer-devel libpng-devel libupnp-devel libgme-devel libopenmpt-devel"
depends="srb2-data>=0"
short_desc="Sonic fangame based on a modified version 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"
checksum=4b5b60dfe08623268c1f12ba1ff4e0802c5bbebcfed47b54816bc19ee02cc0e3

case "$XBPS_TARGET_MACHINE" in
i686*) makedepends+=" nasm" ;;
*) ISNOTX86="NONX86=1" ;;
esac

if [ "$CROSS_BUILD" ]; then
OBJCPYCMD="OBJCOPY=${XBPS_CROSS_TRIPLET}-objcopy"
fi

do_build() {
make -C src LINUX=1 ${ISNOTX86} ${OBJCPYCMD} EXENAME=${pkgname} DBGNAME="${pkgname}-debug" NOOBJDUMP=1 NOUPX=1
}

do_install() {
vbin bin/Linux/Release/${pkgname}
}

post_install() {
vinstall srb2.png 644 /usr/share/pixmaps
vinstall ${FILESDIR}/srb2.desktop 644 /usr/share/applications/
}

0 comments on commit 0d98a55

Please sign in to comment.