Create shared / fast track for certain packages

This commit is contained in:
Ryan Hughes
2026-01-10 20:18:35 -05:00
parent 1dfa83863d
commit 45a356eb70
253 changed files with 566 additions and 458 deletions
-22
View File
@@ -1,22 +0,0 @@
pkgbase = claude-code
pkgdesc = An agentic coding tool that lives in your terminal
pkgver = 2.1.3
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
options = !strip
source = LICENSE::https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/LICENSE.md
sha256sums = 728158fd1037143fad6907e8fa34804177e598b7326519503fe83cafdef849e6
source_x86_64 = claude-2.1.3-x86_64::https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.3/linux-x64/claude
sha256sums_x86_64 = c8de68f17954c30157100600c7a85e6dbaf8bca64875e65071f5e87fbc62d882
source_aarch64 = claude-2.1.3-aarch64::https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.3/linux-arm64/claude
sha256sums_aarch64 = 1947e332e10bfc961ea974cb98b6f53f2c85c3d8c2d0ff476f9093c49864b35f
pkgname = claude-code
-4
View File
@@ -1,4 +0,0 @@
[claude-code]
source = "regex"
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest"
regex = ".+"
-47
View File
@@ -1,47 +0,0 @@
# Maintainer: Christopher Cooper <christopher@cg505.com>
# Maintainer: Jérôme Poulin <jeromepoulin@gmail.com>
pkgname=claude-code
pkgver=2.1.3
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'
)
# This bucket is used in the official install script at https://claude.ai/install.sh
# curl -fsSL https://claude.ai/install.sh | grep GCS_BUCKET
_gcs_bucket="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
source=("LICENSE::https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/LICENSE.md")
source_x86_64=("claude-${pkgver}-x86_64::${_gcs_bucket}/${pkgver}/linux-x64/claude")
source_aarch64=("claude-${pkgver}-aarch64::${_gcs_bucket}/${pkgver}/linux-arm64/claude")
sha256sums=('728158fd1037143fad6907e8fa34804177e598b7326519503fe83cafdef849e6')
sha256sums_x86_64=('c8de68f17954c30157100600c7a85e6dbaf8bca64875e65071f5e87fbc62d882')
sha256sums_aarch64=('1947e332e10bfc961ea974cb98b6f53f2c85c3d8c2d0ff476f9093c49864b35f')
package() {
install -Dm755 "${srcdir}/claude-${pkgver}-${CARCH}" "${pkgdir}/opt/claude-code/bin/claude"
# Create wrapper script that sets NPM_CONFIG_PREFIX to avoid false npm detection
install -dm755 "${pkgdir}/usr/bin"
cat > "${pkgdir}/usr/bin/claude" << 'EOF'
#!/bin/sh
# Wrapper to prevent claude from detecting /usr/bin/claude as npm-global installation
export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-/nonexistent}"
# Disable autoupdater
export DISABLE_AUTOUPDATER=1
exec /opt/claude-code/bin/claude "$@"
EOF
chmod 755 "${pkgdir}/usr/bin/claude"
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
-44
View File
@@ -1,44 +0,0 @@
#!/bin/bash
set -e
GCS_BUCKET="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/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"