diff --git a/pkgbuilds/t3code-bin/.omarchy/package.json b/pkgbuilds/t3code-bin/.omarchy/package.json new file mode 100644 index 0000000..d0d027a --- /dev/null +++ b/pkgbuilds/t3code-bin/.omarchy/package.json @@ -0,0 +1,5 @@ +{ + "source": "aur", + "release_ring": "fast", + "upstream_commit": "4f0b415dccf7e3b0b85e2289e8c3a7c8603e9fb4" +} diff --git a/pkgbuilds/t3code-bin/.omarchy/patches/keep-chromium-sandbox.patch b/pkgbuilds/t3code-bin/.omarchy/patches/keep-chromium-sandbox.patch new file mode 100644 index 0000000..a14ab83 --- /dev/null +++ b/pkgbuilds/t3code-bin/.omarchy/patches/keep-chromium-sandbox.patch @@ -0,0 +1,13 @@ +--- a/PKGBUILD ++++ b/PKGBUILD +@@ -96,7 +96,9 @@ + extra_flags+=(--ozone-platform-hint=auto) + fi + +-exec "$appdir/t3code" --no-sandbox "${extra_flags[@]}" "$@" ++# Omarchy: Chromium sandboxes itself with a user namespace when it cannot find a ++# setuid helper, which is the case on Arch, so --no-sandbox buys nothing here. ++exec "$appdir/t3code" "${extra_flags[@]}" "$@" + EOF + + ln -s t3code "$pkgdir/usr/bin/t3-code-desktop" diff --git a/pkgbuilds/t3code-bin/.upstream-commit b/pkgbuilds/t3code-bin/.upstream-commit new file mode 100644 index 0000000..f2c5df9 --- /dev/null +++ b/pkgbuilds/t3code-bin/.upstream-commit @@ -0,0 +1 @@ +9942a9412013f0429f551a1b3f6a2700fac6ed58 diff --git a/pkgbuilds/t3code-bin/LICENSE b/pkgbuilds/t3code-bin/LICENSE new file mode 100644 index 0000000..55ee675 --- /dev/null +++ b/pkgbuilds/t3code-bin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 T3 Tools Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pkgbuilds/t3code-bin/PKGBUILD b/pkgbuilds/t3code-bin/PKGBUILD new file mode 100644 index 0000000..aa31938 --- /dev/null +++ b/pkgbuilds/t3code-bin/PKGBUILD @@ -0,0 +1,127 @@ +# Maintainer: anon + +pkgname=t3code-bin +pkgver=0.0.33 +pkgrel=1.1 +pkgdesc='T3 Code desktop app packaged from the upstream AppImage' +arch=('x86_64') +_upstream_tag='v0.0.33' +_upstream_version='0.0.33' +_appimage_name="T3-Code-${_upstream_version}-x86_64.AppImage" +url='https://t3.codes' +license=('MIT') +depends=( + 'alsa-lib' + 'at-spi2-core' + 'cairo' + 'dbus' + 'expat' + 'gcc-libs' + 'gdk-pixbuf2' + 'glib2' + 'gtk3' + 'hicolor-icon-theme' + 'libcups' + 'libdrm' + 'libx11' + 'libxcb' + 'libxcomposite' + 'libxdamage' + 'libxext' + 'libxfixes' + 'libxkbcommon' + 'libxrandr' + 'mesa' + 'nspr' + 'nss' + 'pango' + 'systemd-libs' + 'xdg-utils' + 'zlib' +) +optdepends=( + 'openai-codex: use the system-installed Codex CLI' +) +provides=("t3code=${pkgver}") +conflicts=('t3code') +options=('!debug' '!emptydirs' '!strip') +source=( + "${_appimage_name}::https://github.com/pingdotgg/t3code/releases/download/${_upstream_tag}/${_appimage_name}" + 't3code-icon.png' + 'LICENSE' +) +sha256sums=( + '415c8648f43c3d22d572f27f2c50fdc8c310ea7fcde9537b903e1e2f1c8775a1' + '52c86008b11f90f36b8a8f4cc43b1352d5fda9084c6e5691b806f5bca1a968b6' + '935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' +) + +prepare() { + chmod +x "$srcdir/$_appimage_name" + rm -rf "$srcdir/squashfs-root" + "$srcdir/$_appimage_name" --appimage-extract >/dev/null + + if [[ ! -d "$srcdir/squashfs-root" ]]; then + echo "Failed to extract AppImage payload." >&2 + return 1 + fi +} + +package() { + install -d "$pkgdir/opt/$pkgname" + cp -a "$srcdir/squashfs-root/." "$pkgdir/opt/$pkgname/" + + # Preserve upstream execute bits while ensuring the payload stays readable. + chmod -R a+rX "$pkgdir/opt/$pkgname" + + install -Dm755 /dev/stdin "$pkgdir/usr/bin/t3code" << 'EOF' +#!/usr/bin/env bash +set -euo pipefail + +appdir='/opt/t3code-bin' +export APPDIR="$appdir" + +if [[ -z "${CODEX_CLI_PATH-}" ]] && command -v codex >/dev/null 2>&1; then + export CODEX_CLI_PATH="$(command -v codex)" +fi + +export PATH="$appdir:$appdir/usr/bin:$appdir/usr/sbin:$PATH" +export XDG_DATA_DIRS="$appdir/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}" +export GSETTINGS_SCHEMA_DIR="$appdir/usr/share/glib-2.0/schemas${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR}" + +extra_flags=() +if [[ -n "${WAYLAND_DISPLAY-}" || "${XDG_SESSION_TYPE-}" == "wayland" ]]; then + extra_flags+=(--enable-features=UseOzonePlatform --ozone-platform=wayland --ozone-platform-hint=wayland) +else + extra_flags+=(--ozone-platform-hint=auto) +fi + +# Omarchy: Chromium sandboxes itself with a user namespace when it cannot find a +# setuid helper, which is the case on Arch, so --no-sandbox buys nothing here. +exec "$appdir/t3code" "${extra_flags[@]}" "$@" +EOF + + ln -s t3code "$pkgdir/usr/bin/t3-code-desktop" + + install -Dm644 "$srcdir/t3code-icon.png" \ + "$pkgdir/usr/share/icons/hicolor/1024x1024/apps/t3code.png" + ln -s t3code.png \ + "$pkgdir/usr/share/icons/hicolor/1024x1024/apps/t3-code-desktop.png" + install -Dm644 "$srcdir/t3code-icon.png" \ + "$pkgdir/usr/share/pixmaps/t3code.png" + ln -s t3code.png "$pkgdir/usr/share/pixmaps/t3-code-desktop.png" + + install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/t3code.desktop" << 'EOF' +[Desktop Entry] +Name=T3 Code +Comment=T3 Code desktop build +Exec=t3code %U +Terminal=false +Type=Application +Icon=t3code +StartupWMClass=t3code +Categories=Development; +EOF + + install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/pkgbuilds/t3code-bin/t3code-icon.png b/pkgbuilds/t3code-bin/t3code-icon.png new file mode 100644 index 0000000..2ff311c Binary files /dev/null and b/pkgbuilds/t3code-bin/t3code-icon.png differ