lunar-client-bin: add package (3.7.12-1)

Upstream moved to an "ow" electron-updater channel with a filename
suffix; latest_version checks both channels (vercmp picks the winner) and
refresh_checksums keeps the _appimage filename in sync. Also clean up
downloaded .AppImage files like the other source leftovers.
This commit is contained in:
Felitendo committed 2026-07-24 11:33:08 +02:00
1 parent 6f0f9488ec
commit b17ec7b0b0
6 files changed
+116 -1

No files matched your search

+1
View File
@@ -5,3 +5,4 @@
*/src/ */src/
*/pkg/ */pkg/
*.deb *.deb
*.AppImage
+1
View File
@@ -44,6 +44,7 @@ users don't need any build dependencies.
| `chiaki-ng-bin` | [streetpea/chiaki-ng](https://github.com/streetpea/chiaki-ng) — PlayStation Remote Play client (Qt6) | [chiaki-ng-bin](https://aur.archlinux.org/packages/chiaki-ng-bin) | | `chiaki-ng-bin` | [streetpea/chiaki-ng](https://github.com/streetpea/chiaki-ng) — PlayStation Remote Play client (Qt6) | [chiaki-ng-bin](https://aur.archlinux.org/packages/chiaki-ng-bin) |
| `gnome-network-displays-bin` | [GNOME/gnome-network-displays](https://gitlab.gnome.org/GNOME/gnome-network-displays) — GNOME screencasting (Miracast/Chromecast) | [gnome-network-displays-bin](https://aur.archlinux.org/packages/gnome-network-displays-bin) | | `gnome-network-displays-bin` | [GNOME/gnome-network-displays](https://gitlab.gnome.org/GNOME/gnome-network-displays) — GNOME screencasting (Miracast/Chromecast) | [gnome-network-displays-bin](https://aur.archlinux.org/packages/gnome-network-displays-bin) |
| `waydroid-helper-bin` | [ayasa520/waydroid-helper](https://github.com/ayasa520/waydroid-helper) — GTK4 GUI for Waydroid configuration and extensions | [waydroid-helper-bin](https://aur.archlinux.org/packages/waydroid-helper-bin) | | `waydroid-helper-bin` | [ayasa520/waydroid-helper](https://github.com/ayasa520/waydroid-helper) — GTK4 GUI for Waydroid configuration and extensions | [waydroid-helper-bin](https://aur.archlinux.org/packages/waydroid-helper-bin) |
| `lunar-client-bin` | [lunarclient.com](https://lunarclient.com) — Minecraft PvP modpack launcher (upstream AppImage) | [lunar-client-bin](https://aur.archlinux.org/packages/lunar-client-bin) |
## Setup (one-time) ## Setup (one-time)
+19
View File
@@ -0,0 +1,19 @@
pkgbase = lunar-client-bin
pkgdesc = PvP modpack for all modern versions of Minecraft (upstream AppImage)
pkgver = 3.7.12
pkgrel = 1
url = https://lunarclient.com
arch = x86_64
license = LicenseRef-proprietary
depends = fuse2
depends = xorg-xrandr
provides = lunar-client
provides = lunarclient
conflicts = lunar-client
conflicts = lunarclient
options = !strip
options = !debug
source = lunarclient-3.7.12.AppImage::https://launcherupdates.lunarclientcdn.com/Lunar%20Client-3.7.12-ow.AppImage
sha256sums = 7364e876a59291d8b0b7d6c0efdacb988617e35e054e9c21a5814d071710bf98
pkgname = lunar-client-bin
+48
View File
@@ -0,0 +1,48 @@
# Maintainer: Felitendo
# This PKGBUILD is updated automatically:
# https://github.com/Felitendo/PKGBUILDS
pkgname=lunar-client-bin
_pkgname=lunarclient
pkgver=3.7.12
pkgrel=1
pkgdesc="PvP modpack for all modern versions of Minecraft (upstream AppImage)"
arch=('x86_64')
url="https://lunarclient.com"
license=('LicenseRef-proprietary')
depends=('fuse2' 'xorg-xrandr')
provides=('lunar-client' 'lunarclient')
conflicts=('lunar-client' 'lunarclient')
options=('!strip' '!debug')
# maintained by CI together with pkgver (upstream varies the filename suffix)
_appimage="Lunar%20Client-3.7.12-ow.AppImage"
source=("${_pkgname}-${pkgver}.AppImage::https://launcherupdates.lunarclientcdn.com/${_appimage}")
sha256sums=('7364e876a59291d8b0b7d6c0efdacb988617e35e054e9c21a5814d071710bf98')
prepare() {
chmod +x "${_pkgname}-${pkgver}.AppImage"
"./${_pkgname}-${pkgver}.AppImage" --appimage-extract
}
build() {
# make the .desktop file work outside of the AppImage container
sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|" \
"squashfs-root/${_pkgname}.desktop"
# AppImage directory permissions are 700
chmod -R a-x+rX squashfs-root/usr
}
package() {
install -Dm755 "${srcdir}/${_pkgname}-${pkgver}.AppImage" \
"${pkgdir}/opt/${_pkgname}/${_pkgname}.AppImage"
install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop" \
"${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install -Dm644 \
"${srcdir}/squashfs-root/usr/share/icons/hicolor/1024x1024/apps/${_pkgname}.png" \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png"
install -dm755 "${pkgdir}/usr/bin"
ln -s "/opt/${_pkgname}/${_pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}"
}
+46
View File
@@ -0,0 +1,46 @@
# lunar-client-bin - Lunar Client (https://lunarclient.com), Minecraft PvP
# modpack launcher, proprietary Electron AppImage.
#
# Upstream hosts versioned AppImages itself, so there is no build_artifact():
# on a new version pkgver, the artifact filename (_appimage) and the checksum
# are refreshed. Upstream currently publishes on the "ow" electron-updater
# channel (latest-ow-linux.yml) with an -ow filename suffix; the old plain
# channel (latest-linux.yml) went stale but is still checked in case they
# switch back - whichever carries the higher version wins.
DL_BASE="https://launcherupdates.lunarclientcdn.com"
_channel_version() {
curl -sf "$DL_BASE/$1" | grep -Po '^version: \K\S+'
}
latest_version() {
local a b
a="$(_channel_version latest-ow-linux.yml | sed 's/-.*//')"
b="$(_channel_version latest-linux.yml | sed 's/-.*//')"
[[ -n "$a" || -n "$b" ]] || return 1
if [[ -n "$a" && -n "$b" ]]; then
if [[ "$(vercmp "$a" "$b")" -ge 0 ]]; then echo "$a"; else echo "$b"; fi
else
echo "${a:-$b}"
fi
}
# refresh_checksums <version> <pkgbuild-path>
refresh_checksums() {
local ver="$1" pkgbuild="$2"
local yml file sha
for yml in latest-ow-linux.yml latest-linux.yml; do
file="$(curl -sf "$DL_BASE/$yml" | grep -Po '^path: \K.*\.AppImage')"
[[ "$file" == *"$ver"* ]] && break
file=""
done
[[ -n "$file" ]] || { echo "no updater channel carries version $ver" >&2; return 1; }
file="${file// /%20}"
sha="$(curl -sfL "$DL_BASE/$file" | sha256sum | cut -d' ' -f1)"
sed -i \
-e "s|^_appimage=.*|_appimage=\"$file\"|" \
-e "s|^sha256sums=.*|sha256sums=('$sha')|" \
"$pkgbuild"
}
+1 -1
View File
@@ -112,7 +112,7 @@ mv "$pkg/.SRCINFO.new" "$pkg/.SRCINFO"
# drop downloaded sources and build leftovers (all gitignored, never tracked) # drop downloaded sources and build leftovers (all gitignored, never tracked)
rm -rf "$pkg/src" "$pkg/pkg" rm -rf "$pkg/src" "$pkg/pkg"
rm -f "$pkg"/*.pkg.tar.* "$pkg"/*.tar.zst "$pkg"/*.tar.gz "$pkg"/*.deb rm -f "$pkg"/*.pkg.tar.* "$pkg"/*.tar.zst "$pkg"/*.tar.gz "$pkg"/*.deb "$pkg"/*.AppImage
### 4: commit back to this repository ######################################## ### 4: commit back to this repository ########################################