mirror of
https://github.com/Melorise/TamaASR.git
synced 2026-11-07 14:39:32 +00:00
AI-assisted-by: Codex AI-model: gpt-5.6-sol AI-reasoning-effort: medium Co-authored-by: Codex <codex@openai.com>
34 lines
1.1 KiB
Bash
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}"
|
|
}
|