100 lines
3.5 KiB
Bash
100 lines
3.5 KiB
Bash
# Maintainer: Spencer Bull <spencerbull2554@gmail.com>
|
|
|
|
# Omarchy tracks Anthropic's own Debian repository, the only channel the
|
|
# Linux beta ships through. The declarative "debian" upstream provider in
|
|
# .omarchy/package.json rewrites the version and checksums below from that
|
|
# repository's package index.
|
|
|
|
pkgname=claude-desktop
|
|
pkgver=2.31226.1
|
|
pkgrel=1
|
|
pkgdesc="Official Claude desktop app with Claude Code"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://claude.ai"
|
|
license=('custom')
|
|
|
|
depends=(
|
|
'alsa-lib'
|
|
'at-spi2-core'
|
|
'bash'
|
|
'gcc-libs'
|
|
'glibc'
|
|
'gtk3'
|
|
'libdrm'
|
|
'libnotify'
|
|
'libsecret'
|
|
'libxcb'
|
|
'libxtst'
|
|
'mesa'
|
|
'nss'
|
|
'util-linux-libs'
|
|
'xdg-desktop-portal'
|
|
'xdg-utils'
|
|
)
|
|
|
|
optdepends=(
|
|
'gnome-keyring: store credentials in a system keyring'
|
|
'bubblewrap: Claude Code sandboxing'
|
|
'socat: Claude Code sandboxing'
|
|
)
|
|
# Cowork is x86_64-only here: Arch Linux ARM ships no UEFI firmware package,
|
|
# so on aarch64 the app's /usr/share/AAVMF probe has nothing to resolve to.
|
|
optdepends_x86_64=(
|
|
'qemu-system-x86: run Cowork tasks in a local virtual machine'
|
|
'edk2-ovmf: UEFI firmware for the Cowork virtual machine'
|
|
'virtiofsd: file sharing with the Cowork virtual machine'
|
|
)
|
|
|
|
makedepends=('libarchive')
|
|
options=('!debug' '!strip')
|
|
|
|
# Omarchy: same treatment as openai-codex-desktop. The build image compresses
|
|
# with zstd at its default level, which leaves this 560 MB Electron tree at
|
|
# 210 MB. Maximum zstd takes it to 160 MB for ~3 extra minutes of build time
|
|
# -- worth it for a package every user re-downloads on each of Anthropic's
|
|
# frequent releases.
|
|
COMPRESSZST=(zstd -c -z -q --ultra -22 --threads=0 -)
|
|
|
|
_deb_x86_64="claude-desktop_${pkgver}_amd64.deb"
|
|
_deb_aarch64="claude-desktop_${pkgver}_arm64.deb"
|
|
source=('claude-desktop-launcher.sh')
|
|
_pool="https://downloads.claude.ai/claude-desktop/apt/stable/pool/main/c/claude-desktop"
|
|
source_x86_64=("${_deb_x86_64}::${_pool}/${_deb_x86_64}")
|
|
source_aarch64=("${_deb_aarch64}::${_pool}/${_deb_aarch64}")
|
|
noextract=("${_deb_x86_64}" "${_deb_aarch64}")
|
|
sha256sums=('edfdbc63b65891ef7c481b07086c7e630fc102c042b6ed65331a52fcaf72b14a')
|
|
sha256sums_x86_64=('5a9bebdfcb1df6ce38767b373f3a7fabf77156a2ddd8a3f5d04961da5bde305e')
|
|
sha256sums_aarch64=('d2f57a38ffc73cfda660f8772a5f8bada05e6d74399948a268c6f5d53593ee8f')
|
|
|
|
package() {
|
|
cd "${srcdir}"
|
|
|
|
local deb_var="_deb_${CARCH}"
|
|
local deb="${!deb_var}"
|
|
|
|
bsdtar -xOf "${deb}" data.tar.xz |
|
|
bsdtar --no-same-owner -xf - -C "${pkgdir}"
|
|
|
|
# Upstream's /usr/bin/claude-desktop is a bare symlink to the Electron
|
|
# binary; replace it with a launcher that picks the right Ozone platform.
|
|
rm "${pkgdir}/usr/bin/claude-desktop"
|
|
install -Dm755 claude-desktop-launcher.sh "${pkgdir}/usr/bin/claude-desktop"
|
|
|
|
install -Dm644 "${pkgdir}/usr/share/doc/claude-desktop/copyright" \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/copyright"
|
|
|
|
# Cowork probes Debian's paths for its VM stack; map them onto Arch's.
|
|
# The links dangle harmlessly until the matching optdepends are installed.
|
|
if [[ "${CARCH}" == x86_64 ]]; then
|
|
install -d "${pkgdir}/usr/libexec"
|
|
ln -s ../lib/virtiofsd "${pkgdir}/usr/libexec/virtiofsd"
|
|
# The app derives the VARS path from the CODE path, so both need a link.
|
|
install -d "${pkgdir}/usr/share/edk2"
|
|
ln -s x64/OVMF_CODE.4m.fd "${pkgdir}/usr/share/edk2/OVMF_CODE_4M.fd"
|
|
ln -s x64/OVMF_VARS.4m.fd "${pkgdir}/usr/share/edk2/OVMF_VARS_4M.fd"
|
|
fi
|
|
|
|
# Debian package-policy files are not used on Arch Linux.
|
|
rm -rf "${pkgdir}/usr/share/doc" "${pkgdir}/usr/share/lintian"
|
|
}
|