返回 CodeWhale
PKGBUILD.template
根目录 / packaging / aur / PKGBUILD.template
1 # shellcheck shell=bash
2 # shellcheck disable=SC2034,SC2154
3 # makepkg consumes the metadata variables and defines CARCH/srcdir/pkgdir.
4 pkgname=codewhale-bin
5 pkgver=@PKGVER@
6 pkgrel=@PKGREL@
7 pkgdesc='Provider-neutral coding agent for the terminal (prebuilt binary)'
8 arch=('x86_64' 'aarch64')
9 url='https://codewhale.net'
10 license=('MIT')
11 depends=('glibc' 'gcc-libs' 'dbus')
12 provides=("codewhale=${pkgver}" 'codewhale-tui' 'deepseek' 'deepseek-tui')
13 conflicts=('codewhale' 'codewhale-tui' 'deepseek' 'deepseek-tui' 'deepseek-tui-bin')
14 replaces=('deepseek-tui-bin')
15 options=('!strip')
16
17 _release_url="https://github.com/Hmbown/CodeWhale/releases/download/v${pkgver}"
18
19 source=("LICENSE-${pkgver}::https://raw.githubusercontent.com/Hmbown/CodeWhale/v${pkgver}/LICENSE")
20 sha256sums=('@LICENSE_SHA256@')
21 source_x86_64=("${pkgname}-${pkgver}-x86_64.tar.gz::${_release_url}/codewhale-linux-x64.tar.gz")
22 sha256sums_x86_64=('@X86_64_SHA256@')
23 source_aarch64=("${pkgname}-${pkgver}-aarch64.tar.gz::${_release_url}/codewhale-linux-arm64.tar.gz")
24 sha256sums_aarch64=('@AARCH64_SHA256@')
25
26 package() {
27 local release_arch
28 case "${CARCH}" in
29 x86_64) release_arch='x64' ;;
30 aarch64) release_arch='arm64' ;;
31 *) printf 'unsupported architecture: %s\n' "${CARCH}" >&2; return 1 ;;
32 esac
33
34 install -Dm755 "${srcdir}/codewhale-linux-${release_arch}/codewhale" \
35 "${pkgdir}/usr/bin/codewhale"
36 install -Dm755 "${srcdir}/codewhale-linux-${release_arch}/codew" \
37 "${pkgdir}/usr/bin/codew"
38 ln -s codewhale "${pkgdir}/usr/bin/codewhale-tui"
39 install -Dm644 "${srcdir}/LICENSE-${pkgver}" \
40 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
41 }
42
42 lines Plain Text