summaryrefslogtreecommitdiff
path: root/dev-util/claude-code/claude-code-2.1.62.ebuild
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-02-28 07:13:53 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-02-28 07:13:53 +0000
commit7a42e8577d50dc5ee7861983fe0ae2c8a611bc8c (patch)
tree492b9cf25ea0fbf2bae533e34c7a12180b475186 /dev-util/claude-code/claude-code-2.1.62.ebuild
parentf18428edfbd22ded07fdc11e93792e25bcddd989 (diff)
downloadsrcux-7a42e8577d50dc5ee7861983fe0ae2c8a611bc8c.tar.gz
srcux-7a42e8577d50dc5ee7861983fe0ae2c8a611bc8c.tar.xz
srcux-7a42e8577d50dc5ee7861983fe0ae2c8a611bc8c.zip
Adding metadata
Diffstat (limited to 'dev-util/claude-code/claude-code-2.1.62.ebuild')
-rw-r--r--dev-util/claude-code/claude-code-2.1.62.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-util/claude-code/claude-code-2.1.62.ebuild b/dev-util/claude-code/claude-code-2.1.62.ebuild
new file mode 100644
index 000000000000..93e13e5b1a5a
--- /dev/null
+++ b/dev-util/claude-code/claude-code-2.1.62.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Claude Code - an agentic coding tool by Anthropic"
+HOMEPAGE="https://claude.com/product/claude-code"
+
+# NOTE(JayF): Claude code's official install method is now curl|bash
+# the script is simple: it fetches the latest version,
+# downloads a manifest of files for that version, and
+# downloads a single binary claude executable matching.
+# All this from an unbranded GCS bucket (yikes).
+# https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/bootstrap.sh
+GCS_BUCKET="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
+SRC_URI="
+ amd64? (
+ elibc_glibc? ( ${GCS_BUCKET}/${PV}/linux-x64/claude -> claude-amd64-glibc-${PV} )
+ elibc_musl? ( ${GCS_BUCKET}/${PV}/linux-x64-musl/claude -> claude-amd64-musl-${PV} )
+ )
+ arm64? (
+ elibc_glibc? ( ${GCS_BUCKET}/${PV}/linux-arm64/claude -> claude-arm64-glibc-${PV} )
+ elibc_musl? ( ${GCS_BUCKET}/${PV}/linux-arm64-musl/claude -> claude-arm64-musl-${PV} )
+ )"
+S="${WORKDIR}"
+
+# NOTE(JayF): claude-code is only usable via paid subscription and has a
+# clickthrough EULA-type license. Please see $HOMEPAGE for
+# full details.
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 arm64"
+RESTRICT="bindist mirror strip"
+QA_PREBUILT="opt/bin/claude"
+RDEPEND="
+ >=net-libs/nodejs-18
+ sys-apps/ripgrep
+"
+
+src_compile() {
+ # Skip, nothing to compile here.
+ :
+}
+
+src_install() {
+ # NOTE(JayF) Literally the file we download is all there is to
+ # install. It's just a binary. No docs. Nothing else.
+ exeinto /opt/bin
+ newexe "${DISTDIR}/${A[0]}" claude
+
+ insinto /etc/${PN}
+ newins "${FILESDIR}/managed-settings-native.json" managed-settings.json
+}
+
+pkg_postinst() {
+ if ! grep -q DISABLE_INSTALLATION_CHECKS /etc/claude-code/managed-settings.json; then
+ ewarn "Ensure you run etc-update or dispatch-conf before executing claude."
+ ewarn "Failure to properly integrate changes to /etc/claude-code/managed-settings.json"
+ ewarn "may lead to claude installing itself to your homedir without asking."
+ fi
+}