# Maintainer: Storm Dragon # shellcheck shell=bash disable=SC2034,SC2154,SC2164 pkgbase=cthulhu-git pkgname=cthulhu-git _pkgname=cthulhu pkgver=2026.10.14.r6.gb2f558c pkgrel=1 pkgdesc="Desktop-agnostic screen reader with speech, Braille, and Tentacle support" url="https://git.stormux.org/storm/cthulhu" arch=(x86_64 aarch64 armv7h) license=(GPL-3.0-or-later) provides=("${_pkgname}=${pkgver}") conflicts=("${_pkgname}") depends=( # Native accessibility and user interface glibc at-spi2-core glib2 gdk-pixbuf2 gtk3 # Audio and speech speech-dispatcher gstreamer gst-plugins-base # playbin, audiotestsrc, basic decoders gst-plugins-good # pulsesink, more decoders # Braille support brltty liblouis # Xorg input, window capture, and clipboard operations libx11 libxtst libxfixes libxkbcommon xclip # Private D-Bus services and contained Tentacle processes dbus systemd ) optdepends=( 'git: Discover and update Tentacle repositories' 'tesseract: OCR engine for text recognition' 'tesseract-data-eng: English OCR language data' ) optdepends_x86_64=( # Wine accessibility helpers are supported on x86_64. 'wine-access: Wine, Proton, NVDA Controller, and Tolk integration' ) makedepends=( git go pkgconf ) options=(!debug !lto) source=("${_pkgname}::git+https://git.stormux.org/storm/${_pkgname}.git#branch=master") sha512sums=('SKIP') prepare() { cd "${_pkgname}" git checkout -B testing origin/testing } pkgver() { cd "${_pkgname}" local projectVersion revisionCount commitHash projectVersion=$(sed -n 's/^const Version = "\([^"]*\)"/\1/p' internal/version/version.go) [[ -n "${projectVersion}" ]] || return 1 revisionCount=$(git rev-list --count HEAD) commitHash=$(git rev-parse --short=7 HEAD) echo "${projectVersion}.r${revisionCount}.g${commitHash}" } build() { cd "${_pkgname}" export CGO_ENABLED=1 export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOPATH="${srcdir}/go" export GOCACHE="${GOCACHE:-${srcdir}/go-build}" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" go build -o build/cthulhu ./cmd/cthulhu go build -tags brlapi -o build/cthulhu-braille ./cmd/cthulhu-braille } check() { cd "${_pkgname}" export CGO_ENABLED=1 export GOPATH="${srcdir}/go" export GOCACHE="${GOCACHE:-${srcdir}/go-build}" go test -tags brlapi ./... -count=1 } package() { cd "${_pkgname}" install -Dm755 build/cthulhu "${pkgdir}/usr/bin/cthulhu" install -Dm755 build/cthulhu-braille "${pkgdir}/usr/bin/cthulhu-braille" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 AUTHORS "${pkgdir}/usr/share/doc/${pkgname}/AUTHORS" } # vim:set sw=2 sts=-1 et: