snapcraft.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. name: home-assistant-snap
  2. version: '2021.2.2'
  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. Please see official docs: https://git.giaever.org/joachimmg/home-assistant-snap
  9. base: core20
  10. grade: stable
  11. confinement: strict
  12. license: Apache-2.0
  13. layout:
  14. /etc/pip.conf:
  15. bind-file: $SNAP_DATA/pip.conf
  16. /etc/openzwave:
  17. bind: $SNAP/openzwave
  18. plugs:
  19. bin:
  20. interface: content
  21. content: executables
  22. target: $SNAP/shared-bin
  23. slots:
  24. components:
  25. interface: content
  26. content: components
  27. write:
  28. - $SNAP_DATA/custom_components
  29. configurations:
  30. interface: content
  31. write:
  32. - $SNAP_DATA
  33. apps:
  34. home-assistant-snap:
  35. command: bin/hass --config $SNAP_DATA
  36. command-chain:
  37. - bin/plug-bin
  38. daemon: simple
  39. environment:
  40. PIP_USER: 1
  41. restart-condition: always
  42. plugs:
  43. - bluez
  44. - network
  45. - network-bind
  46. - raw-usb
  47. # GPIO devices etc.. (e.g RaZberry HAT)
  48. - physical-memory-control
  49. - removable-media
  50. slots:
  51. - components
  52. check-config:
  53. command: bin/hass --script check_config
  54. parts:
  55. homeassistant:
  56. plugin: python #-wot-plugin
  57. source: https://github.com/home-assistant/core.git
  58. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  59. python-packages:
  60. - setuptools
  61. - wheel
  62. - Cython
  63. - pip
  64. # build-environment:
  65. # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
  66. build-packages:
  67. - python3
  68. - python3-dev
  69. - python3-setuptools
  70. - python3-wheel
  71. - pkg-config
  72. - autoconf
  73. - build-essential
  74. - cmake
  75. - cython3
  76. - ffmpeg
  77. - libavcodec-dev
  78. - libavdevice-dev
  79. - libavfilter-dev
  80. - libavformat-dev
  81. - libavresample-dev
  82. - libavutil-dev
  83. - libffi-dev
  84. - libglib2.0-dev
  85. - libglu1-mesa-dev
  86. - libgpiod-dev
  87. - libjpeg-dev
  88. - libopenzwave1.5-dev
  89. - libssl-dev
  90. - libswscale-dev
  91. - libudev-dev
  92. - libxml2-dev
  93. - libxslt1-dev
  94. - zlib1g-dev
  95. stage-packages:
  96. - freeglut3
  97. - ffmpeg
  98. - libglu1-mesa
  99. - zlib1g
  100. requirements:
  101. - requirements_all.txt
  102. constraints:
  103. - homeassistant/package_constraints.txt
  104. override-build: |
  105. snapcraftctl build
  106. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  107. hooks:
  108. plugin: dump
  109. source: ./scripts/hooks
  110. source-type: local
  111. stage-packages:
  112. - uuid
  113. organize:
  114. install: snap/hooks/install
  115. configure: snap/hooks/configure
  116. post-refresh: snap/hooks/post-refresh
  117. connect-plug-bin: snap/hooks/connect-plug-bin
  118. config:
  119. plugin: dump
  120. source: ./scripts/config
  121. source-type: local
  122. organize:
  123. plug-bin: bin/plug-bin