Sync AUR
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
pkgbase = opencode
|
||||
pkgdesc = The AI coding agent built for the terminal.
|
||||
pkgver = 1.0.55
|
||||
pkgver = 1.0.57
|
||||
pkgrel = 1
|
||||
url = https://github.com/sst/opencode
|
||||
arch = aarch64
|
||||
@@ -9,14 +9,13 @@ pkgbase = opencode
|
||||
makedepends = git
|
||||
makedepends = bun-bin
|
||||
makedepends = go
|
||||
makedepends = npm
|
||||
depends = fzf
|
||||
depends = ripgrep
|
||||
provides = opencode
|
||||
conflicts = opencode-bin
|
||||
options = !debug
|
||||
options = !strip
|
||||
source = opencode-1.0.55.tar.gz::https://github.com/sst/opencode/archive/v1.0.55.tar.gz
|
||||
sha256sums = 3db64a1cd6f0b1163e50092aeac73ba21144d8bacbe52c70b1493ba2e52dd05b
|
||||
source = opencode-1.0.57.tar.gz::https://github.com/sst/opencode/archive/v1.0.57.tar.gz
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = opencode
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: adam
|
||||
|
||||
pkgname='opencode'
|
||||
pkgver=1.0.55
|
||||
pkgver=1.0.57
|
||||
_subver=
|
||||
options=('!debug' '!strip')
|
||||
pkgrel=1
|
||||
@@ -13,48 +13,19 @@ license=('MIT')
|
||||
provides=('opencode')
|
||||
conflicts=('opencode-bin')
|
||||
depends=('fzf' 'ripgrep')
|
||||
makedepends=('git' 'bun-bin' 'go' 'npm')
|
||||
makedepends=('git' 'bun-bin' 'go')
|
||||
|
||||
source=("opencode-${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v${pkgver}${_subver}.tar.gz")
|
||||
sha256sums=('3db64a1cd6f0b1163e50092aeac73ba21144d8bacbe52c70b1493ba2e52dd05b')
|
||||
|
||||
prepare() {
|
||||
cd "opencode-${pkgver}"
|
||||
|
||||
# Patch package.json to accept bun 1.3.2 instead of locked 1.3.1
|
||||
sed -i 's/"packageManager": "bun@1\.3\.1"/"packageManager": "bun@1.3.2"/' package.json
|
||||
}
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd "opencode-${pkgver}"
|
||||
|
||||
# Ensure npm is in PATH for bun's shell
|
||||
export PATH="/usr/bin:$PATH"
|
||||
|
||||
# Install workspace dependencies from root
|
||||
bun install
|
||||
|
||||
# The build script uses relative imports like ../node_modules/...
|
||||
# Create symlink so packages/opencode/node_modules points to root node_modules
|
||||
cd packages/opencode
|
||||
ln -sf ../../node_modules node_modules
|
||||
|
||||
# Build the binary
|
||||
OPENCODE_CHANNEL=latest OPENCODE_VERSION=${pkgver} bun run build --single
|
||||
cd ./packages/opencode
|
||||
OPENCODE_CHANNEL=latest OPENCODE_VERSION=1.0.57 bun run ./script/build.ts --single
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "opencode-${pkgver}/packages/opencode"
|
||||
|
||||
# Determine architecture for the binary path
|
||||
case "${CARCH}" in
|
||||
x86_64)
|
||||
_arch="x64"
|
||||
;;
|
||||
aarch64)
|
||||
_arch="arm64"
|
||||
;;
|
||||
esac
|
||||
|
||||
install -Dm755 "./dist/opencode-linux-${_arch}/bin/opencode" "${pkgdir}/usr/bin/opencode"
|
||||
install -Dm755 $(find dist/*/bin/opencode) "${pkgdir}/usr/bin/opencode"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user