Files
PKGBUILDS/zapzap-bin/pkg.sh
T
Felitendo fa1c190d17 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].
2026-07-27 17:40:53 +02:00

29 lines
1.0 KiB
Bash

# zapzap-bin - ZapZap (https://github.com/rafatosta/zapzap), WhatsApp desktop
# client written in PyQt6 + PyQt6-WebEngine.
#
# Upstream publishes a pure-Python wheel per release, which the PKGBUILD
# installs against the system PyQt6 packages - unlike upstream's deb/AppImage
# bundles, which vendor all of Qt. Icon, desktop file and metainfo are not
# part of the wheel and come from the matching source tag.
#
# Upstream tags carry no "v" prefix.
UPSTREAM_REPO="rafatosta/zapzap"
latest_version() {
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
}
# refresh_checksums <version> <pkgbuild-path>
refresh_checksums() {
local ver="$1" pkgbuild="$2"
local sha_whl sha_src
sha_whl="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$ver/zapzap-$ver-py3-none-any.whl" \
| sha256sum | cut -d' ' -f1)"
sha_src="$(curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/$ver.tar.gz" \
| sha256sum | cut -d' ' -f1)"
sed -i "s|^sha256sums=.*|sha256sums=('$sha_whl' '$sha_src')|" "$pkgbuild"
}