diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb')
-rw-r--r-- | meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb new file mode 100644 index 000000000..becd0bf79 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb | |||
@@ -0,0 +1,74 @@ | |||
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 | |||
9 | SRCREV = "4b45db34ecd95b62ef2b66a8e5180c66ca791a21" | ||
10 | SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master \ | ||
11 | file://0001-Remove-python-venv.patch \ | ||
12 | file://0002-pip-requirements-Remove-ones-installed-by-OE.patch \ | ||
13 | file://0003-Use-python3-and-pip3-instead-of-python-and-pip.patch \ | ||
14 | file://0004-dev_setup.sh-Remove-the-git-dependency.patch \ | ||
15 | file://0005-dev_setup.sh-Remove-the-test-setup-dependency.patch \ | ||
16 | file://dev_opts.json \ | ||
17 | file://mycroft-setup.service \ | ||
18 | file://mycroft.service \ | ||
19 | " | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit systemd | ||
24 | |||
25 | # Mycroft installs itself on the host | ||
26 | # Just copy the setup files to the rootfs | ||
27 | do_install() { | ||
28 | install -d ${D}${libdir}/ | ||
29 | cp -r ${B} ${D}${libdir}/mycroft | ||
30 | rm -r ${D}${libdir}/mycroft/.git | ||
31 | |||
32 | # Install the dev opts so it doesn't ask us on initial setup. | ||
33 | install -m 644 ${WORKDIR}/dev_opts.json ${D}${libdir}/mycroft/.dev_opts.json | ||
34 | |||
35 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
36 | install -d ${D}${systemd_unitdir}/system | ||
37 | install -m 644 ${WORKDIR}/mycroft-setup.service ${D}${systemd_unitdir}/system | ||
38 | sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft-setup.service | ||
39 | fi | ||
40 | |||
41 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
42 | install -d ${D}${systemd_unitdir}/system | ||
43 | install -m 644 ${WORKDIR}/mycroft.service ${D}${systemd_unitdir}/system | ||
44 | sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft.service | ||
45 | fi | ||
46 | } | ||
47 | |||
48 | FILES_${PN} += "${libdir}/mycroft" | ||
49 | |||
50 | RDEPENDS_${PN} = "python3" | ||
51 | |||
52 | # Install as many Python packages as we can. | ||
53 | # We don't yet have all the packages in meta-python. | ||
54 | # Install as many as we can and we will install the rest on the target with pip. | ||
55 | # TODO: Add all the remaining packages and remove pip | ||
56 | RDEPENDS_${PN} += "python3-pip \ | ||
57 | python3-requests python3-pillow \ | ||
58 | python3-tornado python3-pyyaml \ | ||
59 | python3-pyalsaaudio python3-inflection \ | ||
60 | python3-pyserial python3-psutil \ | ||
61 | python3-pyaudio python3-fann2 \ | ||
62 | python3-pocketsphinx \ | ||
63 | python3-xxhash \ | ||
64 | " | ||
65 | |||
66 | # Mycroft uses Alsa, PulseAudio and Flac | ||
67 | RDEPENDS_${PN} += "alsa-oss alsa-utils alsa-plugins alsa-tools" | ||
68 | RDEPENDS_${PN} += "pulseaudio pulseaudio-misc pulseaudio-server" | ||
69 | RDEPENDS_${PN} += "flac" | ||
70 | |||
71 | # Mycroft can do this itself on the target, but it's quicker to do it here | ||
72 | RDEPENDS_${PN} += "mimic" | ||
73 | |||
74 | SYSTEMD_SERVICE_${PN} = "mycroft-setup.service mycroft.service" | ||