openclaude-0.3.0.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright 1999-2026 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. DESCRIPTION="Claude Code opened to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models"
  5. HOMEPAGE="https://github.com/Gitlawb/openclaude"
  6. SRC_URI="https://registry.npmjs.org/@gitlawb/openclaude/-/openclaude-${PV}.tgz -> ${P}.tgz"
  7. # Base code is Anthropic proprietary; modifications by OpenClaude contributors
  8. # are offered under MIT where legally permissible. See LICENSE file.
  9. LICENSE="openclaude"
  10. SLOT="0"
  11. KEYWORDS="~amd64"
  12. RDEPEND=">=net-libs/nodejs-20"
  13. BDEPEND="net-libs/nodejs"
  14. # npm tarball contains prebuilt dist/cli.mjs; we still need npm install to
  15. # fetch the packages kept external during bundling (@aws-sdk/*, @opentelemetry/*,
  16. # sharp, google-auth-library, etc.) so Node can resolve them at runtime.
  17. RESTRICT="network-sandbox"
  18. S="${WORKDIR}/package"
  19. src_compile() {
  20. npm install --production || die "npm install failed"
  21. }
  22. src_install() {
  23. insinto /usr/lib/${PN}
  24. doins -r dist/ node_modules/
  25. exeinto /usr/lib/${PN}/bin
  26. doexe bin/${PN}
  27. dosym "../lib/${PN}/bin/${PN}" "/usr/bin/${PN}"
  28. dodoc README.md
  29. }