Files
omarchy-pkgs/pkgbuilds/grok-bot/PKGBUILD
T
Timothy Wright cb3909f052 Automate Grok Bot releases (#583)
* Automate Grok Bot releases

* Refresh Grok Bot to apt 0.66.0 and harden upstream.sh

Bump both architectures to Cursor apt 0.66.0 with matching SHA256s,
introduce a versioned _pool URL helper, and filter Packages stanzas by
Package: grok-bot so sync stays correct if the index grows.

* grok-bot: bump to 0.68.1, drop manual hold, validate pool filename

Bump both architectures to Cursor apt 0.68.1 with the SHA256s from the
amd64/arm64 Packages indexes (verified against the downloaded debs).

Drop grok-bot from the manual holds list in docs/upstream-sources.md and
have upstream.sh check that the newest stanza's Filename is the versioned
pool path the PKGBUILD downloads from. Both additions come from #848.
2026-10-08 15:50:44 -04:00

81 lines
2.6 KiB
Bash

# Maintainer: petrouil
# Contributor: Omarchy
pkgname=grok-bot
pkgver=0.68.1
pkgrel=1
pkgdesc='Grok Bot desktop agent'
arch=('x86_64' 'aarch64')
url='https://x.ai/bot'
license=('custom')
depends=(
'alsa-lib'
'at-spi2-core'
'gtk3'
'hicolor-icon-theme'
'libnotify'
'libsecret'
'libxss'
'libxtst'
'nss'
'util-linux-libs'
'xdg-utils'
)
optdepends=('libappindicator-gtk3: tray support')
provides=('sand')
conflicts=('sand')
options=('!strip' '!debug')
install=grok-bot.install
_deb_x86_64="grok-bot_${pkgver}_amd64.deb"
_deb_aarch64="grok-bot_${pkgver}_arm64.deb"
# Versioned pool paths — Packages indexes carry SHA256 so upstream.sh
# can bump pkgver without embedding a Cursor commit id.
_pool="https://downloads.cursor.com/aptrepo/pool/grok-bot/g/gr"
source=(
'grok-bot.sh'
'grok-bot.desktop'
)
source_x86_64=(
"${_deb_x86_64}::${_pool}/${_deb_x86_64}"
)
source_aarch64=(
"${_deb_aarch64}::${_pool}/${_deb_aarch64}"
)
sha256sums=('6dfa6c305941afa6cbaefbeaae06d05ab5a88f31630005d25a819a160c20c7a3'
'3e2a2461ea58d17ac1777616be9ba660f7cb9ceefa9292016e36c55758bf78dd')
sha256sums_x86_64=('b2be8106d2b3eae07d983d5f1ca77b657accde666dc440db2a409421ecff3359')
sha256sums_aarch64=('3f85fbe2ba3c1d122aa16f8be672076bc19146e07e9d431f37a93b85fa75a93f')
noextract=("${_deb_x86_64}" "${_deb_aarch64}")
package() {
local deb_var="_deb_${CARCH}"
local deb="${!deb_var}"
bsdtar -xOf "${srcdir}/${deb}" data.tar.xz |
bsdtar -x -C "${pkgdir}" -f -
rm -rf "${pkgdir}/usr/share/doc" \
"${pkgdir}/usr/share/applications/sand.desktop" \
"${pkgdir}/usr/share/applications/grok-bot.desktop"
# Always install our Wayland wrapper; do not keep any /usr/bin from the .deb.
rm -f "${pkgdir}/usr/bin/grok-bot" "${pkgdir}/usr/bin/sand"
install -Dm755 "${srcdir}/grok-bot.sh" "${pkgdir}/usr/bin/grok-bot"
ln -s grok-bot "${pkgdir}/usr/bin/sand"
install -Dm644 "${srcdir}/grok-bot.desktop" \
"${pkgdir}/usr/share/applications/grok-bot.desktop"
install -Dm644 "${pkgdir}/opt/Grok Bot/LICENSE.electron.txt" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.electron.txt"
install -Dm644 "${pkgdir}/opt/Grok Bot/LICENSES.chromium.html" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSES.chromium.html"
# Ship chrome-sandbox without setuid. Upstream's build-time userns probe
# would measure the CI container, not the user's machine, and a setuid
# helper could not exec from "/opt/Grok Bot/" anyway (electron#44414).
# grok-bot.install tells users on kernels without unprivileged user
# namespaces how to run without the sandbox.
chmod 0755 "${pkgdir}/opt/Grok Bot/chrome-sandbox"
}