# 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" }