aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 19:06:36 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 19:06:36 +0200
commit054c3ba211c6a8ef57fb1b2a3f23314cc54a40c6 (patch)
tree7cb36124233b87bb439ee8a6b58e02d6cc18def7
parent4f331cc9cf7cfe63c28194c7c4229429569c5099 (diff)
downloadmy-slackbuilds-054c3ba211c6a8ef57fb1b2a3f23314cc54a40c6.tar.gz
my-slackbuilds-054c3ba211c6a8ef57fb1b2a3f23314cc54a40c6.zip
opencode2-bin: drop wrapper, install binary as opencode
Upstream ships the binary as opencode; the wrapper existed only to keep v1/v2 config and state separate. v1 and v2 now share the binary path and the config/state directories, so the two packages conflict.
-rw-r--r--opencode2-bin/README19
-rw-r--r--opencode2-bin/opencode29
-rw-r--r--opencode2-bin/opencode2-bin.SlackBuild12
-rw-r--r--opencode2-bin/slack-desc6
4 files changed, 14 insertions, 32 deletions
diff --git a/opencode2-bin/README b/opencode2-bin/README
index 67f16b7..16bf22e 100644
--- a/opencode2-bin/README
+++ b/opencode2-bin/README
@@ -2,21 +2,18 @@ opencode2-bin packages the OpenCode 2.0 release line, an open source AI
coding agent for the terminal.
This package ships the self-contained binary built by upstream and
-installs it as `opencode2`, so it can coexist with the v1
-`opencode-bin` package (which provides `opencode`). Upstream publishes
-the 2.0 line only to the npm registry as `@opencode/cli-linux-x64`;
-there is no GitHub release tarball for it, so this package repacks
-that npm artifact.
+installs it as `opencode`. Upstream publishes the 2.0 line only to the
+npm registry as `@opencode/cli-linux-x64`; there is no GitHub release
+tarball for it, so this package repacks that npm artifact.
The binary is compiled with Bun and is self-contained (no runtime
dependencies). The default build targets glibc x86_64 with AVX2. On a
CPU without AVX2, use the `-baseline` variant instead.
-OpenCode v1 and v2 would otherwise share the same configuration and
-state directories (`~/.config/opencode`, `~/.local/share/opencode`).
-The `opencode2` command is therefore a wrapper that launches the real
-binary with `XDG_CONFIG_HOME` and `XDG_DATA_HOME` pointed at
-`~/.config/opencode2` and `~/.local/share/opencode2`, keeping 2.0's
-config and state separate from the v1 package.
+OpenCode v1 and v2 use the same configuration and state directories
+(`~/.config/opencode`, `~/.local/share/opencode`), and both the v1
+`opencode-bin` package and this one install the binary as `opencode`.
+The two packages therefore conflict; install one or the other, not both,
+and back up your configuration before switching versions.
Homepage: https://opencode.ai
diff --git a/opencode2-bin/opencode2 b/opencode2-bin/opencode2
deleted file mode 100644
index 5f7bc4f..0000000
--- a/opencode2-bin/opencode2
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# Launch OpenCode 2.0 with its own config and data directories, so it does
-# not read or write the v1 opencode package's ~/.config/opencode and
-# ~/.local/share/opencode. Edit the two paths below to relocate them.
-export XDG_CONFIG_HOME="$HOME/.config/opencode2"
-export XDG_DATA_HOME="$HOME/.local/share/opencode2"
-
-exec /usr/libexec/opencode2/opencode "$@"
diff --git a/opencode2-bin/opencode2-bin.SlackBuild b/opencode2-bin/opencode2-bin.SlackBuild
index 1dd27f1..1f747eb 100644
--- a/opencode2-bin/opencode2-bin.SlackBuild
+++ b/opencode2-bin/opencode2-bin.SlackBuild
@@ -63,16 +63,10 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# The npm tarball ships one self-contained bun-compiled binary under
-# bin/opencode. Upstream exposes it as both the `opencode` and `opencode2`
-# commands; this package ships it as `opencode2` so it can coexist with the
-# v1 `opencode-bin` package. No stripping: the binary is bun-generated and
+# bin/opencode. Upstream exposes it as `opencode`; this package ships it
+# under the same name. No stripping: the binary is bun-generated and
# stripping renders it unusable.
-#
-# The real binary goes under /usr/libexec and /usr/bin/opencode2 is a small
-# wrapper that points XDG_CONFIG_HOME/XDG_DATA_HOME at opencode2-specific
-# directories, keeping its config and state out of the v1 opencode folders.
-install -D -m 0755 package/bin/opencode $PKG/usr/libexec/opencode2/opencode
-install -D -m 0755 $CWD/opencode2 $PKG/usr/bin/opencode2
+install -D -m 0755 package/bin/opencode $PKG/usr/bin/opencode
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
diff --git a/opencode2-bin/slack-desc b/opencode2-bin/slack-desc
index e9a2ba7..0a2500b 100644
--- a/opencode2-bin/slack-desc
+++ b/opencode2-bin/slack-desc
@@ -11,9 +11,9 @@ opencode2-bin:
opencode2-bin: OpenCode 2.0 is the next release line of the terminal AI coding
opencode2-bin: agent, supporting 75+ LLM providers including Claude, OpenAI,
opencode2-bin: Gemini, GitHub Copilot, and local models via Ollama.
-opencode2-bin: The binary is installed as `opencode2` and is bundled with Bun
-opencode2-bin: as a self-contained executable, so it can coexist with the v1
-opencode2-bin: opencode-bin package.
+opencode2-bin:
+opencode2-bin:
+opencode2-bin:
opencode2-bin:
opencode2-bin: Homepage: https://opencode.ai
opencode2-bin: