c_josie_overlay

dev-util/opencode-bin: package OpenCode 2 (2.0.28)

OpenCode 2 is distributed as per-platform npm packages rather than GitHub release assets. Source @opencode/cli-linux-{x64,arm64} and install package/bin/opencode. Drop the v1 (1.19.0) ebuild: v1 and v2 both provide /usr/bin/opencode and cannot coexist.

Also track readme.md.

0e3463140be79324236c9cf7d8582e5024da72cb
cjosie <administrator@josie-c.com> · 2026-10-13T21:45 · browse files at this commit

parents: 86f0b1e

diff --git a/dev-util/opencode-bin/Manifest b/dev-util/opencode-bin/Manifest
new file mode 100644
index 0000000..a50c1f2
--- /dev/null
+++ b/dev-util/opencode-bin/Manifest
@@ -0,0 +1,2 @@
+DIST opencode-bin-2.0.28-amd64.tgz 98030365 BLAKE2B 40f4dd4d11a0579bef1c6e0279eb3bd1981957dab817fcd66c51c6f99d8ec329090391afa110d27ab0af408297fa84d3e8ab711a6085696fd03ea4112a352324 SHA512 1dd810d9cf45ac447cf30dc0966fd419dcd4e79942734157c529be54d317533f98cafd37b8b73467e3f14a7101cac99834a705bdc9f1753eded3118fa32b6b36
+DIST opencode-bin-2.0.28-arm64.tgz 96795380 BLAKE2B 2c57f2e87d4d2a3c0f03404b17d6d4fcb8e6f312b8c4c8333ea24a6cd36a9cc47eca3b25f8cc19c5ebb3c6173aaf960146066ef6a1e2b6f9f01756e48070530c SHA512 04e8d764cb6f62243dc68c1f1d726c780467ef01cdf114ef46f62f30c22c8c838424e62dbf868fbc1e25d019a69e1504859420ae9acf15a9a4503cb49438988b
diff --git a/dev-util/opencode-bin/metadata.xml b/dev-util/opencode-bin/metadata.xml
new file mode 100644
index 0000000..560471d
--- /dev/null
+++ b/dev-util/opencode-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>[EMAIL]</email>
+		<name>cjosie</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">anomalyco/opencode</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-util/opencode-bin/opencode-bin-2.0.28.ebuild b/dev-util/opencode-bin/opencode-bin-2.0.28.ebuild
new file mode 100644
index 0000000..5fc79e0
--- /dev/null
+++ b/dev-util/opencode-bin/opencode-bin-2.0.28.ebuild
@@ -0,0 +1,34 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="The open source AI coding agent"
+HOMEPAGE="https://opencode.ai https://github.com/anomalyco/opencode"
+
+# OpenCode 2 is not published as GitHub release assets. It ships as
+# per-platform npm packages; the tarball unpacks to package/bin/opencode.
+SRC_URI="
+	amd64? (
+		https://registry.npmjs.org/@opencode/cli-linux-x64/-/cli-linux-x64-${PV}.tgz -> ${P}-amd64.tgz
+	)
+	arm64? (
+		https://registry.npmjs.org/@opencode/cli-linux-arm64/-/cli-linux-arm64-${PV}.tgz -> ${P}-arm64.tgz
+	)
+"
+
+S="${WORKDIR}/package"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="usr/bin/opencode"
+
+# opencode shells out to a system `rg` when one is on PATH, and only downloads
+# its own copy at runtime when none is found.
+RDEPEND="sys-apps/ripgrep"
+
+src_install() {
+	dobin bin/opencode
+}
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..ff09783
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,5 @@
+### josie-overlay
+
+An https overlay for portage. Packaging utilities I want/need that are either not in other overlays or aren't the version I wanted. 
+
+Built with OpenCode and Zed using Qwen3.8-Flash-Next and DeepSeek V4.1 Flash.