# Description: The open source coding agent # URL: https://github.com/anomalyco/opencode # Maintainer: Erich Eckner, crux at eckner dot net # Depends on: icu ripgrep curl tar name=opencode version=2.1.3 release=1 source=("https://github.com/anomalyco/opencode/archive/refs/tags/v${version}.tar.gz") build() { cd "$SRC/${name}-${version}" bun install --frozen-lockfile --ignore-scripts cd packages/cli OPENCODE_VERSION=$version bun run ./script/build.ts --target=opencode-linux-x64-baseline --skip-install install -vDm755 -t "$PKG/usr/bin" "dist/cli-linux-x64-baseline/bin/opencode" SHELL=/bin/bash "$PKG/usr/bin/opencode" --completions bash \ | install -vDm644 /dev/stdin "$PKG/usr/share/bash-completion/completions/opencode" }