aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-09-06 14:53:55 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-09-06 19:04:36 +0000
commit72200d4814db3a68e79f1c28fa0dcb677825f758 (patch)
treeffb872e3fd15dfc84af461a4f2ebded09ca20f9e
parentca02c58c8a318afa625430f8f63c5aa120b15e3a (diff)
downloadaports-72200d4814db3a68e79f1c28fa0dcb677825f758.tar.gz
aports-72200d4814db3a68e79f1c28fa0dcb677825f758.tar.bz2
aports-72200d4814db3a68e79f1c28fa0dcb677825f758.tar.xz
testing/mycroft-gui: fix mycroft-gui-core-lader
-rw-r--r--testing/mycroft-gui/0001-start-stop-commands-from-environment.patch45
-rw-r--r--testing/mycroft-gui/0002-fix-mycroft-gui-core-loader-and-stop.patch38
-rw-r--r--testing/mycroft-gui/APKBUILD11
3 files changed, 91 insertions, 3 deletions
diff --git a/testing/mycroft-gui/0001-start-stop-commands-from-environment.patch b/testing/mycroft-gui/0001-start-stop-commands-from-environment.patch
new file mode 100644
index 0000000000..90008a018a
--- /dev/null
+++ b/testing/mycroft-gui/0001-start-stop-commands-from-environment.patch
@@ -0,0 +1,45 @@
+From f2525cf9c53d0077631136d8cef4f1f88e283149 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=85ke=20Forslund?= <ake.forslund@gmail.com>
+Date: Tue, 14 Jul 2020 07:52:02 +0000
+Subject: [PATCH] Start / stop commands from environment
+
+- MYCROFT_START_CMD will be used to start the mycroft services if defined
+- MYCROFT_STOP_CMD will be used to stop the mycroft services if defined
+---
+ data/mycroft-gui-core-loader.in | 12 ++++++++++--
+ data/mycroft-gui-core-stop.in | 9 +++++++--
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/data/mycroft-gui-core-loader.in b/data/mycroft-gui-core-loader.in
+index 9b3fca4..c65de79 100644
+--- a/data/mycroft-gui-core-loader.in
++++ b/data/mycroft-gui-core-loader.in
+@@ -1,3 +1,11 @@
+ #!/bin/sh
+-cd ${MYCROFT_CORE_DIR}
+-./start-mycroft.sh all
++
++#If startup command is defined use it
++if ! test -z "$MYCROFT_START_CMD"; then
++ $MYCROFT_START_CMD
++else
++ # Use default git install location
++ cd ${MYCROFT_CORE_DIR}
++ ./start-mycroft.sh all
++fi
++
+diff --git a/data/mycroft-gui-core-stop.in b/data/mycroft-gui-core-stop.in
+index ec5fd2b..65a5cef 100644
+--- a/data/mycroft-gui-core-stop.in
++++ b/data/mycroft-gui-core-stop.in
+@@ -1,3 +1,8 @@
+ #!/bin/sh
+-cd ${MYCROFT_CORE_DIR}
+-./stop-mycroft.sh
++#If stop command is defined use it
++if ! test -z "$MYCROFT_STOP_CMD"; then
++ $MYCROFT_STOP_CMD
++else
++ # Use default git install
++ cd ${MYCROFT_CORE_DIR}
++ ./stop-mycroft.sh
diff --git a/testing/mycroft-gui/0002-fix-mycroft-gui-core-loader-and-stop.patch b/testing/mycroft-gui/0002-fix-mycroft-gui-core-loader-and-stop.patch
new file mode 100644
index 0000000000..c4ebedc6d5
--- /dev/null
+++ b/testing/mycroft-gui/0002-fix-mycroft-gui-core-loader-and-stop.patch
@@ -0,0 +1,38 @@
+From a8ec122816fdbcc1619b61990e8b306e1f071f50 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Sun, 6 Sep 2020 14:39:27 +0200
+Subject: [PATCH] Fix mycroft-gui-core loader and stop
+
+The conditional statement in the stop script was never actually closed
+
+Also fix some shellcheck issues while we're at it
+---
+ data/mycroft-gui-core-loader.in | 2 +-
+ data/mycroft-gui-core-stop.in | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/data/mycroft-gui-core-loader.in b/data/mycroft-gui-core-loader.in
+index c65de79..39bb605 100644
+--- a/data/mycroft-gui-core-loader.in
++++ b/data/mycroft-gui-core-loader.in
+@@ -5,7 +5,7 @@ if ! test -z "$MYCROFT_START_CMD"; then
+ $MYCROFT_START_CMD
+ else
+ # Use default git install location
+- cd ${MYCROFT_CORE_DIR}
++ cd "${MYCROFT_CORE_DIR}" || exit
+ ./start-mycroft.sh all
+ fi
+
+diff --git a/data/mycroft-gui-core-stop.in b/data/mycroft-gui-core-stop.in
+index 65a5cef..9e078f9 100644
+--- a/data/mycroft-gui-core-stop.in
++++ b/data/mycroft-gui-core-stop.in
+@@ -4,5 +4,6 @@ if ! test -z "$MYCROFT_STOP_CMD"; then
+ $MYCROFT_STOP_CMD
+ else
+ # Use default git install
+- cd ${MYCROFT_CORE_DIR}
++ cd "${MYCROFT_CORE_DIR}"|| exit
+ ./stop-mycroft.sh
++fi
diff --git a/testing/mycroft-gui/APKBUILD b/testing/mycroft-gui/APKBUILD
index 9e6d1ed46e..c90a06d9e9 100644
--- a/testing/mycroft-gui/APKBUILD
+++ b/testing/mycroft-gui/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mycroft-gui
pkgver=1.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="The Graphical User Interface used by the Mycroft Mark II and more"
url="https://mycroft.ai"
# ppc64le, s390x, armhf, mips and mips64 blocked by qt5-qtwebview
@@ -20,7 +20,10 @@ makedepends="
qt5-qtwebview-dev
"
checkdepends="xvfb-run"
-source="https://github.com/MycroftAI/mycroft-gui/archive/v$pkgver/mycroft-gui-v$pkgver.tar.gz"
+source="https://github.com/MycroftAI/mycroft-gui/archive/v$pkgver/mycroft-gui-v$pkgver.tar.gz
+ 0001-start-stop-commands-from-environment.patch
+ 0002-fix-mycroft-gui-core-loader-and-stop.patch
+ "
build() {
cmake -B build \
@@ -40,4 +43,6 @@ package() {
DESTDIR="$pkgdir" cmake --build build --target install
}
-sha512sums="3177f0defd653771874b4f94a05abd1047e056a3f70a24a0e47aaa4f4155f88d3a0088715a731c20adf05db5bdcc630e2965388880d72c61d617ff3c1fde1448 mycroft-gui-v1.0.1.tar.gz"
+sha512sums="3177f0defd653771874b4f94a05abd1047e056a3f70a24a0e47aaa4f4155f88d3a0088715a731c20adf05db5bdcc630e2965388880d72c61d617ff3c1fde1448 mycroft-gui-v1.0.1.tar.gz
+44131e11fa059e16272877ba53725ed3514a86252dbd453537703a4dbe55db233ac06ebc16692f3fd4f5d82fbcb51af0d19153445fb3f2ce6c50af3a55a1c1de 0001-start-stop-commands-from-environment.patch
+1010f7a4701c845d05f476669e4956293d1bb6396102c81f14e3bb15ec5845061b5196ab4d18f765b337323d01ee53d993b504710e89a2cabba99c8689d64a9e 0002-fix-mycroft-gui-core-loader-and-stop.patch"