Group A: source upstream binaries instead of self-built artifacts
The AUR does not allow packages to ship a binary tarball built by the maintainer - a -bin package must repackage a deliverable published by upstream. These six packages now do that: snapx-bin upstream's self-contained Linux tar.zst zapzap-bin upstream's pure-Python wheel faugus-launcher-bin upstream's arch-independent .deb wiiudownloader-bin upstream's AppImage waydroid-helper-bin upstream's AppImage chiaki-ng-bin upstream's AppImage All six drop build_artifact() and switch to refresh_checksums(), so CI no longer builds or hosts anything - it only tracks upstream's assets. Where the asset name carries build metadata that does not follow from pkgver (snapx, faugus-launcher), refresh_checksums() resolves it via the GitHub API and syncs an _asset variable in the PKGBUILD. Dependency lists are re-derived from what the bundles actually resolve outside themselves; the AppImage payloads land in /opt with wrappers in /usr/bin, because their entry points resolve paths relative to argv[0].
This commit is contained in:
1 parent
c25c2790e8
commit
fa1c190d17
19 files changed
+428
-379
No files matched your search
@@ -1,7 +1,7 @@
|
||||
pkgbase = faugus-launcher-bin
|
||||
pkgdesc = Simple and lightweight app for running Windows games using UMU-Launcher (prebuilt)
|
||||
pkgdesc = Simple and lightweight app for running Windows games using UMU-Launcher (upstream binary)
|
||||
pkgver = 2.0.2
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/Faugus/faugus-launcher
|
||||
arch = any
|
||||
license = MIT
|
||||
@@ -21,7 +21,8 @@ pkgbase = faugus-launcher-bin
|
||||
optdepends = gamemode: feral gamemode integration
|
||||
provides = faugus-launcher
|
||||
conflicts = faugus-launcher
|
||||
source = faugus-launcher-bin-2.0.2-1.tar.zst::https://github.com/Felitendo/PKGBUILDS/releases/download/faugus-launcher-bin-2.0.2/faugus-launcher-bin-2.0.2.tar.zst
|
||||
sha256sums = 5fcf441cccb1ccc0ac554760e93744d557fd05a3fc4335132a59e55aefe902af
|
||||
noextract = faugus-launcher-bin-2.0.2.deb
|
||||
source = faugus-launcher-bin-2.0.2.deb::https://github.com/Faugus/faugus-launcher/releases/download/2.0.2/faugus-launcher_2.0.2-1_all.deb
|
||||
sha256sums = c694d85af50cdc5fc6fbd50453075b799d5a458cc0bd123abe31aafde8cdc6fa
|
||||
|
||||
pkgname = faugus-launcher-bin
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
pkgname=faugus-launcher-bin
|
||||
pkgver=2.0.2
|
||||
pkgrel=1
|
||||
pkgdesc="Simple and lightweight app for running Windows games using UMU-Launcher (prebuilt)"
|
||||
pkgrel=2
|
||||
pkgdesc="Simple and lightweight app for running Windows games using UMU-Launcher (upstream binary)"
|
||||
arch=('any')
|
||||
url="https://github.com/Faugus/faugus-launcher"
|
||||
license=('MIT')
|
||||
@@ -16,9 +16,51 @@ optdepends=('mangohud: performance overlay'
|
||||
'gamemode: feral gamemode integration')
|
||||
provides=('faugus-launcher')
|
||||
conflicts=('faugus-launcher')
|
||||
source=("${pkgname}-${pkgver}-${pkgrel}.tar.zst::https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst")
|
||||
sha256sums=('5fcf441cccb1ccc0ac554760e93744d557fd05a3fc4335132a59e55aefe902af')
|
||||
# The Debian revision in the asset name does not follow from pkgver, so the
|
||||
# exact name is tracked here and refreshed automatically.
|
||||
_asset="faugus-launcher_2.0.2-1_all.deb"
|
||||
source=("${pkgname}-${pkgver}.deb::${url}/releases/download/${pkgver}/${_asset}")
|
||||
noextract=("${pkgname}-${pkgver}.deb")
|
||||
sha256sums=('c694d85af50cdc5fc6fbd50453075b799d5a458cc0bd123abe31aafde8cdc6fa')
|
||||
|
||||
package() {
|
||||
cp -a "$srcdir/usr" "$pkgdir/"
|
||||
local _deb="$srcdir/deb"
|
||||
|
||||
install -d "$_deb"
|
||||
bsdtar -xOf "$srcdir/${pkgname}-${pkgver}.deb" 'data.tar.*' \
|
||||
| bsdtar -xpf - -C "$_deb" ./usr
|
||||
|
||||
# Debian puts the modules in dist-packages, which is not on Arch's
|
||||
# sys.path. A fixed private directory also keeps the package working
|
||||
# across Python minor bumps, since it is only rebuilt for new releases.
|
||||
install -d "$pkgdir/usr/lib/faugus-launcher"
|
||||
cp -a "$_deb/usr/lib/python3/dist-packages/faugus" "$pkgdir/usr/lib/faugus-launcher/"
|
||||
# .pyc compiled for Debian's Python, useless here
|
||||
find "$pkgdir/usr/lib/faugus-launcher" -type d -name __pycache__ -exec rm -rf {} +
|
||||
|
||||
cp -a "$_deb/usr/share" "$pkgdir/usr/"
|
||||
# generated by pacman hooks; shipping them would cause file conflicts
|
||||
rm -f "$pkgdir/usr/share/applications/mimeinfo.cache" \
|
||||
"$pkgdir/usr/share/icons/hicolor/icon-theme.cache"
|
||||
|
||||
# upstream's wrapper relies on Debian's default sys.path, ours points at
|
||||
# the directory above; the rest matches upstream verbatim
|
||||
install -d "$pkgdir/usr/bin"
|
||||
cat > "$pkgdir/usr/bin/faugus-launcher" << 'EOF'
|
||||
#!/bin/sh
|
||||
|
||||
export PYTHONPATH="/usr/lib/faugus-launcher${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export GTK_IM_MODULE="${GTK_IM_MODULE:-simple}"
|
||||
|
||||
case "$1" in
|
||||
--shortcut) exec /usr/bin/python3 -m faugus.shortcut "$2";;
|
||||
--game) exec /usr/bin/python3 -m faugus.runner --game "$2";;
|
||||
--run) msg="$2"; shift 2; exec /usr/bin/python3 -m faugus.runner "$msg" "$@";;
|
||||
*) exec /usr/bin/python3 -m faugus.launcher "$@";;
|
||||
esac
|
||||
EOF
|
||||
chmod 755 "$pkgdir/usr/bin/faugus-launcher"
|
||||
|
||||
mv "$pkgdir/usr/share/licenses/faugus-launcher" \
|
||||
"$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
+22
-42
@@ -1,54 +1,34 @@
|
||||
# faugus-launcher-bin - prebuilt package of https://github.com/Faugus/faugus-launcher
|
||||
# (GTK4 game launcher for running Windows games through UMU-Launcher, Python).
|
||||
# faugus-launcher-bin - Faugus Launcher
|
||||
# (https://github.com/Faugus/faugus-launcher), a GTK4 front-end for running
|
||||
# Windows games through UMU-Launcher.
|
||||
#
|
||||
# Upstream ships AppImage/deb/rpm but no Arch-friendly binary, so
|
||||
# build_artifact() builds the meson project from the release tarball.
|
||||
# Upstream publishes an architecture-independent .deb per release, which the
|
||||
# PKGBUILD repackages. The Debian revision in the asset name is not derived
|
||||
# from the version, so refresh_checksums() resolves the asset via the GitHub
|
||||
# API and syncs the _asset variable in the PKGBUILD along with the checksum.
|
||||
#
|
||||
# Upstream tags carry no "v" prefix.
|
||||
|
||||
UPSTREAM_REPO="Faugus/faugus-launcher"
|
||||
|
||||
# Installed in CI (pacman) before build_artifact runs.
|
||||
# (Translations ship as prebuilt .mo files, so no gettext needed.)
|
||||
BUILD_DEPS=(meson ninja python)
|
||||
|
||||
latest_version() {
|
||||
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# build_artifact <version> <output-file>
|
||||
build_artifact() {
|
||||
local ver="$1" outfile="$2"
|
||||
local workdir destdir srctree sitedir
|
||||
workdir="$(mktemp -d)"
|
||||
destdir="$(mktemp -d)"
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local asset sha
|
||||
|
||||
curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/$ver.tar.gz" | tar -xz -C "$workdir"
|
||||
srctree="$workdir/faugus-launcher-$ver"
|
||||
asset="$(gh api "repos/$UPSTREAM_REPO/releases/tags/$ver" --jq '.assets[].name' \
|
||||
| grep -E "^faugus-launcher_${ver}-[0-9]+_all\.deb$")"
|
||||
[[ "$(wc -l <<< "$asset")" -eq 1 ]] || { echo "expected exactly one deb, got: $asset" >&2; return 1; }
|
||||
|
||||
meson setup "$workdir/build" "$srctree" --prefix=/usr --buildtype=release
|
||||
meson install -C "$workdir/build" --destdir "$destdir"
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$ver/$asset" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
|
||||
# meson installs the python modules into site-packages, whose path changes
|
||||
# with every Python minor bump and would silently break a prebuilt package.
|
||||
# Relocate to a fixed dir and put it on the launcher's PYTHONPATH (the
|
||||
# launcher script already appends any pre-set PYTHONPATH to its own).
|
||||
sitedir="$(find "$destdir/usr/lib" -maxdepth 2 -type d -name site-packages)"
|
||||
[[ -d "$sitedir/faugus" ]] || { echo "faugus module not found in $sitedir" >&2; return 1; }
|
||||
mkdir -p "$destdir/usr/lib/faugus-launcher"
|
||||
mv "$sitedir/faugus" "$destdir/usr/lib/faugus-launcher/"
|
||||
rm -rf "$destdir/usr/lib/python"*
|
||||
|
||||
head -1 "$destdir/usr/bin/faugus-launcher" | grep -qx '#!/bin/sh' \
|
||||
|| { echo "unexpected launcher script format" >&2; return 1; }
|
||||
sed -i '1a export PYTHONPATH="/usr/lib/faugus-launcher${PYTHONPATH:+:$PYTHONPATH}"' \
|
||||
"$destdir/usr/bin/faugus-launcher"
|
||||
|
||||
# These caches are generated by pacman hooks; shipping them would cause
|
||||
# file conflicts on install.
|
||||
rm -f "$destdir/usr/share/applications/mimeinfo.cache" \
|
||||
"$destdir/usr/share/icons/hicolor/icon-theme.cache"
|
||||
|
||||
tar --zstd --sort=name --owner=0 --group=0 --numeric-owner --mtime='@0' \
|
||||
-cf "$outfile" -C "$destdir" usr
|
||||
|
||||
rm -rf "$workdir" "$destdir"
|
||||
sed -i \
|
||||
-e "s|^_asset=.*|_asset=\"$asset\"|" \
|
||||
-e "s|^sha256sums=.*|sha256sums=('$sha')|" \
|
||||
"$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user