Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Mycroft is a hackable open source voice assistant." |
| 2 | DESCRIPTION = "Mycroft is the world’s first open source assistant. " |
| 3 | HOMEPAGE = "https://mycroft.ai/" |
| 4 | SECTION = "multimedia" |
| 5 | |
| 6 | LICENSE = "Apache-2.0" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6" |
| 8 | |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 9 | SRCREV = "913f29d3d550637934f9abf43a097eb2c30d76fc" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 10 | SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master;protocol=https \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 11 | file://0001-Remove-python-venv.patch \ |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 12 | file://0002-dev_setup.sh-Remove-the-git-dependency.patch \ |
| 13 | file://0003-dev_setup.sh-Remove-the-TERM-dependency.patch \ |
Brad Bishop | 2d39a06 | 2019-10-28 08:33:36 -0400 | [diff] [blame] | 14 | file://0004-dev_setup.sh-Ignore-missing-package-manager.patch \ |
| 15 | file://0005-pip-requirements-Don-t-install-requirements-with-pip.patch \ |
| 16 | file://0006-Use-python3-and-pip3-instead-of-python-and-pip.patch \ |
| 17 | file://0007-mycroft.conf-Use-pocketsphinx-by-default.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | file://dev_opts.json \ |
| 19 | file://mycroft-setup.service \ |
| 20 | file://mycroft.service \ |
| 21 | " |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 25 | inherit systemd features_check |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | |
| 27 | # Mycroft installs itself on the host |
| 28 | # Just copy the setup files to the rootfs |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 29 | # The mycroft-setup service will copy the files to /var/ where we run them from |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 30 | do_install() { |
| 31 | install -d ${D}${libdir}/ |
| 32 | cp -r ${B} ${D}${libdir}/mycroft |
| 33 | rm -r ${D}${libdir}/mycroft/.git |
| 34 | |
| 35 | # Install the dev opts so it doesn't ask us on initial setup. |
| 36 | install -m 644 ${WORKDIR}/dev_opts.json ${D}${libdir}/mycroft/.dev_opts.json |
| 37 | |
| 38 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 39 | install -d ${D}${systemd_unitdir}/system |
| 40 | install -m 644 ${WORKDIR}/mycroft-setup.service ${D}${systemd_unitdir}/system |
| 41 | sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft-setup.service |
| 42 | fi |
| 43 | |
| 44 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 45 | install -d ${D}${systemd_unitdir}/system |
| 46 | install -m 644 ${WORKDIR}/mycroft.service ${D}${systemd_unitdir}/system |
| 47 | sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft.service |
| 48 | fi |
| 49 | } |
| 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | FILES:${PN} += "${libdir}/mycroft" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 52 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | RDEPENDS:${PN} = "python3" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | RDEPENDS:${PN} += "python3-requests python3-pillow \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 56 | python3-tornado python3-pyyaml \ |
| 57 | python3-pyalsaaudio python3-inflection \ |
| 58 | python3-pyserial python3-psutil \ |
| 59 | python3-pyaudio python3-fann2 \ |
| 60 | python3-pocketsphinx \ |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 61 | python3-xxhash python3-pako \ |
| 62 | python3-six python3-cryptography \ |
| 63 | python3-requests-futures \ |
Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame] | 64 | python3-fasteners \ |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 65 | python3-python-vlc \ |
| 66 | python3-padatious python3-padaos \ |
| 67 | python3-petact python3-precise-runner \ |
| 68 | python3-pulsectl python3-pychromecast \ |
| 69 | python3-msm python3-msk \ |
| 70 | python3-websocket-client \ |
| 71 | python3-google-api-python-client \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 72 | " |
| 73 | |
Brad Bishop | 6a62e0e | 2019-10-21 08:11:42 -0400 | [diff] [blame] | 74 | # These packages need to be installed on the target |
| 75 | # python3-speechrecognition python3-pyee==5.0.0 python3-six==1.10.0 |
| 76 | # python3-websocket-client==0.54.0 python3-gtts python3-gtts-token |
| 77 | # python3-python-dateutil python3-adapt-parser python3-lazy |
| 78 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 79 | # Mycroft uses Alsa, PulseAudio and Flac |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 80 | RDEPENDS:${PN} += "alsa-utils alsa-plugins alsa-tools" |
| 81 | RDEPENDS:${PN} += "pulseaudio pulseaudio-misc pulseaudio-server" |
| 82 | RDEPENDS:${PN} += "flac mpg123" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 83 | |
| 84 | # Mycroft can do this itself on the target, but it's quicker to do it here |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 85 | RDEPENDS:${PN} += "mimic" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 86 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 87 | # pgrep is used by stop-mycroft.sh |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 88 | RDEPENDS:${PN} += "procps" |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 89 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 90 | # More tools needed by scripts |
| 91 | RDEPENDS:${PN} += "bash jq libnotify" |
| 92 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | SYSTEMD_SERVICE:${PN} = "mycroft-setup.service mycroft.service" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 94 | |
| 95 | REQUIRED_DISTRO_FEATURES += "pulseaudio" |