Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(packaging): install AUR launcher icons where icon themes look (#7421)

Augiedb0659fead9b
diff --git a/packaging/aur/scripts/release.sh b/packaging/aur/scripts/release.sh
index 427ca698a..be07391db 100755
--- a/packaging/aur/scripts/release.sh
+++ b/packaging/aur/scripts/release.sh
@@ -8,10 +8,8 @@ pkgrel="${PKGREL:-1}"
if [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
pkgname='t3code-bin'
- icon_path='assets/prod/black-universal-1024.png'
elif [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-nightly\.[0-9]{8}\.[0-9]+$ ]]; then
pkgname='t3code-nightly-bin'
- icon_path='assets/nightly/nightly-universal-1024.png'
else
echo "Release $tag does not publish an AUR package."
exit 0
@@ -32,11 +30,8 @@ fi
work_dir="$(mktemp -d)"
trap 'rm -rf -- "$work_dir"' EXIT
-gh api -H 'Accept: application/vnd.github.raw' \
- "repos/$repo/contents/$icon_path?ref=$tag" > "$work_dir/icon.png"
gh api -H 'Accept: application/vnd.github.raw' \
"repos/$repo/contents/LICENSE?ref=$tag" > "$work_dir/LICENSE"
-icon_sha256="$(sha256sum "$work_dir/icon.png" | awk '{print $1}')"
license_sha256="$(sha256sum "$work_dir/LICENSE" | awk '{print $1}')"
package_dir="$repo_root/packaging/aur/$pkgname"
@@ -45,7 +40,6 @@ sed -Ei \
-e "s/^pkgver=.*/pkgver=$pkgver/" \
-e "s/^pkgrel=.*/pkgrel=$pkgrel/" \
-e "/# AppImage$/s/'[0-9a-f]{64}'/'$appimage_sha256'/" \
- -e "/# icon$/s/'[0-9a-f]{64}'/'$icon_sha256'/" \
-e "/# upstream license$/s/'[0-9a-f]{64}'/'$license_sha256'/" \
PKGBUILD
diff --git a/packaging/aur/t3code-bin/PKGBUILD b/packaging/aur/t3code-bin/PKGBUILD
index 0f3d76284..c5219666b 100644
--- a/packaging/aur/t3code-bin/PKGBUILD
+++ b/packaging/aur/t3code-bin/PKGBUILD
@@ -46,12 +46,10 @@ options=('!debug' '!strip')
_appimage="T3-Code-${pkgver}-x86_64.AppImage"
source=(
"$_appimage::https://github.com/pingdotgg/t3code/releases/download/v${pkgver}/$_appimage"
- "${pkgname}-${pkgver}.png::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver}/assets/prod/black-universal-1024.png"
"${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver}/LICENSE"
)
sha256sums=(
'415c8648f43c3d22d572f27f2c50fdc8c310ea7fcde9537b903e1e2f1c8775a1' # AppImage
- '403e874556ffbecee8d1b2b5d612a874303fac791212a261bb3bd1b71d83e78d' # icon
'935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
)
@@ -79,8 +77,13 @@ exec /opt/t3code-bin/AppRun "$@"
EOF
ln -s t3code "$pkgdir/usr/bin/t3-code-desktop"
- install -Dm644 "$srcdir/${pkgname}-${pkgver}.png" \
- "$pkgdir/usr/share/icons/hicolor/1024x1024/apps/t3code.png"
+ # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512).
+ local icon size_dir
+ for icon in "$srcdir"/squashfs-root/usr/share/icons/hicolor/*/apps/t3code.png; do
+ size_dir="${icon%/apps/t3code.png}"
+ install -Dm644 "$icon" \
+ "$pkgdir/usr/share/icons/hicolor/${size_dir##*/}/apps/t3code.png"
+ done
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/t3code.desktop" <<'EOF'
[Desktop Entry]
diff --git a/packaging/aur/t3code-nightly-bin/PKGBUILD b/packaging/aur/t3code-nightly-bin/PKGBUILD
index 76704be5e..f3b61c7d5 100644
--- a/packaging/aur/t3code-nightly-bin/PKGBUILD
+++ b/packaging/aur/t3code-nightly-bin/PKGBUILD
@@ -47,12 +47,10 @@ _upstream_version="${pkgver/_nightly./-nightly.}"
_appimage="T3-Code-${_upstream_version}-x86_64.AppImage"
source=(
"$_appimage::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version}/$_appimage"
- "${pkgname}-${pkgver}.png::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/assets/nightly/nightly-universal-1024.png"
"${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version}/LICENSE"
)
sha256sums=(
'c4dea5bba9ed0b51b2f60f2d4a4867e61d62b57c50ea66f2792a73112e054566' # AppImage
- '7e59b6394016ef83ed1e946847769e01bf36d4062c5c5af2577fd3e228285fd9' # icon
'935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
)
@@ -80,8 +78,13 @@ exec /opt/t3code-nightly-bin/AppRun "$@"
EOF
ln -s t3code-nightly "$pkgdir/usr/bin/t3-code-nightly-desktop"
- install -Dm644 "$srcdir/${pkgname}-${pkgver}.png" \
- "$pkgdir/usr/share/icons/hicolor/1024x1024/apps/t3code-nightly.png"
+ # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512).
+ local icon size_dir
+ for icon in "$srcdir"/squashfs-root/usr/share/icons/hicolor/*/apps/t3code.png; do
+ size_dir="${icon%/apps/t3code.png}"
+ install -Dm644 "$icon" \
+ "$pkgdir/usr/share/icons/hicolor/${size_dir##*/}/apps/t3code-nightly.png"
+ done
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/t3code.desktop" <<'EOF'
[Desktop Entry]