34 lines
1.7 KiB
Bash
34 lines
1.7 KiB
Bash
# Maintainer: Gunther Schulz <dev@guntherschulz.de>
|
|
|
|
pkgname=cursor-bin
|
|
pkgver=2.0.77
|
|
pkgrel=1
|
|
pkgdesc='AI-first coding environment'
|
|
arch=('x86_64')
|
|
url="https://www.cursor.com"
|
|
license=('LicenseRef-Cursor_EULA')
|
|
_electron=electron34
|
|
depends=(xdg-utils ripgrep $_electron nodejs
|
|
'gcc-libs' 'hicolor-icon-theme' 'libxkbfile')
|
|
options=(!strip) # Don't break ext of VSCode
|
|
_commit=ba90f2f88e4911312761abab9492c42442117cfe # sed'ded at GitHub WF
|
|
source=("https://downloads.cursor.com/production/ba90f2f88e4911312761abab9492c42442117cfe/linux/x64/deb/amd64/deb/cursor_2.0.77_amd64.deb"
|
|
https://gitlab.archlinux.org/archlinux/packaging/packages/code/-/raw/main/code.sh rg.sh)
|
|
sha512sums=('453378af91e43960dbf25b9766f7bc161d2fcde257b824b0f65af94083b131a9bfd0bb9c8c922484994a99c6450697b3fb3700d65b0e4bd8f0bf07c6fa9863b4'
|
|
'937299c6cb6be2f8d25f7dbc95cf77423875c5f8353b8bd6cd7cc8e5603cbf8405b14dbf8bd615db2e3b36ed680fc8e1909410815f7f8587b7267a699e00ab37' 'SKIP')
|
|
|
|
_app=usr/share/cursor/resources/app
|
|
package() {
|
|
# Exclude electron
|
|
tar -xf data.tar.xz -C "$pkgdir" --exclude 'usr/share/cursor/[^r]*' --exclude 'usr/share/cursor/*.pak'
|
|
cd "$pkgdir"
|
|
mv usr/share/zsh/{vendor-completions,site-functions}
|
|
ln -sf /usr/bin/node ${_app}/resources/helpers/node
|
|
install -Dm755 "${srcdir}/rg.sh" ${_app}/node_modules/@vscode/ripgrep/bin/rg
|
|
ln -sf /usr/bin/xdg-open ${_app}/node_modules/open/xdg-open
|
|
sed -e "s|code-flags|cursor-flags|" -e "s|/usr/lib/code|/${_app}|" -e "s|/usr/lib/code/code.mjs|--app=/${_app}|" \
|
|
-e "s|name=electron|name=${_electron}|" "${srcdir}"/code.sh | install -Dm755 /dev/stdin "${pkgdir}"/usr/share/cursor/cursor
|
|
install -d "$pkgdir"/usr/bin
|
|
ln -sf /usr/share/cursor/cursor "$pkgdir"/usr/bin/cursor
|
|
}
|