# Template file for 'voculinux'
pkgname=voculinux
version=0.19.0
revision=1
# The release tag this template names: v + __version__, with the pre-release
# hyphen kept (the tag is v0.19.0-beta while version is 0.19.0beta). The release
# gate (packaging/void/build-release.sh check-tag) refuses any mismatch.
_tag=v0.19.0
# The release sdist ships no setup.py (setuptools pyproject-only), so the
# build goes through the PEP 517 wheel (cf. Solaar, PhotoCollage).
build_style=python3-pep517
hostmakedepends="python3-setuptools"
makedepends="python3-devel"
# Runtime helpers: pipewire (pw-record, pw-dump) for capture, wtype for
# direct typing on niri, wl-clipboard (wl-copy, wl-paste) for clipboard
# paths, xdotool for X11 and the XWayland fallback, pulseaudio-utils for
# pactl source listing. ibus is not a dependency: it is excluded on niri.
# python3-PyAudio and python3-pysocks are version-constrained. Void's stock
# packages (0.2.12_5, 1.7.0_8) sit below the project floors, and a bare name is
# already satisfied by a stock package a user has installed, so it would never
# be upgraded to the carried template. Each >= names the carried template's
# version and revision; tests/test_void_app_template.py keeps them in step.
depends="python3 python3-gobject python3-cairo gtk+3 libayatana-appindicator gobject-introspection python3-numpy python3-requests python3-pysocks>=1.7.1_1 python3-psutil python3-evdev python3-xlib python3-tqdm python3-platformdirs python3-PyAudio>=0.2.14_1 python3-pynput python3-pywhispercpp pipewire wtype wl-clipboard xdotool pulseaudio-utils"
short_desc="Free, offline voice dictation for Linux"
maintainer="Xavier Karma <xavier@bongbetic.com>"
license="AGPL-3.0-only"
homepage="https://git.bongbetic.com/xavierk/voculinux"
distfiles="https://git.bongbetic.com/xavierk/voculinux/releases/download/${_tag}/voculinux-${version}.tar.gz"
# sha256 of that release sdist. Recorded here by the post-release pull request
# after each release. Until the first fork release it is a placeholder that is
# never a real digest: every release build replaces it, in its build tree only,
# with the digest of the sdist it builds (packaging/void/render-voculinux.sh).
checksum=0000000000000000000000000000000000000000000000000000000000000000

post_install() {
	# The fork's sdist already names the desktop entry, icons and launchers
	# voculinux (pyproject entry points and the repo's voculinux.desktop), so
	# the files install as they are. The marker is what the app reads to
	# present package-manager updates (see INSTALL.msg).
	vlicense LICENSE
	vinstall voculinux.desktop 644 usr/share/applications
	for icon in resources/icons/scalable/*.svg; do
		vinstall "$icon" 644 usr/share/icons/hicolor/scalable/apps
	done
	vmkdir usr/share/voculinux
	touch "${DESTDIR}/usr/share/voculinux/packaged"
}
