summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoretckeeper2022-08-05 02:18:48 +0200
committeretckeeper2022-08-05 02:18:48 +0200
commitcc71979707f5fb29eaa008d1efcc29c030d9ac0b (patch)
treecb4e032f5191f13148efadf08fd1d8dae3a09bad /PKGBUILD
parent4104ddc5891f6e295d4f9d0c924324f028ff9975 (diff)
downloadaur-cc71979707f5fb29eaa008d1efcc29c030d9ac0b.tar.gz
version bump
removed dependency version stripping from config, since now upstream has >= instead of == replaced embedded snowboy library with symlinks to the official package removed now-useless deps that were from snowboy's moved arch back to any now that the remaining code is just python and the binary bindings are symlinked small layout changes
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 35 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 5872932a9dd0..f43b4acd2753 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,51 @@
+# Maintainer: BrainDamage
pkgname=kalliope
-pkgver=0.7.1
+pkgver=0.7.2
pkgrel=1
-arch=('x86_64')
+arch=('any')
pkgdesc="Modular always-on voice controlled personal assistant designed for home automation"
-makedepends=('python-snowboy')
-depends=(portaudio python-markupsafe python-pyaudio python-pythondialog python-jinja python-cffi python-flask-restful python-ipaddress python-apscheduler python-flask-testing python-httpretty python-requests svox-pico-bin mplayer python-feedparser python-mock python-transitions python-gitpython python-pyalsaaudio python-soundfile python-sounddevice python-sox python-voicerss-tts python-paho-mqtt python-ansible python-cachingutil python-pip cblas python-gevent python-sox python-speechrecognition python-configurationutil python-stateutil python-ruamel-yaml python-logging-tree python-classutils python-uiutil python-tableutil python-conversionutil python-openpyxl python-flask-cors python-gtts python-pyasn1 python-werkzeug python-gevent)
+depends=(python svox-pico-bin
+ python-markupsafe python-pyaudio python-pythondialog
+ python-jinja python-cffi python-flask-restful
+ python-ipaddress python-apscheduler python-flask-testing
+ python-httpretty python-requests python-gevent
+ python-feedparser python-mock python-transitions
+ python-gitpython python-pyalsaaudio python-soundfile
+ python-sounddevice python-sox python-voicerss-tts
+ python-paho-mqtt python-ansible python-cachingutil
+ python-gevent python-sox python-speechrecognition
+ python-configurationutil python-stateutil python-ruamel-yaml
+ python-logging-tree python-classutils python-uiutil
+ python-tableutil python-conversionutil python-openpyxl
+ python-flask-cors python-gtts python-pyasn1
+ python-werkzeug python-snowboy)
license=('MIT')
url="https://github.com/kalliope-project/kalliope"
source=("https://github.com/kalliope-project/kalliope/archive/v${pkgver}.tar.gz")
-sha256sums=('caa83bedbe76affb1cce128be61b404b94fa587134d48cd285284148b1c42db6')
+sha256sums=('76b5adcb1bd23a2c50046ecd17bed1ef2cb5b09584c44c01669486d33f858771')
-prepare()
-{
- cd "$srcdir/kalliope-${pkgver}"
- sed -i "s|Werkzeug==0.16.1|Werkzeug|g" setup.py
- sed -i "s|gevent==1.4.0|gevent|g" setup.py
+_targetSnowboyDir='kalliope/trigger/snowboy'
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ #remove the embedded binary snowboy libs and resources
+ find "${_targetSnowboyDir}" -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 rm -rv
}
-
build()
{
- cd "$srcdir/kalliope-${pkgver}"
- python setup.py build
-
- # bundle snowboy
- mkdir -p ./build/lib/kalliope/trigger/snowboy/x86_64/python38/
- cp /usr/lib/python3.8/site-packages/snowboy/_snowboydetect.so ./build/lib/kalliope/trigger/snowboy/x86_64/python38/
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ export PYTHONHASHSEED=0
+ python setup.py build
}
package()
{
- cd "$srcdir/kalliope-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1
- rm -r ${pkgdir}/usr/lib/python3.8/site-packages/kalliope/trigger/snowboy/armv*
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr"
+
+ #replace the embedded snowboy lib with a symlink to the official package's lib
+ _systemSitePackages="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ find "${_systemSitePackages}/snowboy" -type f -name 'snowboydetect.*' -exec ln -sfv -t "${pkgdir}/${_systemSitePackages}/${_targetSnowboyDir}" {} \;
+ ln -sv -t "${pkgdir}/${_systemSitePackages}/${_targetSnowboyDir}" "${_systemSitePackages}/snowboy/resources"
}