diff --git a/pkgbuilds/cua-driver-bin/PKGBUILD b/pkgbuilds/cua-driver-bin/PKGBUILD index 59ba5b5..07ce954 100644 --- a/pkgbuilds/cua-driver-bin/PKGBUILD +++ b/pkgbuilds/cua-driver-bin/PKGBUILD @@ -18,7 +18,7 @@ # binary to point at pm.sh, a stand-in that declines and names pacman instead. pkgname=cua-driver-bin -pkgver=0.27.0 +pkgver=0.28.1 pkgrel=1 pkgdesc="Computer-use driver for native GUI apps: accessibility-tree snapshots and input injection" arch=('x86_64' 'aarch64') @@ -46,8 +46,8 @@ source_x86_64=("https://github.com/trycua/cua/releases/download/cua-driver-rs-v$ source_aarch64=("https://github.com/trycua/cua/releases/download/cua-driver-rs-v${pkgver}/cua-driver-rs-${pkgver}-linux-arm64.tar.gz") sha256sums=('c0779290c1d4783169aa3dbfb55feb505e563ef8a004bbf55298ceffcfbda8d9' 'c76e251c3ed424200eac52bec35ba534336307fabd83a175ab0b47e2084ab0d8') -sha256sums_x86_64=('331af6773b44ee781e8d6ca0e47a35aee741355bb423dfe2bd4f4acd5b697677') -sha256sums_aarch64=('2d973a8d82714cc7a80b99d107bfc68abb6bf0a81e98ff225cc85b0acfebefb3') +sha256sums_x86_64=('a068b6e477893b77ced74bceccf7db7483cf140e8d54150ce5849b6252b90bcf') +sha256sums_aarch64=('a863951ef0699fd25091adb87bd114d69709b887fdfc059e795aca49ef8ac19c') case "${CARCH}" in x86_64) _platform="linux-x86_64" ;; @@ -56,7 +56,7 @@ esac _vendor_tree="cua-driver-rs-${pkgver}-${_platform}" # Rust strings carry their length out of band, so the replacement has to be -# exactly as long as the original: 32 bytes, which is what fixes the +# exactly as long as the original, which is what fixes the # stand-in's short name and location. _vendor_installer='https://cua.ai/driver/install.sh' _pacman_installer='file:///usr/lib/cua-driver/pm.sh' @@ -69,14 +69,14 @@ prepare() { return 1 fi - # The URL appears twice: once in the updater and once in the printed - # reinstall one-liner. Any other count means upstream moved the updater - # and this rewrite needs another look, so the build stops rather than - # shipping a live self-updater. - local found + # In 0.28.1 the URL appears in the updater, the printed reinstall command, + # and two embedded copies of Skills/cua-driver/README.md. Rewrite all four + # so the embedded instructions also defer to pacman. Any other count means + # the release layout changed and needs review before packaging. + local expected=4 found found=$(grep -obUaF "${_vendor_installer}" cua-driver | wc -l) - if (( found != 2 )); then - echo "expected the vendor installer URL twice in cua-driver, found ${found}" >&2 + if (( found != expected )); then + echo "expected the vendor installer URL ${expected} times in cua-driver, found ${found}" >&2 return 1 fi @@ -87,7 +87,7 @@ prepare() { if (( size_before != size_after )) \ || grep -qUaF "${_vendor_installer}" cua-driver \ - || (( $(grep -obUaF "${_pacman_installer}" cua-driver | wc -l) != 2 )); then + || (( $(grep -obUaF "${_pacman_installer}" cua-driver | wc -l) != expected )); then echo "installer URL rewrite did not land cleanly in cua-driver" >&2 return 1 fi