From: JohnGebbie <JohnGebbie@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: numen-0.1
Date: Fri, 14 Oct 2022 11:27:33 +0200 [thread overview]
Message-ID: <20221014092733.kN7Nd_m-z5krl_WsC8Lu91MuZrtPyhnAmm20IQ73uWI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39716@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
There is an updated pull request by JohnGebbie against master on the void-packages repository
https://github.com/JohnGebbie/void-packages numen3
https://github.com/void-linux/void-packages/pull/39716
New package: numen-0.1
#### Testing the changes
- I tested the changes in this PR: **NO**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
I'm still working on this. I put it here so I could link to it in a question.
This depends on https://github.com/void-linux/void-packages/pull/38268 and https://github.com/void-linux/void-packages/pull/39015.
A patch file from https://github.com/void-linux/void-packages/pull/39716.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-numen3-39716.patch --]
[-- Type: text/x-diff, Size: 4311 bytes --]
From e016c366990c4258e10ec580947e2a702e409847 Mon Sep 17 00:00:00 2001
From: John Gebbie <me@johngebbie.com>
Date: Tue, 4 Oct 2022 17:50:42 +0100
Subject: [PATCH] New package: numen-0.1
---
srcpkgs/numen/files/numen/conf | 6 ++++
srcpkgs/numen/files/numen/control/t | 2 ++
srcpkgs/numen/files/numen/log/run | 2 ++
srcpkgs/numen/files/numen/run | 7 ++++
srcpkgs/numen/files/run | 10 ++++++
srcpkgs/numen/template | 50 +++++++++++++++++++++++++++++
6 files changed, 77 insertions(+)
create mode 100644 srcpkgs/numen/files/numen/conf
create mode 100755 srcpkgs/numen/files/numen/control/t
create mode 100755 srcpkgs/numen/files/numen/log/run
create mode 100755 srcpkgs/numen/files/numen/run
create mode 100644 srcpkgs/numen/files/run
create mode 100644 srcpkgs/numen/template
diff --git a/srcpkgs/numen/files/numen/conf b/srcpkgs/numen/files/numen/conf
new file mode 100644
index 000000000000..f4ec56bcfb54
--- /dev/null
+++ b/srcpkgs/numen/files/numen/conf
@@ -0,0 +1,6 @@
+# Example to run numen as a specific user:
+
+# NUMENUSER=john
+# export XAUTHORITY="/run/user/$(id -u $NUMENUSER)/Xauthority"
+# export XDG_DATA_HOME="/home/$NUMENUSER/.local/share"
+# OPTS=$(find "/home/$NUMENUSER/.config/numen/phrases/" -maxdepth 1 \! -type d)
diff --git a/srcpkgs/numen/files/numen/control/t b/srcpkgs/numen/files/numen/control/t
new file mode 100755
index 000000000000..eeeb1555652a
--- /dev/null
+++ b/srcpkgs/numen/files/numen/control/t
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkill -P $(cat supervise/pid)
diff --git a/srcpkgs/numen/files/numen/log/run b/srcpkgs/numen/files/numen/log/run
new file mode 100755
index 000000000000..01131544c6d3
--- /dev/null
+++ b/srcpkgs/numen/files/numen/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.info -t numen
diff --git a/srcpkgs/numen/files/numen/run b/srcpkgs/numen/files/numen/run
new file mode 100755
index 000000000000..0f8f870dc1a2
--- /dev/null
+++ b/srcpkgs/numen/files/numen/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+: ${NUMENUSER:=_numen}
+mkdir -p /usr/share/numen
+chown $NUMENUSER:$NUMENUSER /usr/share/numen || exit
+XDG_DATA_HOME="${XDG_DATA_HOME:-/usr/share}" exec chpst -u $NUMENUSER:input:audio /usr/bin/numen ${OPTS}
diff --git a/srcpkgs/numen/files/run b/srcpkgs/numen/files/run
new file mode 100644
index 000000000000..a21a244dad58
--- /dev/null
+++ b/srcpkgs/numen/files/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd /usr/libexec/numen || exit
+if [ -z "$NUMEN_MODEL" ]; then
+ if [ -e /usr/share/vosk-models/small-en-us ]; then
+ export NUMEN_MODEL=/usr/share/vosk-models/small-en-us
+ else
+ echo 'numen: You need to install the vosk-model-small-en-us package or set $NUMEN_MODEL.' > /dev/stderr
+ fi
+fi
+exec ./numen "$@"
diff --git a/srcpkgs/numen/template b/srcpkgs/numen/template
new file mode 100644
index 000000000000..7f4719707d4e
--- /dev/null
+++ b/srcpkgs/numen/template
@@ -0,0 +1,50 @@
+# Template file for 'numen'
+pkgname=numen
+version=0.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~geb/numen"
+hostmakedepends="scdoc"
+makedepends="vosk-api libgomp-devel"
+depends="alsa-utils xdotool xset ydotool"
+short_desc="Voice control for handsfree computing"
+maintainer="John Gebbie <me@johngebbie.com>"
+license="GPL-3.0-only"
+homepage="https://sr.ht/~geb/numen"
+distfiles="https://git.sr.ht/~geb/numen/archive/${version}.tar.gz"
+checksum=8829139beec06c1c661fb0edeae83bc43db84ae9be73463f203fd8e762f13e56
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ makedepends+=" libexecinfo-devel"
+fi
+
+system_accounts="_numen"
+_numen_groups="input audio"
+
+pre_build() {
+ # for the vosk-api package (openblas)
+ export CGO_LDFLAGS="$CGO_LDFLAGS -fopenmp"
+
+ if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ # for the vosk-api package (openfst)
+ export CGO_LDFLAGS="$CGO_LDFLAGS -lexecinfo"
+ fi
+}
+
+post_install() {
+ vmkdir etc/numen
+ mv phrases "${DESTDIR}/etc/numen/phrases"
+ mv displaying "${DESTDIR}/usr/bin"
+ scdoc < numen.1.scd > numen.1
+ vman numen.1
+
+ vmkdir usr/libexec/numen
+ mv "${DESTDIR}/usr/bin/numen" "${DESTDIR}/usr/libexec/numen/speech"
+ mv handlers "${DESTDIR}/usr/libexec/numen"
+ for f in *; do
+ if [ -f "$f" ] && [ -x "$f" ]; then
+ mv "$f" "${DESTDIR}/usr/libexec/numen/$f"
+ fi
+ done
+ vbin "${FILESDIR}/run" numen
+}
next prev parent reply other threads:[~2022-10-14 9:27 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 16:56 [PR PATCH] " JohnGebbie
2022-10-09 9:49 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-09 14:30 ` JohnGebbie
2022-10-09 16:38 ` JohnGebbie
2022-10-14 9:27 ` JohnGebbie [this message]
2022-10-14 9:53 ` JohnGebbie
2022-10-30 11:20 ` JohnGebbie
2022-10-31 12:08 ` JohnGebbie
2022-10-31 12:22 ` New package: numen-0.2 JohnGebbie
2022-11-09 17:25 ` [PR PATCH] [Updated] " JohnGebbie
2022-11-09 17:29 ` New package: numen-0.3 JohnGebbie
2022-11-15 15:20 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-04 16:06 ` JohnGebbie
2022-12-04 16:12 ` JohnGebbie
2022-12-05 10:04 ` JohnGebbie
2022-12-05 10:10 ` JohnGebbie
2022-12-05 10:11 ` JohnGebbie
2022-12-08 11:17 ` [PR PATCH] [Updated] New package: numen-0.4 JohnGebbie
2022-12-08 11:34 ` JohnGebbie
2022-12-08 22:17 ` JohnGebbie
2022-12-08 23:01 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-08 23:01 ` JohnGebbie
2022-12-08 23:02 ` JohnGebbie
2022-12-17 17:30 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-17 17:33 ` JohnGebbie
2022-12-28 10:12 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-29 20:36 ` [PR PATCH] [Updated] New package: numen-0.5 JohnGebbie
2022-12-29 21:56 ` [PR REVIEW] " paper42
2022-12-29 22:10 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-29 22:11 ` [PR REVIEW] " JohnGebbie
2022-12-30 11:19 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-30 11:21 ` JohnGebbie
2022-12-30 11:48 ` JohnGebbie
2022-12-31 11:56 ` JohnGebbie
2022-12-31 11:58 ` JohnGebbie
2022-12-31 13:30 ` JohnGebbie
2022-12-31 14:43 ` [PR REVIEW] " paper42
2022-12-31 16:36 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-31 16:52 ` [PR REVIEW] " JohnGebbie
2022-12-31 21:46 ` JohnGebbie
2022-12-31 21:46 ` JohnGebbie
2023-01-02 21:35 ` [PR PATCH] [Updated] " JohnGebbie
2023-01-02 21:38 ` JohnGebbie
2023-01-06 14:22 ` Eloitor
2023-01-06 14:23 ` Eloitor
2023-01-06 14:23 ` Eloitor
2023-01-06 15:05 ` JohnGebbie
2023-01-06 15:06 ` JohnGebbie
2023-01-06 15:08 ` [PR PATCH] [Updated] " JohnGebbie
2023-01-06 15:09 ` JohnGebbie
2023-01-10 14:39 ` [PR PATCH] [Updated] " JohnGebbie
2023-01-12 14:06 ` JohnGebbie
2023-01-15 14:12 ` JohnGebbie
2023-01-20 11:33 ` JohnGebbie
2023-01-25 15:36 ` JohnGebbie
2023-01-25 15:41 ` JohnGebbie
2023-01-31 11:06 ` [PR PATCH] [Updated] " JohnGebbie
2023-02-04 18:47 ` JohnGebbie
2023-02-06 12:23 ` JohnGebbie
2023-02-06 12:29 ` [PR PATCH] [Updated] New package: numen-0.6 JohnGebbie
2023-02-06 12:32 ` JohnGebbie
2023-02-16 18:38 ` [PR PATCH] [Updated] " JohnGebbie
2023-02-16 18:45 ` JohnGebbie
2023-02-21 17:56 ` JohnGebbie
2023-02-25 9:46 ` [PR PATCH] [Updated] " JohnGebbie
2023-02-25 9:49 ` JohnGebbie
2023-03-29 10:39 ` [PR PATCH] [Updated] " JohnGebbie
2023-03-29 10:46 ` JohnGebbie
2023-03-31 17:16 ` JohnGebbie
2023-04-03 20:02 ` [PR PATCH] [Updated] " JohnGebbie
2023-04-03 20:14 ` JohnGebbie
2023-06-01 17:44 ` johngebbie
2023-06-01 17:46 ` johngebbie
2023-06-01 18:08 ` johngebbie
2023-06-01 18:13 ` johngebbie
2023-06-01 19:09 ` johngebbie
2023-06-01 19:16 ` johngebbie
2023-06-01 19:21 ` johngebbie
2023-06-01 19:24 ` johngebbie
2023-06-01 19:28 ` johngebbie
2023-06-15 8:22 ` [PR PATCH] [Updated] New package: numen-0.7 johngebbie
2023-06-15 9:34 ` johngebbie
2023-06-15 9:38 ` johngebbie
2023-06-15 9:42 ` johngebbie
2023-06-15 9:53 ` [PR PATCH] [Closed]: " johngebbie
2024-03-19 16:42 ` meator
2024-03-19 21:05 ` johngebbie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221014092733.kN7Nd_m-z5krl_WsC8Lu91MuZrtPyhnAmm20IQ73uWI@z \
--to=johngebbie@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).