snapcraft.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.90.1"
  22. python-version: python3
  23. python-packages:
  24. - Cython
  25. build-packages:
  26. - python3-dev
  27. - pkg-config
  28. - autoconf
  29. - libudev-dev
  30. - libusb-1.0-0-dev
  31. - libffi-dev
  32. - libssl-dev
  33. - libjpeg-dev
  34. - zlib1g-dev
  35. stage-packages:
  36. - libavformat-dev
  37. - libavcodec-dev
  38. - libavdevice-dev
  39. - libavutil-dev
  40. - libswscale-dev
  41. - libswresample-dev
  42. - libavfilter-dev
  43. - libslang2-dev
  44. - libglu1-mesa-dev
  45. - freeglut3-dev
  46. - cython3
  47. override-build: |
  48. # Remove LICENCE-part of insteonplm, which causes pip to fail
  49. echo "Fixing broken insteonplm install"
  50. PKGS="$(pwd)/../python-packages"
  51. IPKG="$(ls ${PKGS}/insteonplm*.tar.gz | tail -n 1)"
  52. BIPKG="${HOME}/$(basename ${IPKG}.bup)"
  53. if [ ! -f "${BIPKG}" ]; then
  54. echo -e " * Creating backup to\n\tTO: ${BIPKG}\n\t<= ${IPKG}"
  55. cp "${IPKG}" "${BIPKG}"
  56. else
  57. echo -e " * Restoring backup\n\tFROM: ${BIPKG}\n\t=> ${IPKG}"
  58. cp "${BIPKG}" "${IPKG}"
  59. fi
  60. echo " * Insteonplm file: ${IPKG}"
  61. SCFG=$(tar -xvzf "${IPKG}" | grep setup.cfg --max-count=1)
  62. rm "${IPKG}"
  63. echo " * Editing setup.cfg file: ${SCFG}"
  64. sed -i '/^license_file/d' "${SCFG}"
  65. echo " * Compressing $(dirname ${SCFG}) to: ${IPKG}"
  66. tar -zcf "${IPKG}" "$(dirname ${SCFG})"
  67. echo " * Deleting tmp-folder $(dirname ${SCFG})"
  68. rm -rf "$(dirname ${SCFG})"
  69. snapcraftctl build
  70. requirements:
  71. - requirements_all.txt