claude-code

This commit is contained in:
Ryan Hughes
2026-05-08 01:04:50 -04:00
parent cb9726346d
commit 42f75dfd57
5 changed files with 4 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
pkgbase = claude-code
pkgdesc = An agentic coding tool that lives in your terminal
pkgver = 2.1.133
pkgrel = 1
url = https://github.com/anthropics/claude-code
arch = x86_64
arch = aarch64
license = LicenseRef-claude-code
depends = bash
optdepends = git: allow Claude to use git
optdepends = github-cli: interact with GitHub
optdepends = glab: interact with GitLab
optdepends = ripgrep: enhanced file search
optdepends = tmux: agent team split panes
optdepends = bubblewrap: sandboxing
optdepends = socat: sandboxing
options = !strip
source = cc-legal::https://code.claude.com/docs/en/legal-and-compliance.md
sha256sums = SKIP
source_x86_64 = claude-2.1.133-x86_64::https://downloads.claude.ai/claude-code-releases/2.1.133/linux-x64/claude
sha256sums_x86_64 = d0ddf0aee6e4426a705719e5d4716e3ce3cb38f9a5fe06eb6d5ffcef6c98832a
source_aarch64 = claude-2.1.133-aarch64::https://downloads.claude.ai/claude-code-releases/2.1.133/linux-arm64/claude
sha256sums_aarch64 = dcc7275f9198317e073c329abe174827604a801e9bfb577a00d86efcf4f8167c
pkgname = claude-code
+4
View File
@@ -0,0 +1,4 @@
[claude-code]
source = "regex"
url = "https://downloads.claude.ai/claude-code-releases/latest"
regex = ".+"
@@ -0,0 +1,4 @@
{
"source": "aur",
"release_ring": "fast"
}
+48
View File
@@ -0,0 +1,48 @@
# Maintainer: Christopher Cooper <christopher@cg505.com>
# Maintainer: Jérôme Poulin <jeromepoulin@gmail.com>
# Maintainer: Fabio Fontana (fabifont) <me@fabifont.dev>
# Automation repository: https://github.com/fabifont/claude-code-aur
pkgname=claude-code
pkgver=2.1.133
pkgrel=1
pkgdesc="An agentic coding tool that lives in your terminal"
arch=('x86_64' 'aarch64')
url="https://github.com/anthropics/claude-code"
license=('LicenseRef-claude-code')
depends=('bash')
# Binary is a self-contained Bun executable with embedded JS/resources - stripping breaks it
options=('!strip')
optdepends=(
'git: allow Claude to use git'
'github-cli: interact with GitHub'
'glab: interact with GitLab'
'ripgrep: enhanced file search'
'tmux: agent team split panes'
'bubblewrap: sandboxing'
'socat: sandboxing'
)
source=("cc-legal::https://code.claude.com/docs/en/legal-and-compliance.md")
source_x86_64=("claude-${pkgver}-x86_64::https://downloads.claude.ai/claude-code-releases/${pkgver}/linux-x64/claude")
source_aarch64=("claude-${pkgver}-aarch64::https://downloads.claude.ai/claude-code-releases/${pkgver}/linux-arm64/claude")
sha256sums=('SKIP')
sha256sums_x86_64=('d0ddf0aee6e4426a705719e5d4716e3ce3cb38f9a5fe06eb6d5ffcef6c98832a')
sha256sums_aarch64=('dcc7275f9198317e073c329abe174827604a801e9bfb577a00d86efcf4f8167c')
package() {
install -Dm755 "${srcdir}/claude-${pkgver}-${CARCH}" "${pkgdir}/opt/claude-code/bin/claude"
# Create wrapper script to disable upstream update paths
install -dm755 "${pkgdir}/usr/bin"
cat > "${pkgdir}/usr/bin/claude" << 'EOF'
#!/bin/sh
export DISABLE_UPDATES=1
exec /opt/claude-code/bin/claude "$@"
EOF
chmod 755 "${pkgdir}/usr/bin/claude"
install -Dm644 "${srcdir}/cc-legal" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
set -e
GCS_BUCKET="https://downloads.claude.ai/claude-code-releases"
PKGBUILD="PKGBUILD"
# Get current version from PKGBUILD
current_version=$(grep -Po '^pkgver=\K.*' "$PKGBUILD")
# Fetch latest version
new_version=$(curl -fsSL "$GCS_BUCKET/latest")
echo "Current version: $current_version"
echo "New version: $new_version"
if [ "$current_version" = "$new_version" ]; then
echo "Already up to date!"
exit 1
fi
# Download manifest
manifest=$(curl -fsSL "$GCS_BUCKET/$new_version/manifest.json")
# Extract checksums using jq
linux_x64=$(echo "$manifest" | jq -r '.platforms["linux-x64"].checksum')
linux_arm64=$(echo "$manifest" | jq -r '.platforms["linux-arm64"].checksum')
echo ""
echo "Checksums (SHA256):"
echo " linux-x64: $linux_x64"
echo " linux-arm64: $linux_arm64"
echo ""
# Update PKGBUILD
echo "Updating PKGBUILD..."
sed -i "s/^pkgver=.*/pkgver=$new_version/" "$PKGBUILD"
sed -i "s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD"
sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('$linux_x64')/" "$PKGBUILD"
sed -i "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('$linux_arm64')/" "$PKGBUILD"
echo "Regenerating .SRCINFO..."
makepkg --printsrcinfo > .SRCINFO
echo ""
echo "Done! Updated from $current_version to $new_version"