37 lines
1.9 KiB
Bash
37 lines
1.9 KiB
Bash
# Maintainer: Gunther Schulz <dev@guntherschulz.de>
|
|
|
|
pkgname=cursor-bin
|
|
pkgver=2.2.29
|
|
pkgrel=1
|
|
pkgdesc='AI-first coding environment'
|
|
arch=('x86_64')
|
|
url="https://www.cursor.com"
|
|
license=('LicenseRef-Cursor_EULA')
|
|
_electron=electron37
|
|
depends=(xdg-utils ripgrep $_electron nodejs
|
|
'gcc-libs' 'hicolor-icon-theme' 'libxkbfile')
|
|
options=(!strip) # Don't break ext of VSCode
|
|
_commit=656af3704923280dedba3ccd49cfaf9b9d456e9a
|
|
source=("https://downloads.cursor.com/production/${_commit}/linux/x64/deb/amd64/deb/cursor_${pkgver}_amd64.deb"
|
|
https://gitlab.archlinux.org/archlinux/packaging/packages/code/-/raw/main/code.sh rg.sh)
|
|
sha512sums=('SKIP'
|
|
'937299c6cb6be2f8d25f7dbc95cf77423875c5f8353b8bd6cd7cc8e5603cbf8405b14dbf8bd615db2e3b36ed680fc8e1909410815f7f8587b7267a699e00ab37'
|
|
'e79fe7659f59d1ae02fc68816399bfd31587315df6cdb6ccf1d0ca76f7cdc692c2a42b30591c0091147bd97ef14b1c7745dc26bd7cb3ea6bba45698e5044fa2a')
|
|
sha512sums[0]=0d1cd5df03ca4bcf4799b560ba5844c8b92261d604803dbda320dd9f3529d33010a966e9ff49983d9e69680afa243e4b7412f603fbfed93b42638a73c7a6e21b
|
|
noextract=(cursor_${pkgver}_amd64.deb) # avoid double tarball
|
|
_app=usr/share/cursor/resources/app
|
|
package() {
|
|
# Exclude electron
|
|
bsdtar -xOf ${noextract[0]} data.tar.xz | tar -xJf - -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
|
|
}
|