The best way to control Claude Code, Codex and more from any computer or phone

main
text 107 lines 3.51 KB
Raw
1 # Maintainer: maria-rcks <maria at kuuro dot net>
2
3 pkgname=t3code-nightly-bin
4 pkgver=0.1.8_nightly.20261104.4179
5 pkgrel=1
6 pkgdesc='Nightly desktop control surface for local coding agents'
7 arch=('x86_64' 'aarch64')
8 url='https://github.com/pingdotgg/t3code'
9 license=('MIT')
10 depends=(
11 'alsa-lib'
12 'at-spi2-core'
13 'cairo'
14 'dbus'
15 'expat'
16 'gdk-pixbuf2'
17 'glib2'
18 'glibc'
19 'gtk3'
20 'hicolor-icon-theme'
21 'libcups'
22 'libdrm'
23 'libgcc'
24 'libstdc++'
25 'libx11'
26 'libxcb'
27 'libxcomposite'
28 'libxdamage'
29 'libxext'
30 'libxfixes'
31 'libxkbcommon'
32 'libxrandr'
33 'mesa'
34 'nspr'
35 'nss'
36 'pango'
37 'systemd-libs'
38 'xdg-utils'
39 'zlib'
40 )
41 optdepends=('openai-codex: use the system-installed Codex CLI')
42 provides=("t3code-nightly=$pkgver")
43 conflicts=('t3code-nightly' 't3code')
44 options=('!debug' '!strip')
45
46 _upstream_version="${pkgver/_nightly./-nightly.}"
47 _appimage="T3-Code-${_upstream_version}-${CARCH/aarch64/arm64}.AppImage"
48 _asset_x86_64="T3-Code-0.1.8-nightly.20261104.4179-x86_64.AppImage"
49 _asset_aarch64="T3-Code-0.1.8-nightly.20261104.4179-arm64.AppImage"
50 source=("${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/LICENSE")
51 sha256sums=('935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43') # upstream license
52 source_x86_64=("T3-Code-${_upstream_version}-x86_64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_asset_x86_64")
53 sha256sums_x86_64=('6d145972076801efb21dc9e2a3e0fb2ac55d786bc2df2b0ebbe48ed1c3323046')
54 source_aarch64=("T3-Code-${_upstream_version}-arm64.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_asset_aarch64")
55 sha256sums_aarch64=('b80f1cd55a391caa4da94b94209750ce68586d474f8cc5ee983a2bf6ae6e8be3')
56
57 prepare() {
58 chmod +x "$srcdir/$_appimage"
59 rm -rf "$srcdir/squashfs-root"
60 "$srcdir/$_appimage" --appimage-extract >/dev/null
61
62 if [[ ! -x "$srcdir/squashfs-root/AppRun" ||
63 ! -f "$srcdir/squashfs-root/chrome-sandbox" ]]; then
64 echo 'The AppImage payload is missing its launcher or Chromium sandbox.' >&2
65 return 1
66 fi
67 }
68
69 package() {
70 install -d "$pkgdir/opt/$pkgname"
71 cp -a --no-preserve=ownership "$srcdir/squashfs-root/." "$pkgdir/opt/$pkgname/"
72 chmod -R u=rwX,go=rX "$pkgdir/opt/$pkgname"
73 chmod 4755 "$pkgdir/opt/$pkgname/chrome-sandbox"
74
75 install -Dm755 /dev/stdin "$pkgdir/usr/bin/t3code-nightly" <<'EOF'
76 #!/bin/sh
77 # AppRun computes APPDIR but doesn't export it. The server's AppImage env scrub needs it
78 # to keep /opt/t3code-nightly-bin/usr/lib etc. out of terminal and agent shells (#28993).
79 exec env APPDIR=/opt/t3code-nightly-bin /opt/t3code-nightly-bin/AppRun "$@"
80 EOF
81 ln -s t3code-nightly "$pkgdir/usr/bin/t3-code-nightly-desktop"
82
83 # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512).
84 local icon size_dir
85 for icon in "$srcdir"/squashfs-root/usr/share/icons/hicolor/*/apps/t3code.png; do
86 size_dir="${icon%/apps/t3code.png}"
87 install -Dm644 "$icon" \
88 "$pkgdir/usr/share/icons/hicolor/${size_dir##*/}/apps/t3code-nightly.png"
89 done
90
91 install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/t3code.desktop" <<'EOF'
92 [Desktop Entry]
93 Name=T3 Code Nightly
94 Comment=Nightly desktop control surface for local coding agents
95 Exec=t3code-nightly %U
96 TryExec=t3code-nightly
97 Terminal=false
98 Type=Application
99 Icon=t3code-nightly
100 StartupWMClass=com.t3tools.T3Code
101 Categories=Development;
102 MimeType=x-scheme-handler/t3code;
103 EOF
104
105 install -Dm644 "$srcdir/${pkgname}-${pkgver}-LICENSE" \
106 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
107 }