snapcraft.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: home-assistant
  2. version: git
  3. summary: Open source home automation that puts local control and privacy first
  4. description: |
  5. Home Assistant is a home automation platform running on Python 3.
  6. It is able to track and control all devices at home and offer a
  7. platform for automating control.
  8. grade: devel
  9. base: core18
  10. confinement: devmode
  11. apps:
  12. hass:
  13. command: hass --config $SNAP_DATA
  14. daemon: simple
  15. restart-condition: always
  16. plugs: [network, network-bind]
  17. parts:
  18. home-assistant:
  19. plugin: python
  20. source: https://github.com/home-assistant/home-assistant.git
  21. source-tag: "0.91.4"
  22. python-version: python3
  23. python-packages:
  24. - Cython
  25. build-packages:
  26. - python3-dev
  27. - pkg-config
  28. - autoconf
  29. - libffi-dev
  30. - libjpeg8-dev
  31. - libssl-dev
  32. - libudev-dev
  33. - libusb-1.0-0-dev
  34. - libxml2-dev
  35. - libxslt1-dev
  36. - zlib1g-dev
  37. stage-packages:
  38. - libavformat-dev
  39. - libavcodec-dev
  40. - libavdevice-dev
  41. - libavutil-dev
  42. - libswscale-dev
  43. - libswresample-dev
  44. - libavfilter-dev
  45. - libslang2-dev
  46. - libglu1-mesa-dev
  47. - freeglut3-dev
  48. - cython3
  49. override-build: |
  50. # Remove LICENCE-part of insteonplm, which causes pip to fail
  51. echo "Fixing broken insteonplm install"
  52. PKGS="$(pwd)/../python-packages"
  53. IPKG="$(ls ${PKGS}/insteonplm*.tar.gz | tail -n 1)"
  54. BIPKG="${HOME}/$(basename ${IPKG}.bup)"
  55. if [ ! -f "${BIPKG}" ]; then
  56. echo -e " * Creating backup to\n\tTO: ${BIPKG}\n\t<= ${IPKG}"
  57. cp "${IPKG}" "${BIPKG}"
  58. else
  59. echo -e " * Restoring backup\n\tFROM: ${BIPKG}\n\t=> ${IPKG}"
  60. cp "${BIPKG}" "${IPKG}"
  61. fi
  62. echo " * Insteonplm file: ${IPKG}"
  63. SCFG=$(tar -xvzf "${IPKG}" | grep setup.cfg --max-count=1)
  64. rm "${IPKG}"
  65. echo " * Editing setup.cfg file: ${SCFG}"
  66. sed -i '/^license_file/d' "${SCFG}"
  67. echo " * Compressing $(dirname ${SCFG}) to: ${IPKG}"
  68. tar -zcf "${IPKG}" "$(dirname ${SCFG})"
  69. echo " * Deleting tmp-folder $(dirname ${SCFG})"
  70. rm -rf "$(dirname ${SCFG})"
  71. snapcraftctl build
  72. requirements:
  73. - requirements_all.txt