summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 182bb33f2fca8e3879e3c96fdd468cc8dbd52fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Woro <woro@tanieddosy.pl>
pkgname=simplevoice
pkgver=0.1.8
pkgrel=1
pkgdesc="Simplevoice — fast speech-to-text transcription (Tauri)"
arch=('x86_64')
url="https://github.com/MaciejKolerski/simplevoice"
license=('Apache-2.0')
depends=('cairo' 'desktop-file-utils' 'gdk-pixbuf2' 'glib2' 'gtk3'
         'hicolor-icon-theme' 'libsoup' 'pango' 'webkit2gtk-4.1'
         'alsa-lib' 'vulkan-icd-loader')
makedepends=('git' 'rust' 'nodejs' 'pnpm' 'cmake' 'clang'
             'librsvg' 'libayatana-appindicator'
             'shaderc' 'vulkan-headers' 'vulkan-icd-loader')
provides=('simplevoice')
conflicts=('simplevoice-bin')
# Arch enables LTO by default; the cc crate then compiles the `ring` crate's C
# sources (pulled in via whisper-rs/sherpa-onnx) with -flto, leaving LTO bitcode
# whose symbols the link step can't resolve (undefined reference to ring_core_*).
# Disabling LTO keeps ring's native objects linkable.
options=('!lto')
install=simplevoice.install
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('6310f739f098f6796a33ab88876fca8590cb8e281d982cd420ae1e763bb0a922')

prepare() {
  cd "${pkgname}-${pkgver}"
  pnpm install --frozen-lockfile
}

build() {
  cd "${pkgname}-${pkgver}"
  # The release config sets createUpdaterArtifacts, which makes tauri sign the
  # bundle with the updater key (TAURI_SIGNING_PRIVATE_KEY) — only present in CI.
  # AUR builds ship no updater artifacts (pacman handles upgrades), so turn it off.
  pnpm tauri build -b deb --config '{"bundle":{"createUpdaterArtifacts":false}}'
}

package() {
  cd "${pkgname}-${pkgver}"
  cp -a src-tauri/target/release/bundle/deb/*/data/* "${pkgdir}/"
}