snapcraft.yaml 2.4 KB

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