summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormyself6002023-01-16 22:45:38 +0100
committermyself6002023-01-16 22:45:38 +0100
commit32024e2dd61dcf152796c2ad237bca73880a3ae8 (patch)
treed73645f4db0c546fc72afa2898dc7d108dce6078
parent27a630863a2c64dc3905e9feeb2eefda791e5e3e (diff)
downloadaur-32024e2dd61dcf152796c2ad237bca73880a3ae8.tar.gz
Rewrite from scratch
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD61
-rw-r--r--jazz238
-rw-r--r--jazz2-bin.install7
-rw-r--r--jazz2-bin.pngbin15379 -> 0 bytes
-rwxr-xr-x[-rw-r--r--]jazz2.desktop11
-rw-r--r--jazz2.install3
-rw-r--r--jazz2import9
8 files changed, 81 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6face3ef858..e13d2c391064 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,24 @@
pkgbase = jazz2-bin
- pkgdesc = Jazz² Resurrection: An open-source reimplementation of Jazz Jackrabbit 2
- pkgver = 0.7.3
+ pkgdesc = Jazz² Resurrection: Open-source Jazz Jackrabbit 2 reimplementation (release or nightly channel)
+ pkgver = autoupdates
pkgrel = 1
url = http://deat.tk/jazz2/
- install = jazz2-bin.install
+ install = jazz2.install
arch = x86_64
+ arch = aarch64
license = GPL3
- depends = mono
+ license = MIT/Expat
+ depends = libopenmpt
depends = openal
- options = !strip
- source = jazz2-bin-0.7.3.zip::https://github.com/deathkiller/jazz2/releases/download/0.7.3/Jazz2_0.7.3_Desktop.zip
- source = jazz2-bin.png::https://raw.githubusercontent.com/deathkiller/jazz2/master/Jazz2.Android/Resources/mipmap-xxhdpi/ic_launcher.png
- source = jazz2.desktop
+ depends = sdl2
+ depends = zenity
+ source = https://archive.org/download/j2r_demo/Games.zip
+ source = https://github.com/deathkiller/jazz2-native/raw/master/Sources/Icons/32px.png
source = jazz2
- source = jazz2import
- sha256sums = d632139360781a534fc8d10ac17ca3370ef5bf846069f098f88220f0c98fc9c4
- sha256sums = 21e0399e95bc84eafaec6c7b41a1b4f0a8cd843286f5ab5e0638ba27c1ebf4de
- sha256sums = 4b8e7dbed18698f92fd774bb363f9d98093b3e6b797e543efaaa310fae4417fd
- sha256sums = c692cb282e6c7394544867bc4e14812bdc2e2b565b77441538ea7a6571d7ec23
- sha256sums = c26304e811702c6c06f4950e834b539a0e0c8d75393692e7896297d959ad305b
+ source = jazz2.desktop
+ md5sums = b5095a5ba6d2d7d20b2c4ff2a99301c5
+ md5sums = 5adcc9de4dac2c9b5456494a5573ea94
+ md5sums = 147429002b9f25ea80f85a8592680653
+ md5sums = 665ca003a5ff9eb51ce0fc4e23dd2ae9
pkgname = jazz2-bin
diff --git a/PKGBUILD b/PKGBUILD
index b52d61904054..1a24e86b48ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,26 @@
-## Maintainer: Konrad L. <nat@nekopon.pl>
-
pkgname=jazz2-bin
-pkgver=0.7.3
+pkgver=autoupdates
pkgrel=1
-pkgdesc="Jazz² Resurrection: An open-source reimplementation of Jazz Jackrabbit 2"
-arch=('x86_64')
-url="http://deat.tk/jazz2/"
-license=('GPL3')
-depends=(mono openal)
-options=("!strip")
-install="${pkgname}.install"
-
-source=("$pkgname-$pkgver.zip::https://github.com/deathkiller/jazz2/releases/download/$pkgver/Jazz2_${pkgver}_Desktop.zip"
- "$pkgname.png::https://raw.githubusercontent.com/deathkiller/jazz2/master/Jazz2.Android/Resources/mipmap-xxhdpi/ic_launcher.png"
- "jazz2.desktop"
- "jazz2"
- "jazz2import")
-
-sha256sums=('d632139360781a534fc8d10ac17ca3370ef5bf846069f098f88220f0c98fc9c4'
- '21e0399e95bc84eafaec6c7b41a1b4f0a8cd843286f5ab5e0638ba27c1ebf4de'
- '4b8e7dbed18698f92fd774bb363f9d98093b3e6b797e543efaaa310fae4417fd'
- 'c692cb282e6c7394544867bc4e14812bdc2e2b565b77441538ea7a6571d7ec23'
- 'c26304e811702c6c06f4950e834b539a0e0c8d75393692e7896297d959ad305b')
-
-package() {
- # Install scripts
- install -d "${pkgdir}"/usr/bin
- install -Dm755 jazz2{,import} "${pkgdir}"/usr/bin
-
- # Install image
- install -Dm644 "${srcdir}"/"${pkgname}".png "${pkgdir}"/usr/share/pixmaps/jazz2.png
-
- # Install desktop file
- install -Dm644 jazz2.desktop "${pkgdir}"/usr/share/applications/jazz2.desktop
-
- # Install game files
- install -d "${pkgdir}"/opt/jazz2-bin
- cp -r "${srcdir}"/Jazz2/* "${pkgdir}"/opt/jazz2-bin
- install -Dm755 "${srcdir}"/Jazz2/Jazz2.exe "${pkgdir}"/opt/jazz2-bin
+pkgdesc="Jazz² Resurrection: Open-source Jazz Jackrabbit 2 reimplementation (release or nightly channel)"
+arch=(x86_64 aarch64)
+url=http://deat.tk/jazz2/
+license=(GPL3 MIT/Expat)
+depends=(libopenmpt openal sdl2 zenity)
+install=jazz2.install
+source=(
+ https://archive.org/download/j2r_demo/Games.zip
+ https://github.com/deathkiller/jazz2-native/raw/master/Sources/Icons/32px.png
+ jazz2{,.desktop})
+md5sums=(
+ b5095a5ba6d2d7d20b2c4ff2a99301c5
+ 5adcc9de4dac2c9b5456494a5573ea94
+ 147429002b9f25ea80f85a8592680653
+ 665ca003a5ff9eb51ce0fc4e23dd2ae9)
+package(){
+ install jazz2 -Dt "$pkgdir"/usr/bin
+ install "Games/Jazz2 Secret Files Demo/"* -Dt "$pkgdir/usr/share/Jazz² Resurrection/Source"
+ cp -r Games/Jazz2Sw/* "$pkgdir/usr/share/Jazz² Resurrection"
+ install -D {32px,"$pkgdir"/usr/share/pixmaps/jazz2}.png
+ install jazz2.desktop -Dt "$pkgdir"/usr/share/applications
+ sed '/^Name=/s/$/ (Update)/;/^Exec=/s/$/ update/' jazz2.desktop>"$pkgdir"/usr/share/applications/jazz2-update.desktop
}
diff --git a/jazz2 b/jazz2
index 78507bb54f6c..fbf28df3961d 100644
--- a/jazz2
+++ b/jazz2
@@ -1,4 +1,34 @@
-#!/usr/bin/env bash
-pushd /opt/jazz2-bin/
- mono Jazz2.exe
-popd
+#!/bin/sh
+CONFDIR=~/.local/share/Jazz²\ Resurrection
+cd "$CONFDIR"
+UPDDIR=$CONFDIR/Update
+[ "$1" = update ] || [ ! -f "$UPDDIR"/jazz2 ] && {
+ VERFILE=$UPDDIR/version
+ ICON=/usr/share/pixmaps/jazz2.png
+ [ -f "$VERFILE" ] && { CHANNEL=release;[ `grep '\.' "$VERFILE"` ] || CHANNEL=nightly;} ||
+ CHANNEL=`zenity --list --column= --column= --hide-header --text=Select\ channel: true release . nightly --radiolist --window-icon=$ICON --title= --width=0` || exit
+ TMP=/tmp/stdout
+ LINK=https://nightly.link/deathkiller/jazz2-native/workflows/linux`[ $(uname -m) = x86_64 ] || echo _cc`/master/Jazz2_Linux_`uname -m|sed s/86_//`_SDL2
+ ([ $CHANNEL = release ] && curl -s https://api.github.com/repos/deathkiller/jazz2/releases/latest|grep tag_name|cut -d\" -f4>$TMP ||
+ curl -s `curl -s $LINK|grep View\ run|cut -d\" -f4`|grep commit/|cut -d\" -f4|cut -d/ -f5>$TMP)|
+ zenity --progress --text=Checking\ update... --pulsate --auto-close --no-cancel --window-icon=$ICON --title=
+ VER=`cat $TMP`;rm $TMP
+ [ $CHANNEL = release ] && LINK=https://github.com/deathkiller/jazz2/releases/download/$VER/Jazz2_${VER}_Linux
+ [ "`cat "$VERFILE" 2>/dev/null`" = $VER ] || {
+ TMP2=/tmp/ARM64
+ mkdir $TMP2
+ (curl -Lso- $LINK.zip|bsdtar -xf- -C`[ $CHANNEL = release ] && echo /tmp $(uname -m|sed s/86_//\;s/aarch/ARM/)/{Content,jazz2_sdl2} || echo $TMP2`)|
+ zenity --progress --text=Downloading\ update... --pulsate --auto-close --no-cancel --window-icon=$ICON --title=
+ mv $TMP2/jazz2{_sdl2,} 2>/dev/null
+ chmod +x $TMP2/jazz2
+ rm -fr "$UPDDIR"
+ mv $TMP2 "$UPDDIR"
+ echo $VER>"$VERFILE"
+ ln -fs Update/Content "$CONFDIR"
+ }
+}
+DIR=/share/Jazz²\ Resurrection/Source
+mkdir -p ~/.local"$DIR"
+cp -n /usr"$DIR"/* ~/.local"$DIR"
+[ -f ~/.local"$DIR"/Anims.j2a ] && rm ~/.local"$DIR"/AnimsSw.j2a || cp -n /usr"$DIR"/../AnimsSw.j2a ~/.local"$DIR"
+"$UPDDIR"/jazz2
diff --git a/jazz2-bin.install b/jazz2-bin.install
deleted file mode 100644
index 2935380ac5cb..000000000000
--- a/jazz2-bin.install
+++ /dev/null
@@ -1,7 +0,0 @@
-post_install() {
- echo " Use /usr/bin/jazz2import with root permissions to import Jazz Jackrabbit 2 asssets."
-}
-
-post_remove() {
- echo " Game assets at /opt/jazz2-bin/Content were not removed."
-}
diff --git a/jazz2-bin.png b/jazz2-bin.png
deleted file mode 100644
index cb74aee4735b..000000000000
--- a/jazz2-bin.png
+++ /dev/null
Binary files differ
diff --git a/jazz2.desktop b/jazz2.desktop
index 603f10c67b3c..01e2bf3025a0 100644..100755
--- a/jazz2.desktop
+++ b/jazz2.desktop
@@ -1,8 +1,9 @@
[Desktop Entry]
+Type=Application
Name=Jazz² Resurrection
-Comment="An open-source reimplementation of Jazz Jackrabbit 2"
-Exec=/usr/bin/jazz2
+Exec=jazz2
Icon=jazz2
-Terminal=false
-Type=Application
-Categories=Game;
+Comment=Open-source reimplementation of Jazz Jackrabbit 2
+Comment[cs]=Open-source reimplementace Jazz Jackrabbit 2
+Comment[sk]=Open source reimplementácia Jazz Jackrabbit 2
+Categories=Game
diff --git a/jazz2.install b/jazz2.install
new file mode 100644
index 000000000000..a63f8fb3f4f5
--- /dev/null
+++ b/jazz2.install
@@ -0,0 +1,3 @@
+post_install(){
+ echo -e '\e[93mPlace your game data into "~/.local/share/Jazz² Resurrection/Source" folder\e[m'
+}
diff --git a/jazz2import b/jazz2import
deleted file mode 100644
index d7d1657f0239..000000000000
--- a/jazz2import
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-if [[ $(/usr/bin/id -u) -ne 0 ]]; then
- echo "Not running as root"
- exit
-fi
-
-pushd /opt/jazz2-bin/
- mono Import.exe "$@"
-popd