diff --git a/.SRCINFO b/.SRCINFO index a4789d4..19d2fe5 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,20 +1,21 @@ pkgbase = opencode pkgdesc = The AI coding agent built for the terminal. - pkgver = 0.4.29 + pkgver = 0.5.21 pkgrel = 1 url = https://github.com/sst/opencode arch = aarch64 arch = x86_64 license = MIT + makedepends = git + makedepends = bun-bin + makedepends = go depends = fzf depends = ripgrep provides = opencode - conflicts = opencode + conflicts = opencode-bin options = !debug options = !strip - source_aarch64 = opencode_0.4.29_aarch64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-arm64.zip - sha256sums_aarch64 = f74be1d68c7a0c7e50f4670b6fb63c9351f2a9c54416fdf3a1e1c05cf436daca - source_x86_64 = opencode_0.4.29_x86_64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-x64.zip - sha256sums_x86_64 = 1a9d12906d4a595b2c0fa49ed14824e00d6cdd01f7f477d9c9b4d0c09968ee62 + source = opencode-0.5.21.tar.gz::https://github.com/sst/opencode/archive/v0.5.21.tar.gz + sha256sums = SKIP pkgname = opencode diff --git a/PKGBUILD b/PKGBUILD index a3755fb..63ca613 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: adam pkgname='opencode' -pkgver=0.4.29 +pkgver=0.5.21 options=('!debug' '!strip') pkgrel=1 pkgdesc='The AI coding agent built for the terminal.' @@ -10,15 +10,22 @@ url='https://github.com/sst/opencode' arch=('aarch64' 'x86_64') license=('MIT') provides=('opencode') -conflicts=('opencode') +conflicts=('opencode-bin') depends=('fzf' 'ripgrep') +makedepends=('git' 'bun-bin' 'go') -source_aarch64=("${pkgname}_${pkgver}_aarch64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-arm64.zip") -sha256sums_aarch64=('f74be1d68c7a0c7e50f4670b6fb63c9351f2a9c54416fdf3a1e1c05cf436daca') +source=("opencode-${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v0.5.21.tar.gz") +sha256sums=('SKIP') -source_x86_64=("${pkgname}_${pkgver}_x86_64.zip::https://github.com/sst/opencode/releases/download/v0.4.29/opencode-linux-x64.zip") -sha256sums_x86_64=('1a9d12906d4a595b2c0fa49ed14824e00d6cdd01f7f477d9c9b4d0c09968ee62') +build() { + cd "opencode-${pkgver}" + cd packages/tui + CGO_ENABLED=0 go build -ldflags="-s -w -X main.Version=${pkgver}" -o tui cmd/opencode/main.go + cd ../opencode + bun build --define OPENCODE_TUI_PATH="'../tui/tui'" --define OPENCODE_VERSION="'${pkgver}'" --compile --target=bun-linux-x64 --outfile=opencode ./src/index.ts +} package() { + cd "opencode-${pkgver}/packages/opencode" install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode" }