mirror of
https://github.com/Melorise/TamaASR.git
synced 2026-11-07 14:39:32 +00:00
整合 Linux Fcitx5 实时输入、网页后端、设置页、悬浮球、托盘和发行打包能力。 AI-assisted-by: Codex AI-model: gpt-5.6-sol AI-reasoning-effort: medium Co-authored-by: Codex <codex@openai.com>
46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
pkgname=meloasr
|
|
pkgver=0.1.7
|
|
pkgrel=1
|
|
pkgdesc='Web-backed voice input for Fcitx5'
|
|
arch=('x86_64')
|
|
url='https://github.com/Melorise/MeloASR'
|
|
license=('custom')
|
|
depends=('fcitx5' 'gtk3' 'nss' 'libxss' 'mesa' 'alsa-lib')
|
|
makedepends=('nodejs' 'npm' 'cmake' 'gcc' 'nlohmann-json')
|
|
source=("${pkgname}-${pkgver}.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
npm ci
|
|
npm run build:linux:dir
|
|
cmake -S linux/fcitx5 -B build/fcitx5 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr
|
|
cmake --build build/fcitx5 --parallel
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
npm test
|
|
ctest --test-dir build/fcitx5 --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
install -d "${pkgdir}/opt/meloasr"
|
|
cp -a release/linux-unpacked/. "${pkgdir}/opt/meloasr/"
|
|
install -Dm755 packaging/assets/meloasr-wrapper "${pkgdir}/usr/bin/meloasr"
|
|
install -Dm644 packaging/assets/meloasr.desktop \
|
|
"${pkgdir}/usr/share/applications/meloasr.desktop"
|
|
install -Dm644 packaging/assets/meloasr-autostart.desktop \
|
|
"${pkgdir}/etc/xdg/autostart/meloasr.desktop"
|
|
install -Dm644 packaging/assets/meloasr.metainfo.xml \
|
|
"${pkgdir}/usr/share/metainfo/meloasr.metainfo.xml"
|
|
install -Dm644 logo.png \
|
|
"${pkgdir}/usr/share/pixmaps/meloasr.png"
|
|
|
|
DESTDIR="${pkgdir}" cmake --install build/fcitx5
|
|
}
|