Compare commits

..

1 Commits

Author SHA1 Message Date
Yi-Ting Shih adc6b16f26 Feat: add build ci
Build package / build-package (push) Successful in 1m18s
2026-02-01 00:54:58 +08:00
4 changed files with 68 additions and 32 deletions
+7 -10
View File
@@ -1,6 +1,6 @@
pkgbase = claude-code pkgbase = claude-code
pkgdesc = An agentic coding tool that lives in your terminal pkgdesc = An agentic coding tool that lives in your terminal
pkgver = 2.1.198 pkgver = 2.1.27
pkgrel = 1 pkgrel = 1
url = https://github.com/anthropics/claude-code url = https://github.com/anthropics/claude-code
arch = x86_64 arch = x86_64
@@ -11,15 +11,12 @@ pkgbase = claude-code
optdepends = github-cli: interact with GitHub optdepends = github-cli: interact with GitHub
optdepends = glab: interact with GitLab optdepends = glab: interact with GitLab
optdepends = ripgrep: enhanced file search optdepends = ripgrep: enhanced file search
optdepends = tmux: agent team split panes
optdepends = bubblewrap: sandboxing
optdepends = socat: sandboxing
options = !strip options = !strip
source = cc-legal::https://code.claude.com/docs/en/legal-and-compliance.md source = LICENSE::https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/LICENSE.md
sha256sums = SKIP sha256sums = 728158fd1037143fad6907e8fa34804177e598b7326519503fe83cafdef849e6
source_x86_64 = claude-2.1.198-x86_64::https://downloads.claude.ai/claude-code-releases/2.1.198/linux-x64/claude source_x86_64 = claude-2.1.27-x86_64::https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.27/linux-x64/claude
sha256sums_x86_64 = 7066af42a5fe93038c13af5072d4c034dc3928092cb121fdd892c76b94b6b84d sha256sums_x86_64 = 24df91dd250b6d7f6a0f8b256affab6c7a4bdefa64b1ece8aca3235d5f5e4044
source_aarch64 = claude-2.1.198-aarch64::https://downloads.claude.ai/claude-code-releases/2.1.198/linux-arm64/claude source_aarch64 = claude-2.1.27-aarch64::https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.27/linux-arm64/claude
sha256sums_aarch64 = 99b50a6f2b1f3ef07bcaf1e58a2f9883c470c84e428afa321972b1aa20372e9a sha256sums_aarch64 = 6166a8eeb82eba410b96030ab4b1330a27c28bdbdc4e313db45e5bfcc25d1e66
pkgname = claude-code pkgname = claude-code
+1 -1
View File
@@ -1,4 +1,4 @@
[claude-code] [claude-code]
source = "regex" source = "regex"
url = "https://downloads.claude.ai/claude-code-releases/latest" url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest"
regex = ".+" regex = ".+"
+16 -21
View File
@@ -1,10 +1,7 @@
# Maintainer: Christopher Cooper <christopher@cg505.com> # Maintainer: Christopher Cooper <christopher@cg505.com>
# Maintainer: Jérôme Poulin <jeromepoulin@gmail.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 pkgname=claude-code
pkgver=2.1.198 pkgver=2.1.27
pkgrel=1 pkgrel=1
pkgdesc="An agentic coding tool that lives in your terminal" pkgdesc="An agentic coding tool that lives in your terminal"
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
@@ -13,40 +10,38 @@ license=('LicenseRef-claude-code')
depends=('bash') depends=('bash')
# Binary is a self-contained Bun executable with embedded JS/resources - stripping breaks it # Binary is a self-contained Bun executable with embedded JS/resources - stripping breaks it
options=('!strip') options=('!strip')
optdepends=( optdepends=(
'git: allow Claude to use git' 'git: allow Claude to use git'
'github-cli: interact with GitHub' 'github-cli: interact with GitHub'
'glab: interact with GitLab' 'glab: interact with GitLab'
'ripgrep: enhanced file search' '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") # This bucket is used in the official install script at https://claude.ai/install.sh
source_x86_64=("claude-${pkgver}-x86_64::https://downloads.claude.ai/claude-code-releases/${pkgver}/linux-x64/claude") # curl -fsSL https://claude.ai/install.sh | grep GCS_BUCKET
source_aarch64=("claude-${pkgver}-aarch64::https://downloads.claude.ai/claude-code-releases/${pkgver}/linux-arm64/claude") _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=('SKIP') sha256sums=('728158fd1037143fad6907e8fa34804177e598b7326519503fe83cafdef849e6')
sha256sums_x86_64=('7066af42a5fe93038c13af5072d4c034dc3928092cb121fdd892c76b94b6b84d') sha256sums_x86_64=('24df91dd250b6d7f6a0f8b256affab6c7a4bdefa64b1ece8aca3235d5f5e4044')
sha256sums_aarch64=('99b50a6f2b1f3ef07bcaf1e58a2f9883c470c84e428afa321972b1aa20372e9a') sha256sums_aarch64=('6166a8eeb82eba410b96030ab4b1330a27c28bdbdc4e313db45e5bfcc25d1e66')
package() { package() {
install -Dm755 "${srcdir}/claude-${pkgver}-${CARCH}" "${pkgdir}/opt/claude-code/bin/claude" install -Dm755 "${srcdir}/claude-${pkgver}-${CARCH}" "${pkgdir}/opt/claude-code/bin/claude"
# Create wrapper script to disable upstream update paths, and to suppress the # Create wrapper script that sets NPM_CONFIG_PREFIX to avoid false npm detection
# native-install health check. Claude Code expects the native installer layout
# (~/.local/bin/claude); since we install to /opt + /usr/bin it would otherwise
# warn on every startup: "claude command at ~/.local/bin/claude missing or broken".
install -dm755 "${pkgdir}/usr/bin" install -dm755 "${pkgdir}/usr/bin"
cat > "${pkgdir}/usr/bin/claude" << 'EOF' cat > "${pkgdir}/usr/bin/claude" << 'EOF'
#!/bin/sh #!/bin/sh
export DISABLE_UPDATES=1 # Wrapper to prevent claude from detecting /usr/bin/claude as npm-global installation
export DISABLE_INSTALLATION_CHECKS=1 export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-/nonexistent}"
# Disable autoupdater
export DISABLE_AUTOUPDATER=1
exec /opt/claude-code/bin/claude "$@" exec /opt/claude-code/bin/claude "$@"
EOF EOF
chmod 755 "${pkgdir}/usr/bin/claude" chmod 755 "${pkgdir}/usr/bin/claude"
install -Dm644 "${srcdir}/cc-legal" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} }
+44
View File
@@ -0,0 +1,44 @@
#!/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"