Files
omarchy-pkgs/pkgbuilds/ttfx/PKGBUILD
T
David Heinemeier HanssonandClaude Opus 5.5 9d3d374058 Track ttfx releases from GitHub and build its assembly engine
ttfx releases are now published on GitHub only, so sync-upstream picks up new
versions through a github watch instead of ttfx's release script editing this
recipe. The recipe also points at the repository's current home, and x86_64
builds pull in NASM, which the new assembly engine needs (without it the
build silently falls back to the Rust engine).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MxJcVYpBxFDam6czK4bGjp
2026-09-26 14:38:42 -04:00

45 lines
1.3 KiB
Bash

# Maintainer: David Heinemeier Hansson <david@hey.com>
pkgname=ttfx
pkgver=0.3.3
pkgrel=2
pkgdesc="Terminal text effects as a single static binary — Rust port of terminaltexteffects"
arch=('x86_64' 'aarch64')
url="https://github.com/omacom/ttfx"
license=('MIT')
depends=('gcc-libs' 'glibc')
makedepends=('cargo')
# the x86-64 assembly engine; without NASM the build falls back to pure Rust
makedepends_x86_64=('nasm')
options=('!debug')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('d040da0da2f4a952a367fa3d934ac25999265405f1d2a9f0475625e41211fa7d')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export CARGO_TARGET_DIR=target
cargo build --frozen --release
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/ttfx" "$pkgdir/usr/bin/ttfx"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 NOTICE "$pkgdir/usr/share/licenses/$pkgname/NOTICE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
"target/release/ttfx" --print-completion bash |
install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/ttfx"
"target/release/ttfx" --print-completion zsh |
install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_ttfx"
}