Archived
47 lines
2.2 KiB
Bash
47 lines
2.2 KiB
Bash
# Maintainer: Christopher Cooper <christopher@cg505.com>
|
|
pkgname=cursor-cli
|
|
# extracted from https://cursor.com/install (managed by 'update-pkgver.sh')
|
|
_upstream_ver='2025.10.28-0a91dc2'
|
|
# Baseline pkgver; update using './update-pkgver.sh'
|
|
pkgver=2025.10.28.1.0a91dc2
|
|
pkgrel=1
|
|
epoch=1
|
|
pkgdesc="Cursor Agent CLI - AI-powered code assistant"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://cursor.com"
|
|
license=('LicenseRef-Cursor')
|
|
depends=('gcc-libs' 'bash' 'glibc' 'nodejs' 'ripgrep')
|
|
install=cursor-cli.install
|
|
source=('Cursor-TOS')
|
|
source_x86_64=("cursor-cli-${_upstream_ver}-x86_64.tar.gz::https://downloads.cursor.com/lab/${_upstream_ver}/linux/x64/agent-cli-package.tar.gz")
|
|
source_aarch64=("cursor-cli-${_upstream_ver}-aarch64.tar.gz::https://downloads.cursor.com/lab/${_upstream_ver}/linux/arm64/agent-cli-package.tar.gz")
|
|
b2sums=('7079c023e03ea4d78b067ed0f22b5cc1982c306721b2ea6be3c7f73bbbe0e8f05b148fd6571902b838464ee80a787ef7be73135c622f0a4fdb16c38429ced8d6')
|
|
b2sums_x86_64=('9dd4d14d31d49a696f17dbd1d2691f8b2d80dfd5bf53489174320c398a931f871baa6bdc376053707fde0e4d27835f567a65c9821795e39fc1aff513d061ea0b')
|
|
b2sums_aarch64=('6b05d1aa549e155d66acf90c0b860a86d7cdb068b7ccaf542ae7093a30ee3429458664d8bbcc748e346ff7714150e13fcf9718b0687c58cd945433a84e1cd9d2')
|
|
|
|
package() {
|
|
# Create necessary directories
|
|
install -dm755 "${pkgdir}/opt/cursor-agent"
|
|
install -dm755 "${pkgdir}/usr/bin"
|
|
|
|
# Copy all files from the extracted package
|
|
cp -r "${srcdir}"/dist-package/* "${pkgdir}/opt/cursor-agent/"
|
|
|
|
# Replace node and rg with system versions
|
|
ln -sf "/usr/bin/node" "${pkgdir}/opt/cursor-agent/node"
|
|
ln -sf "/usr/bin/rg" "${pkgdir}/opt/cursor-agent/rg"
|
|
|
|
# Patch cursor-agent script to block auto-updates
|
|
sed -i '/^NODE_BIN=/a\
|
|
# Block cursor-agent auto-updates\
|
|
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/cursor-agent/versions"\
|
|
chmod -x "${XDG_DATA_HOME:-$HOME/.local/share}/cursor-agent/versions"' "${pkgdir}/opt/cursor-agent/cursor-agent"
|
|
|
|
# Create symlink in /usr/bin
|
|
ln -s "/opt/cursor-agent/cursor-agent" "${pkgdir}/usr/bin/cursor-agent"
|
|
|
|
# Install license
|
|
# This is downloaded from https://cursor.com/terms-of-service
|
|
install -Dm644 Cursor-TOS "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|