mycroft_19.8.1.bb 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. LICENSE = "Apache-2.0"
  6. LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6"
  7. SRCREV = "913f29d3d550637934f9abf43a097eb2c30d76fc"
  8. SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master;protocol=https \
  9. file://0001-Remove-python-venv.patch \
  10. file://0002-dev_setup.sh-Remove-the-git-dependency.patch \
  11. file://0003-dev_setup.sh-Remove-the-TERM-dependency.patch \
  12. file://0004-dev_setup.sh-Ignore-missing-package-manager.patch \
  13. file://0005-pip-requirements-Don-t-install-requirements-with-pip.patch \
  14. file://0006-Use-python3-and-pip3-instead-of-python-and-pip.patch \
  15. file://0007-mycroft.conf-Use-pocketsphinx-by-default.patch \
  16. file://dev_opts.json \
  17. file://mycroft-setup.service \
  18. file://mycroft.service \
  19. "
  20. S = "${WORKDIR}/git"
  21. inherit systemd features_check
  22. # Mycroft installs itself on the host
  23. # Just copy the setup files to the rootfs
  24. # The mycroft-setup service will copy the files to /var/ where we run them from
  25. do_install() {
  26. install -d ${D}${libdir}/
  27. cp -r ${B} ${D}${libdir}/mycroft
  28. rm -r ${D}${libdir}/mycroft/.git
  29. # Install the dev opts so it doesn't ask us on initial setup.
  30. install -m 644 ${UNPACKDIR}/dev_opts.json ${D}${libdir}/mycroft/.dev_opts.json
  31. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  32. install -d ${D}${systemd_unitdir}/system
  33. install -m 644 ${UNPACKDIR}/mycroft-setup.service ${D}${systemd_unitdir}/system
  34. sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft-setup.service
  35. fi
  36. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  37. install -d ${D}${systemd_unitdir}/system
  38. install -m 644 ${UNPACKDIR}/mycroft.service ${D}${systemd_unitdir}/system
  39. sed -i -e 's,@LIBDIR@,${libdir},g' ${D}${systemd_unitdir}/system/mycroft.service
  40. fi
  41. }
  42. FILES:${PN} += "${libdir}/mycroft"
  43. RDEPENDS:${PN} = "python3"
  44. RDEPENDS:${PN} += "python3-requests python3-pillow \
  45. python3-tornado python3-pyyaml \
  46. python3-pyalsaaudio python3-inflection \
  47. python3-pyserial python3-psutil \
  48. python3-pyaudio python3-fann2 \
  49. python3-pocketsphinx \
  50. python3-xxhash python3-pako \
  51. python3-six python3-cryptography \
  52. python3-requests-futures \
  53. python3-fasteners \
  54. python3-python-vlc \
  55. python3-padatious python3-padaos \
  56. python3-petact python3-precise-runner \
  57. python3-pulsectl python3-pychromecast \
  58. python3-msm python3-msk \
  59. python3-websocket-client \
  60. python3-google-api-python-client \
  61. "
  62. # These packages need to be installed on the target
  63. # python3-speechrecognition python3-pyee==5.0.0 python3-six==1.10.0
  64. # python3-websocket-client==0.54.0 python3-gtts python3-gtts-token
  65. # python3-python-dateutil python3-adapt-parser python3-lazy
  66. # Mycroft uses Alsa, PulseAudio and Flac
  67. RDEPENDS:${PN} += "alsa-utils alsa-plugins alsa-tools"
  68. RDEPENDS:${PN} += "pulseaudio pulseaudio-misc pulseaudio-server"
  69. RDEPENDS:${PN} += "flac mpg123"
  70. # Mycroft can do this itself on the target, but it's quicker to do it here
  71. RDEPENDS:${PN} += "mimic"
  72. # pgrep is used by stop-mycroft.sh
  73. RDEPENDS:${PN} += "procps"
  74. # More tools needed by scripts
  75. RDEPENDS:${PN} += "bash jq libnotify"
  76. SYSTEMD_SERVICE:${PN} = "mycroft-setup.service mycroft.service"
  77. REQUIRED_DISTRO_FEATURES += "pulseaudio"