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
+15
-49
@@ -1,60 +1,26 @@
|
||||
# chiaki-ng-bin - prebuilt package of https://github.com/streetpea/chiaki-ng
|
||||
# (free PlayStation Remote Play client, C/C++ + Qt6).
|
||||
# chiaki-ng-bin - chiaki-ng (https://github.com/streetpea/chiaki-ng), a free
|
||||
# PlayStation Remote Play client (C/C++ + Qt6).
|
||||
#
|
||||
# Upstream ships no plain Linux binaries (only AppImage/flatpak), so
|
||||
# build_artifact() builds from a git checkout of the release tag (the source
|
||||
# tarballs lack the required submodules). Mirrors the AUR source package:
|
||||
# system curl instead of the vendored submodule, plus the Qt6GuiPrivate
|
||||
# CMake fix carried in this directory.
|
||||
# Upstream publishes an AppImage per release, which the PKGBUILD unpacks and
|
||||
# installs into /opt - so there is no build step here, only pkgver and the
|
||||
# checksums are refreshed on a new version. The license texts are not part of
|
||||
# the AppImage and come from the matching source tag.
|
||||
|
||||
UPSTREAM_REPO="streetpea/chiaki-ng"
|
||||
|
||||
# Installed in CI (pacman) before build_artifact runs.
|
||||
BUILD_DEPS=(cmake git python-protobuf python-setuptools protobuf
|
||||
vulkan-headers qt6-base qt6-declarative qt6-svg qt6-webengine
|
||||
sdl2 ffmpeg fftw hidapi json-c libplacebo miniupnpc opus speexdsp
|
||||
openssl curl libssh2)
|
||||
|
||||
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 pkgdir workdir destdir srctree
|
||||
pkgdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
workdir="$(mktemp -d)"
|
||||
destdir="$(mktemp -d)"
|
||||
srctree="$workdir/src"
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local sha_img sha_lic
|
||||
|
||||
git clone --branch "v$ver" --depth 1 "https://github.com/$UPSTREAM_REPO.git" "$srctree"
|
||||
sha_img="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/v$ver/chiaki-ng.AppImage_x86_64" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
sha_lic="$(curl -sfL "https://raw.githubusercontent.com/$UPSTREAM_REPO/v$ver/COPYING" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
|
||||
# use the system curl instead of the vendored submodule
|
||||
git -C "$srctree" rm -q third-party/curl
|
||||
sed -i 's:libcurl_shared:libcurl:' "$srctree/lib/CMakeLists.txt"
|
||||
# newer tags (>= 1.10.0) carry the GuiPrivate fix themselves
|
||||
if ! grep -q 'GuiPrivate' "$srctree/gui/CMakeLists.txt"; then
|
||||
patch -d "$srctree" -p1 < "$pkgdir/Qt6GuiPrivate-fix.patch"
|
||||
fi
|
||||
git -C "$srctree" submodule update --init
|
||||
|
||||
CFLAGS="${CFLAGS:-} -std=gnu17" cmake -B "$workdir/build" -S "$srctree" -Wno-dev \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCHIAKI_USE_SYSTEM_CURL=ON
|
||||
cmake --build "$workdir/build" -j"$(nproc)"
|
||||
DESTDIR="$destdir" cmake --install "$workdir/build"
|
||||
|
||||
# AGPL-3.0-only-OpenSSL: not a common license, ship the texts
|
||||
mkdir -p "$destdir/usr/share/licenses/chiaki-ng-bin"
|
||||
install -m644 "$srctree/LICENSES/"* "$destdir/usr/share/licenses/chiaki-ng-bin/"
|
||||
|
||||
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 "s|^sha256sums=.*|sha256sums=('$sha_img' '$sha_lic')|" "$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user