diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | mycroft-core.install | 26 | ||||
-rw-r--r-- | mycroft-service.service | 11 | ||||
-rw-r--r-- | mycroft-skills.service | 11 | ||||
-rw-r--r-- | mycroft-voice.service | 11 | ||||
-rw-r--r-- | mycroft.target | 4 |
7 files changed, 84 insertions, 11 deletions
@@ -1,7 +1,7 @@ # Generated by mksrcinfo v8 -# Mon Dec 26 23:28:24 UTC 2016 +# Tue Dec 27 12:37:54 UTC 2016 pkgbase = mycroft-core - pkgdesc = Mycroft Core, the Mycroft Artificial Intelligence platform. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core + pkgdesc = Mycroft Core, the Mycroft Artificial Intelligence platform. If you are using pulseaudio, please be sure to be running it on system mode. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core pkgver = 0.7.20.eb0a37c pkgrel = 1 url = https://github.com/MycroftAI/mycroft-core @@ -31,7 +31,15 @@ pkgbase = mycroft-core depends = mimic-git depends = alsa-utils source = git://github.com/MycroftAI/mycroft-core.git#commit=eb0a37c + source = mycroft.target + source = mycroft-service.service + source = mycroft-skills.service + source = mycroft-voice.service sha512sums = SKIP + sha512sums = a5989c9ff2b0f7338b4a6f9342c980413d71da375355abb416dce3a79e298fea7872e39b6a1505437aab860ed66755a6f344821f4f7cb31aed46792b2cef3f96 + sha512sums = 74e9451dc38560e6efd4baf8c77cb81bdf9c0b821c1935eb2dac060614c0f14458101151583c3f444da59d9f065a744a7ad6f8daaeceec8f4e37f67d33199b6b + sha512sums = cb8a5c2245ecd52e66acedebf7ce6ce8db32a84b3495d34cc3749e03aa7d12c958b5f71fa01aa79b36906401e655dd6442e979d60d53d64160d9f956551a92df + sha512sums = 7266494bf416a6f969bcbe9e854753e2a7e498ff9b43d6ca0ba37d94736bca9bf35f5825f24e19138428728189814222f2592fdea4c7e1d0d0ad18e7d3606a0b pkgname = mycroft-core @@ -4,7 +4,7 @@ pkgname=mycroft-core _pkgcommit=eb0a37c pkgver=0.7.20.${_pkgcommit} pkgrel=1 -pkgdesc="Mycroft Core, the Mycroft Artificial Intelligence platform. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core" +pkgdesc="Mycroft Core, the Mycroft Artificial Intelligence platform. If you are using pulseaudio, please be sure to be running it on system mode. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core" arch=('i686' 'x86_64') url='https://github.com/MycroftAI/mycroft-core' license=('GPLv3') @@ -36,8 +36,16 @@ install=mycroft-core.install # FIXME: The tarball is outdated and not able to pair with home.mycroft.ai #source=("https://codeload.github.com/MycroftAI/mycroft-core/tar.gz/release/${pkgver}") #sha512sums=('cd86a76b4131db1b5a172b617ee8ff46d60b8094b8dec9e3a88fe976f7d6c4d9b65b44fd62984d1ce5c8c761f15a341291677b9c1bccc50fead80727b474bca5') -source=("git://github.com/MycroftAI/mycroft-core.git#commit=${_pkgcommit}") -sha512sums=(SKIP) # Git already ensures data consistency +source=("git://github.com/MycroftAI/mycroft-core.git#commit=${_pkgcommit}" + "mycroft.target" + "mycroft-service.service" + "mycroft-skills.service" + "mycroft-voice.service") +sha512sums=(SKIP # Git already ensures data consistency + a5989c9ff2b0f7338b4a6f9342c980413d71da375355abb416dce3a79e298fea7872e39b6a1505437aab860ed66755a6f344821f4f7cb31aed46792b2cef3f96 + 74e9451dc38560e6efd4baf8c77cb81bdf9c0b821c1935eb2dac060614c0f14458101151583c3f444da59d9f065a744a7ad6f8daaeceec8f4e37f67d33199b6b + cb8a5c2245ecd52e66acedebf7ce6ce8db32a84b3495d34cc3749e03aa7d12c958b5f71fa01aa79b36906401e655dd6442e979d60d53d64160d9f956551a92df + 7266494bf416a6f969bcbe9e854753e2a7e498ff9b43d6ca0ba37d94736bca9bf35f5825f24e19138428728189814222f2592fdea4c7e1d0d0ad18e7d3606a0b) # Valid only when using a tarball # prepare(){ @@ -53,4 +61,10 @@ package() { # Place a link to mimic where mycroft is expecting it mkdir -p ${pkgdir}/usr/share/mycroft-core/mimic/bin ln -s /usr/bin/mimic ${pkgdir}/usr/share/mycroft-core/mimic/bin/mimic + + # Symtemd units + install -D -m644 "${srcdir}/mycroft.target" "${pkgdir}/usr/lib/systemd/user/mycroft.target" + install -D -m644 "${srcdir}/mycroft-service.service" "${pkgdir}/usr/lib/systemd/user/mycroft-service.service" + install -D -m644 "${srcdir}/mycroft-skills.service" "${pkgdir}/usr/lib/systemd/user/mycroft-skills.service" + install -D -m644 "${srcdir}/mycroft-voice.service" "${pkgdir}/usr/lib/systemd/user/mycroft-voice.service" } diff --git a/mycroft-core.install b/mycroft-core.install index 815e84815d06..3ccd7bea8630 100644 --- a/mycroft-core.install +++ b/mycroft-core.install @@ -1,11 +1,11 @@ pre_install() { - useradd -r mycroft-core -b /usr/share -G audio + useradd -r mycroft-core -b /usr/share } post_install() { chown -R mycroft-core:mycroft-core /usr/share/mycroft-core + chmod g+w /usr/share/mycroft-core - # install packages touch /usr/share/mycroft-core/.bashrc echo "# Virtualenv initialization" >> /usr/share/mycroft-core/.bashrc echo "export WORKON_HOME=\$HOME/.virtualenvs" >> /usr/share/mycroft-core/.bashrc @@ -16,6 +16,24 @@ post_install() { sudo -u mycroft-core bash -c 'source ~/.bashrc && mkvirtualenv mycroft --system-site-packages -p $(which python2)' sudo -u mycroft-core bash -c 'source ~/.bashrc && workon mycroft && pip install -r /usr/share/mycroft-core/requirements.txt' + + echo "*** ATTENTION ***" + echo "" + echo "* The users who will use Mycroft need to be part of the mycroft-core group" + echo "" + echo "* You can configure your Mycroft instance preferences systemwide at:" + echo " /usr/share/mycroft-core/mycroft/configuration/mycroft.conf" + echo "" + echo "* The systemd units are" + echo " - mycroft.target" + echo " - mycroft-service.service" + echo " - mycroft-skills.service" + echo " - mycroft-voice.service" + echo "" + echo "* Those are USER units which you can start issuing:" + echo " systemctl --user start mycroft.target" + echo " More information at: https://wiki.archlinux.org/index.php/Systemd/User" + } post_upgrade() { @@ -25,8 +43,4 @@ post_upgrade() { post_remove() { userdel mycroft-core rm -rf /usr/share/mycroft-core - - echo "ATTENTION:" - echo "If you are using PulseAudio, please be sure to be running it on system mode" - echo "You should configure it at /etc/pulse/daemon.conf" } diff --git a/mycroft-service.service b/mycroft-service.service new file mode 100644 index 000000000000..7fe1c3943cd9 --- /dev/null +++ b/mycroft-service.service @@ -0,0 +1,11 @@ +[Unit] +Description=Mycroft main service +After=network.target local-fs.target remote-fs.target + +[Service] +Type=simple +PermissionsStartOnly=true +ExecStart=/bin/bash -c "source /usr/share/mycroft-core/.virtualenvs/mycroft/bin/activate && /usr/share/mycroft-core/start.sh service" + +[Install] +WantedBy=multi-user.target diff --git a/mycroft-skills.service b/mycroft-skills.service new file mode 100644 index 000000000000..4897757922ae --- /dev/null +++ b/mycroft-skills.service @@ -0,0 +1,11 @@ +[Unit] +Description=Mycroft skills provider +After=network.target local-fs.target remote-fs.target mycroft-service + +[Service] +Type=simple +PermissionsStartOnly=true +ExecStart=/bin/bash -c "source /usr/share/mycroft-core/.virtualenvs/mycroft/bin/activate && /usr/share/mycroft-core/start.sh skills" + +[Install] +WantedBy=multi-user.target diff --git a/mycroft-voice.service b/mycroft-voice.service new file mode 100644 index 000000000000..b9abc4e728a4 --- /dev/null +++ b/mycroft-voice.service @@ -0,0 +1,11 @@ +[Unit] +Description=Mycroft voice processing +After=network.target local-fs.target remote-fs.target mycroft-skills + +[Service] +Type=simple +PermissionsStartOnly=true +ExecStart=/bin/bash -c "source /usr/share/mycroft-core/.virtualenvs/mycroft/bin/activate && /usr/share/mycroft-core/start.sh voice" + +[Install] +WantedBy=multi-user.target diff --git a/mycroft.target b/mycroft.target new file mode 100644 index 000000000000..e6b5623fedbf --- /dev/null +++ b/mycroft.target @@ -0,0 +1,4 @@ +[Unit] +Description=Mycroft Core +After=network.target local-fs.target remote-fs.target +Requires=mycroft-service.service mycroft-skills.service mycroft-voice.service |