Files
omarchy-pkgs/pkgbuilds/tobi-try/PKGBUILD
T
Scott JonesandClaude Opus 5 95ca4cdd3b Mark tobi-try arch=any
The package is three Ruby files and a symlink -- try.rb, lib/tui.rb,
lib/fuzzy.rb, and /usr/bin/try pointing at try.rb. build() only rewrites the
shebang to /usr/bin/ruby, package() only installs, and there are no
makedepends. Nothing in it is architecture-dependent.

Declaring ('aarch64' 'x86_64') means makepkg stamps whichever arch built it,
so serving both needs two builds of a byte-identical payload. With 'any' one
build covers every architecture.

Verified by building on aarch64: the resulting tobi-try-1.8.1-3-any package
has a byte-identical payload to the published x86_64 build, same symlink
target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 22:55:45 -04:00

37 lines
1.3 KiB
Bash

# Maintainer: dhh
pkgname='tobi-try'
pkgver=1.8.1
_subver=d1bc484cc31a34db3d287550f4800e9a6e56bacd
pkgrel=3
pkgdesc='Fresh directories for every vibe.'
url='https://github.com/tobi/try'
arch=('any')
license=('MIT')
depends=('ruby')
provides=('try')
conflicts=('try')
options=('!debug')
source=("try-${pkgver}.rb::https://raw.githubusercontent.com/tobi/try/${_subver}/try.rb"
"fuzzy.rb::https://raw.githubusercontent.com/tobi/try/${_subver}/lib/fuzzy.rb"
"tui.rb::https://raw.githubusercontent.com/tobi/try/${_subver}/lib/tui.rb")
sha256sums=('55a968dc5b1536b338d8f96693576c8cb19ca6bcabbca9138591cd0518486b02'
'cf815ed12c8147bbc7f67008cfc1f3fd05df1638ff290e2079188f1b9bf8f190'
'b62d2b61445d8266f064e2809e06ebc0a25da401ee5a13dc3a73d215c0a1ea71')
build() {
cd "${srcdir}"
# Ensure shebang points to system Ruby (so no mise conflicts)
sed -i '1c#!/usr/bin/ruby' "try-${pkgver}.rb"
}
package() {
install -Dm755 "${srcdir}/try-${pkgver}.rb" "${pkgdir}/usr/lib/${pkgname}/try.rb"
install -Dm644 "${srcdir}/tui.rb" "${pkgdir}/usr/lib/${pkgname}/lib/tui.rb"
install -Dm644 "${srcdir}/fuzzy.rb" "${pkgdir}/usr/lib/${pkgname}/lib/fuzzy.rb"
install -dm755 "${pkgdir}/usr/bin"
ln -sf "/usr/lib/${pkgname}/try.rb" "${pkgdir}/usr/bin/try"
}