openai-codex-bin

This commit is contained in:
Ryan Hughes
2026-05-08 01:04:51 -04:00
parent ce58050d3b
commit 6f55908884
2 changed files with 0 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# shellcheck disable=SC2034
# Maintainer: Chmouel Boudjnah <chmouel@chmouel.com>
pkgname=openai-codex-bin
pkgver=0.129.0
pkgrel=1
pkgdesc="Arch Linux package for OpenAI's Codex CLI - Auto Updated"
arch=('x86_64' 'aarch64')
url="https://github.com/openai/codex"
license=('Apache')
provides=('openai-codex')
conflicts=('openai-codex' 'openai-codex-autoup-bin')
replaces=('openai-codex-autoup-bin')
optdepends=(
'git: for working with git repositories'
'ripgrep: accelerated large-repo search'
)
keywords=('codex' 'openai' 'cli' 'ai' 'machine-learning' 'chatgpt')
source_x86_64=(
"codex-${pkgver}-x86_64.tar.gz::https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-x86_64-unknown-linux-musl.tar.gz"
)
sha256sums_x86_64=('4a4a28d22dd1f874e2c7b23d9ba13db02bf7ad4ee9a70b9c4eaab618708d0582')
sha256sums_aarch64=('60ed9e55569a4c287d012cdfbd43742a2bfb130673e22c63b6bb38c68faa7360')
source_aarch64=(
"codex-${pkgver}-aarch64.tar.gz::https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-aarch64-unknown-linux-musl.tar.gz"
)
package() {
cd "$srcdir" || exit
if [[ "$CARCH" == "x86_64" ]]; then
install -Dm755 "codex-x86_64-unknown-linux-musl" "$pkgdir/usr/bin/codex"
fi
if [[ "$CARCH" == "aarch64" ]]; then
install -Dm755 "codex-aarch64-unknown-linux-musl" "$pkgdir/usr/bin/codex"
fi
# Install completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
mkdir -p "${pkgdir}/usr/share/elvish/lib/"
mkdir -p "${pkgdir}/usr/share/powershell/Completions/"
# Generate completion scripts
"${pkgdir}/usr/bin/codex" completion bash >codex.bash
"${pkgdir}/usr/bin/codex" completion zsh >codex.zsh
"${pkgdir}/usr/bin/codex" completion fish >codex.fish
"${pkgdir}/usr/bin/codex" completion elvish >codex.elvish
"${pkgdir}/usr/bin/codex" completion powershell >codex.ps1
# Install completion files
install -Dm644 "codex.bash" "${pkgdir}/usr/share/bash-completion/completions/codex"
install -Dm644 "codex.zsh" "${pkgdir}/usr/share/zsh/site-functions/_codex"
install -Dm644 "codex.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/codex.fish"
install -Dm644 "codex.elvish" "${pkgdir}/usr/share/elvish/lib/codex.elv"
install -Dm644 "codex.ps1" "${pkgdir}/usr/share/powershell/Completions/codex.ps1"
}