From d813b8f2df0397aa30165edc4166133ead7514f8 Mon Sep 17 00:00:00 2001 From: Kenneth Dodrill Date: Sun, 26 Sep 2021 12:59:13 -0500 Subject: [PATCH] New package: OpenJK-0.0.20210922 --- srcpkgs/OpenJK/INSTALL.msg | 1 + srcpkgs/OpenJK/files/OpenJK.desktop | 10 ++++++ srcpkgs/OpenJK/files/OpenJKMP.desktop | 10 ++++++ srcpkgs/OpenJK/files/OpenJO.desktop | 10 ++++++ srcpkgs/OpenJK/files/README.voidlinux | 11 +++++++ srcpkgs/OpenJK/template | 47 +++++++++++++++++++++++++++ 6 files changed, 89 insertions(+) create mode 100644 srcpkgs/OpenJK/INSTALL.msg create mode 100644 srcpkgs/OpenJK/files/OpenJK.desktop create mode 100644 srcpkgs/OpenJK/files/OpenJKMP.desktop create mode 100644 srcpkgs/OpenJK/files/OpenJO.desktop create mode 100644 srcpkgs/OpenJK/files/README.voidlinux create mode 100644 srcpkgs/OpenJK/template diff --git a/srcpkgs/OpenJK/INSTALL.msg b/srcpkgs/OpenJK/INSTALL.msg new file mode 100644 index 000000000000..185292bd3736 --- /dev/null +++ b/srcpkgs/OpenJK/INSTALL.msg @@ -0,0 +1 @@ +Consult /usr/share/doc/OpenJK/README.voidlinux for further installation instructions. \ No newline at end of file diff --git a/srcpkgs/OpenJK/files/OpenJK.desktop b/srcpkgs/OpenJK/files/OpenJK.desktop new file mode 100644 index 000000000000..e5c13c5c85d2 --- /dev/null +++ b/srcpkgs/OpenJK/files/OpenJK.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=OpenJK Jedi Academy Single Player +Comment="Open Source Implementation of Jedi Knight II and III Engine - Jedi Academy Single Player" +Exec=openjk_sp +Icon=OpenJK +Terminal=false +StartupNotify=false +Categories=Game \ No newline at end of file diff --git a/srcpkgs/OpenJK/files/OpenJKMP.desktop b/srcpkgs/OpenJK/files/OpenJKMP.desktop new file mode 100644 index 000000000000..04c25842f89e --- /dev/null +++ b/srcpkgs/OpenJK/files/OpenJKMP.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=OpenJK Multi Player +Comment="Open Source Implementation of Jedi Knight II and III Engine - Multi Player" +Exec=openjk +Icon=OpenJK +Terminal=false +StartupNotify=false +Categories=Game \ No newline at end of file diff --git a/srcpkgs/OpenJK/files/OpenJO.desktop b/srcpkgs/OpenJK/files/OpenJO.desktop new file mode 100644 index 000000000000..de1076371d3c --- /dev/null +++ b/srcpkgs/OpenJK/files/OpenJO.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=OpenJK Jedi Outcast +Comment="Open Source Implementation of Jedi Knight II and III Engine - Jedi Outcast" +Exec=openjo +Icon=OpenJK +Terminal=false +StartupNotify=false +Categories=Game \ No newline at end of file diff --git a/srcpkgs/OpenJK/files/README.voidlinux b/srcpkgs/OpenJK/files/README.voidlinux new file mode 100644 index 000000000000..ee5f3751949a --- /dev/null +++ b/srcpkgs/OpenJK/files/README.voidlinux @@ -0,0 +1,11 @@ +OpenJK requires a copy of Jedi Knight: Jedi Academy. +You can also use this for Jedi Outcast (singleplayer only), which requires a copy as well. +The default folder that the game will search for files is + + ~/.local/share/openjk + +You can easily link your game files by doing the following: + + cd ~/.local/share/openjk + mkdir base + ln -s /path/to/game/GameData/base/* base \ No newline at end of file diff --git a/srcpkgs/OpenJK/template b/srcpkgs/OpenJK/template new file mode 100644 index 000000000000..ce6c29973440 --- /dev/null +++ b/srcpkgs/OpenJK/template @@ -0,0 +1,47 @@ +# Template file for 'OpenJK' +pkgname=OpenJK +version=0.0.20210922 +revision=1 +archs="i686 x86_64" +_gitrev=43e9a3da555a487e23081bbd03101e7c926a1e83 +wrksrc="${pkgname}-${_gitrev}" +build_style=cmake +configure_args="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/${pkgname} -DBuildJK2SPEngine=on -DBuildJK2SPGame=on -DBuildJK2SPRdVanilla=on" +makedepends="libjpeg-turbo-devel libpng-devel zlib-devel SDL2-devel" +depends="SDL2" +short_desc="Open Source Implementation of Jedi Knight II and III Engine" +maintainer="Kenneth Dodrill " +license="GPL-2.0-only" +homepage="https://github.com/JACoders/OpenJK" +distfiles="https://github.com/JACoders/OpenJK/archive/${_gitrev}.tar.gz" +checksum=efd2e3d96fe449819c4276dfea7ae7d591591ee0e651167844110e073f2edb3c + +post_install() { + vmkdir usr/bin + for _bin in 'openjk' 'openjk_sp' 'openjkded'; do + touch "${DESTDIR}/usr/bin/${_bin}" + cat > "${DESTDIR}/usr/bin/${_bin}" << EOF +#! /bin/bash +cd /opt/${pkgname}/JediAcademy +exec ./${_bin}.${XBPS_MACHINE} \s@ +EOF + chmod +x "${DESTDIR}/usr/bin/${_bin}" + done + + cat > "${DESTDIR}/usr/bin/openjo" << EOF +#! /bin/bash +cd /opt/${pkgname}/JediOutcast +exec ./openjo_sp.${XBPS_MACHINE} \s@ +EOF + chmod +x ${DESTDIR}/usr/bin/openjo + + vinstall "${FILESDIR}/OpenJK.desktop" 644 usr/share/applications + vinstall "${FILESDIR}/OpenJKMP.desktop" 644 usr/share/applications + vinstall "${FILESDIR}/OpenJO.desktop" 644 usr/share/applications + + for size in 16 32 64 128 1024; do + vinstall shared/icons/${pkgname}_Icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ OpenJK.png + done + + vdoc "${FILESDIR}/README.voidlinux" +}