blob: 779737a5ea3d8558d922ad4bffa299c3fcecc7a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: logan_reed <liulingzhang.work@icloud.com>
# Contributor: springtwr <springtwr@outlook.com>
pkgname=trae-sg
pkgver=2.3.61406
pkgrel=1
pkgdesc="AI-powered IDE by ByteDance (Singapore CDN)"
arch=('x86_64' 'aarch64')
url="https://www.trae.cn/"
license=('LicenseRef-Trae')
provides=("trae=$pkgver")
conflicts=('trae' 'trae-bin')
depends=('nss' 'alsa-lib' 'gtk3' 'at-spi2-core' 'libsecret' 'libxkbfile' 'zeromq')
optdepends=('libappindicator-gtk3: System tray support'
'xdg-utils: Open URLs and files with default applications'
'python: Python extension support'
'nodejs: Node.js extension scripts')
options=('!strip' '!debug')
install=trae.install
source=("trae.sh" "trae.desktop")
source_x86_64=("Trae-linux-x64-${pkgver}-${pkgrel}.tar.gz::https://lf-cdn.trae.ai/obj/trae-ai-sg/pkg/app/releases/stable/2.3.61406/linux/Trae-linux-x64.tar.gz")
source_aarch64=("Trae-linux-arm64-${pkgver}-${pkgrel}.tar.gz::https://lf-cdn.trae.ai/obj/trae-ai-sg/pkg/app/releases/stable/2.3.61406/linux/Trae-linux-arm64.tar.gz")
b2sums=('2331b0d37fff8478ea37cbf9e5c2e70a59631aae6efb44741fc6c1a8dce65557098e9dffa8c30148ef27432802bec3d1eda279021421e5d3f979e80900662726'
'656c5d6bea6ef15185e0d8ee0181276f6de3bfae8e66a2c65772a5f1354727952dd020dca057246139a2bab8f4805057fa2db367a6ba0a1b90d9ffd7fcab8412')
b2sums_x86_64=('a0507fb189820a341e56550eaee5692a94aa354932b8e702e27278e5f5866bd62e52def378ffdd11ec55d20de3cc9c87dba6f125723c741c9662917c0f7c3cfe')
b2sums_aarch64=('12b2ba04ba2c354194a5907870e33714c311503b4fc28fd4d65a7cf63064d4929cf86a135abd5a213f68fddd31263f70e83bbed6f6b80e99629cdf3ee0d5ecb8')
package() {
install -d "${pkgdir}/opt/trae"
for f in "${srcdir}"/*; do
case "${f##*/}" in
trae.sh|trae.desktop|*.tar.*) continue ;;
esac
cp -a "$f" "${pkgdir}/opt/trae/"
done
# SUID sandbox
chmod 4755 "${pkgdir}/opt/trae/chrome-sandbox"
# Launcher
install -Dm755 "${srcdir}/trae.sh" "${pkgdir}/usr/bin/trae"
# Desktop entry
install -Dm644 "${srcdir}/trae.desktop" "${pkgdir}/usr/share/applications/trae.desktop"
# Icon
install -Dm644 "${pkgdir}/opt/trae/resources/app/resources/linux/code.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/trae.png"
# License
install -Dm644 "${pkgdir}/opt/trae/resources/app/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${pkgdir}/opt/trae/resources/app/ThirdPartyNotices.txt" "${pkgdir}/usr/share/licenses/${pkgname}/ThirdPartyNotices"
install -Dm644 "${pkgdir}/opt/trae/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSES.chromium.html"
# Shell completions
install -Dm644 "${pkgdir}/opt/trae/resources/completions/bash/trae" "${pkgdir}/usr/share/bash-completion/completions/trae"
install -Dm644 "${pkgdir}/opt/trae/resources/completions/zsh/_trae" "${pkgdir}/usr/share/zsh/site-functions/_trae"
# Remove unnecessary files
rm -rf "${pkgdir}/opt/trae/node_modules"
find "${pkgdir}/opt/trae" -name "*.asc" -delete
find "${pkgdir}/opt/trae" -name "*.bat" -delete
find "${pkgdir}/opt/trae" -type d -name "rush-logs" -exec rm -rf {} +
# Remove bundled GCC runtime libraries (conflict with system gcc-libs, breaks ckg indexing)
rm -fv "${pkgdir}/opt/trae/resources/app/modules/ckg/binary/libstdc++.so.6"
rm -fv "${pkgdir}/opt/trae/resources/app/modules/ckg/binary/libgcc_s.so.1"
}
|