| 1 | # Maintainer: maria-rcks <maria at kuuro dot net> |
| 2 | |
| 3 | pkgname=t3code-nightly-bin |
| 4 | pkgver=0.0.34_nightly.20260814.1095 |
| 5 | pkgrel=1 |
| 6 | pkgdesc='Nightly desktop control surface for local coding agents' |
| 7 | arch=('x86_64') |
| 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}-x86_64.AppImage" |
| 48 | source=( |
| 49 | "$_appimage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_appimage" |
| 50 | "${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/LICENSE" |
| 51 | ) |
| 52 | sha256sums=( |
| 53 | 'c4dea5bba9ed0b51b2f60f2d4a4867e61d62b57c50ea66f2792a73112e054566' # AppImage |
| 54 | '935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license |
| 55 | ) |
| 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 | exec /opt/t3code-nightly-bin/AppRun "$@" |
| 78 | EOF |
| 79 | ln -s t3code-nightly "$pkgdir/usr/bin/t3-code-nightly-desktop" |
| 80 | |
| 81 | # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512). |
| 82 | local icon size_dir |
| 83 | for icon in "$srcdir"/squashfs-root/usr/share/icons/hicolor/*/apps/t3code.png; do |
| 84 | size_dir="${icon%/apps/t3code.png}" |
| 85 | install -Dm644 "$icon" \ |
| 86 | "$pkgdir/usr/share/icons/hicolor/${size_dir##*/}/apps/t3code-nightly.png" |
| 87 | done |
| 88 | |
| 89 | install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/t3code.desktop" <<'EOF' |
| 90 | [Desktop Entry] |
| 91 | Name=T3 Code Nightly |
| 92 | Comment=Nightly desktop control surface for local coding agents |
| 93 | Exec=t3code-nightly %U |
| 94 | TryExec=t3code-nightly |
| 95 | Terminal=false |
| 96 | Type=Application |
| 97 | Icon=t3code-nightly |
| 98 | StartupWMClass=t3code |
| 99 | Categories=Development; |
| 100 | MimeType=x-scheme-handler/t3code; |
| 101 | EOF |
| 102 | |
| 103 | install -Dm644 "$srcdir/${pkgname}-${pkgver}-LICENSE" \ |
| 104 | "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 105 | } |