Files
TamaASR/packaging/arch/PKGBUILD
T
MeloriseandCodex 3e04e30b24 fix: 适配新版千问录音状态并升级至 1.0.3
AI-assisted-by: Codex
AI-model: gpt-5.6-sol
AI-reasoning-effort: medium
Co-authored-by: Codex <codex@openai.com>
2026-10-07 00:37:24 +08:00

34 lines
1.1 KiB
Bash

pkgname=tama-asr
pkgver=1.0.3
pkgrel=1
pkgdesc='Web-backed voice input for Fcitx5'
arch=('x86_64' 'aarch64')
url='https://github.com/Melorise/TamaASR'
license=('MPL2')
depends=('fcitx5' 'gtk3' 'nss' 'libxss' 'mesa' 'alsa-lib')
conflicts=('meloasr')
provides=('meloasr')
replaces=('meloasr')
options=('!strip')
source_x86_64=("${pkgname}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/${pkgname}_${pkgver}_amd64.deb")
source_aarch64=("${pkgname}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/${pkgname}_${pkgver}_arm64.deb")
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')
noextract=("${pkgname}-${pkgver}-x86_64.deb" "${pkgname}-${pkgver}-aarch64.deb")
package() {
local deb_file="${srcdir}/${pkgname}-${pkgver}-${CARCH}.deb"
local deb_root="${srcdir}/deb-root"
local data_archives
rm -rf -- "${deb_root}"
mkdir -p "${deb_root}"
bsdtar -xf "${deb_file}" -C "${deb_root}"
data_archives=("${deb_root}"/data.tar.*)
if (( ${#data_archives[@]} != 1 )) || [[ ! -f "${data_archives[0]}" ]]; then
error '无法从 deb 包中找到唯一的 data.tar.* 归档'
return 1
fi
bsdtar -xf "${data_archives[0]}" -C "${pkgdir}"
}