Yea that is kinda problematic, and FUTO should address it, but in the mean time I've came up with this.
1. Skip all checksums as you suggested
2. Using find
with regex to find Grayjay directory after unziping.
3. Because once /usr/bin/grayjay script has copied GJ to ~/.local/share, it will not update them, I added an if
to check if AppVersion.json has changed.
diff --git a/.SRCINFO b/.SRCINFO
index 10be31d..f61ce8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,6 +19,6 @@ pkgbase = grayjay-bin
conflicts = grayjay-git
options = !strip
source = Grayjay.Desktop-linux-x64.zip::https://updater.grayjay.app/Apps/Grayjay.Desktop/Grayjay.Desktop-linux-x64.zip
- sha256sums = 314e002552a413cd3f13d8a4abd44a20bf59de7a70982d8dd0f1f26ddfbe8d03
+ sha256sums = SKIP
pkgname = grayjay-bin
diff --git a/PKGBUILD b/PKGBUILD
index b8fefd9..8fca997 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ conflicts=('grayjay-git')
options=(!strip)
_filename="Grayjay.Desktop-linux-x64.zip"
source=("${_filename}::https://updater.grayjay.app/Apps/Grayjay.Desktop/${_filename}")
-sha256sums=('314e002552a413cd3f13d8a4abd44a20bf59de7a70982d8dd0f1f26ddfbe8d03')
+sha256sums=('SKIP')
prepare() {
mkdir -p "${srcdir}/grayjay"
@@ -20,7 +20,7 @@ prepare() {
}
package() {
- cd "${srcdir}/grayjay/Grayjay.Desktop-linux-x64-v2"
+ cd $(find "${srcdir}/grayjay" -type d -name "Grayjay.Desktop-linux-x64-v*")
# Create necessary directories
install -dm755 "${pkgdir}/usr/share/grayjay"
@@ -41,6 +41,14 @@ if [ ! -d "$APP_DIR" ]; then
chmod u+w -R "$APP_DIR"
fi
+if [ "$(cat $APP_DIR/AppVersion.json)" != "$(cat /usr/share/grayjay/AppVersion.json)" ]; then
+ echo "User Grayjay copy AppVersion.json doesn't match system version, overwriting $APP_DIR with new version"
+ rm -rf "$APP_DIR"
+ mkdir -p "$APP_DIR"
+ cp -r /usr/share/grayjay/* "$APP_DIR/"
+ chmod u+w -R "$APP_DIR"
+fi
+
exec sh -c "cd '$APP_DIR' && exec ./Grayjay \"\$@\"" -- "$@"
EOF
chmod 755 "${pkgdir}/usr/bin/grayjay"
Pinned Comments
nathanchere commented on 2025-01-30 06:30 (UTC)
Sorry for the unreliable builds recently. I've spoken with Futo about the generic latestversion.zip downloads and have been advised about versioned links which they don't officially publish. Hopefully that should finally resolve the issue of this package breaking when a new release is published to the same download URL breaking checksums.