blob: c8ae534681ea923ff0d7980065990f6e2327324e [file] [log] [blame]
Brad Bishop34ae6002019-04-08 15:21:03 -04001SUMMARY = "Mycroft is a hackable open source voice assistant."
2DESCRIPTION = "Mycroft is the world’s first open source assistant. "
3HOMEPAGE = "https://mycroft.ai/"
4SECTION = "multimedia"
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6"
8
9SRCREV = "6706c377820912f83c1838d9eb32950ca9e39ec7"
10SRC_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
21S = "${WORKDIR}/git"
22
23inherit systemd
24
25# Mycroft installs itself on the host
26# Just copy the setup files to the rootfs
27do_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
48FILES_${PN} += "${libdir}/mycroft"
49
50RDEPENDS_${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
56RDEPENDS_${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 and PulseAudio
67RDEPENDS_${PN} += "alsa-oss alsa-utils alsa-plugins alsa-tools"
68RDEPENDS_${PN} += "pulseaudio pulseaudio-misc pulseaudio-server"
69
70# Mycroft can do this itself on the target, but it's quicker to do it here
71RDEPENDS_${PN} += "mimic"
72
73SYSTEMD_SERVICE_${PN} = "mycroft-setup.service mycroft.service"