1
0

snapcraft.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. name: home-assistant-snap
  2. version: '0.118.4
  3. '
  4. summary: Open source home automation that puts local control and privacy first
  5. description: |
  6. Home Assistant is a home automation platform running on Python 3.
  7. It is able to track and control all devices at home and offer a
  8. platform for automating control.
  9. Please see official docs: https://git.giaever.org/joachimmg/home-assistant-snap
  10. base: core20
  11. grade: stable
  12. confinement: strict
  13. license: Apache-2.0
  14. layout:
  15. /etc/pip.conf:
  16. bind-file: $SNAP_DATA/pip.conf
  17. /etc/openzwave:
  18. bind: $SNAP/openzwave
  19. plugs:
  20. bin:
  21. interface: content
  22. content: executables
  23. target: $SNAP/shared-bin
  24. slots:
  25. components:
  26. interface: content
  27. content: components
  28. write:
  29. - $SNAP_DATA/custom_components
  30. certs:
  31. interface: content
  32. content: certs
  33. write:
  34. - $SNAP_DATA/certs
  35. configurations:
  36. interface: content
  37. write:
  38. - $SNAP_DATA
  39. hooks:
  40. install:
  41. plugs:
  42. - network
  43. - network-bind
  44. prepare-slot-certs:
  45. plugs:
  46. - network
  47. - network-bind
  48. apps:
  49. home-assistant-snap:
  50. command: bin/hass --config $SNAP_DATA
  51. command-chain:
  52. - bin/plug-bin
  53. daemon: simple
  54. environment:
  55. PIP_USER: 1
  56. restart-condition: always
  57. plugs:
  58. - bluez
  59. - network
  60. - network-bind
  61. - raw-usb
  62. # GPIO devices etc.. (e.g RaZberry HAT)
  63. - physical-memory-control
  64. - removable-media
  65. slots:
  66. - components
  67. check-config:
  68. command: bin/hass --script check_config
  69. renew-cert:
  70. command: bin/certs-daemon
  71. daemon: oneshot
  72. restart-condition: always
  73. timer: 00:00-24:00/24
  74. slots:
  75. - certs
  76. plugs:
  77. - network
  78. - network-bind
  79. force-renew-cert:
  80. command: bin/certs-daemon
  81. slots:
  82. - certs
  83. plugs:
  84. - network
  85. - network-bind
  86. parts:
  87. homeassistant:
  88. plugin: python-wot-plugin
  89. source: https://github.com/home-assistant/core.git
  90. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  91. python-packages:
  92. - setuptools
  93. - wheel
  94. - Cython
  95. - pip
  96. build-packages:
  97. - python3
  98. - python3-dev
  99. - python3-setuptools
  100. - python3-wheel
  101. - pkg-config
  102. - autoconf
  103. - build-essential
  104. - cmake
  105. - cython3
  106. - ffmpeg
  107. - libavcodec-dev
  108. - libavdevice-dev
  109. - libavfilter-dev
  110. - libavformat-dev
  111. - libavresample-dev
  112. - libavutil-dev
  113. - libffi-dev
  114. - libglib2.0-dev
  115. - libglu1-mesa-dev
  116. - libgpiod-dev
  117. - libjpeg-dev
  118. - libopenzwave1.5-dev
  119. - libssl-dev
  120. - libswscale-dev
  121. - libudev-dev
  122. - libxml2-dev
  123. - libxslt1-dev
  124. - zlib1g-dev
  125. stage-packages:
  126. - freeglut3
  127. - ffmpeg
  128. - libglu1-mesa
  129. - zlib1g
  130. requirements:
  131. - requirements_all.txt
  132. constraints:
  133. - homeassistant/package_constraints.txt
  134. override-build: |
  135. snapcraftctl build
  136. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  137. hooks:
  138. plugin: dump
  139. source: ./scripts/hooks
  140. source-type: local
  141. stage-packages:
  142. - uuid
  143. - libossp-uuid16
  144. - libassuan0
  145. - gpg
  146. - gpg-agent
  147. organize:
  148. install: snap/hooks/install
  149. configure: snap/hooks/configure
  150. post-refresh: snap/hooks/post-refresh
  151. prepare-slot-certs: snap/hooks/prepare-slot-certs
  152. connect-plug-bin: snap/hooks/connect-plug-bin
  153. bins:
  154. plugin: dump
  155. source: ./scripts/bin
  156. source-type: local
  157. organize:
  158. slot-certs: bin/slot-certs
  159. certs-daemon: bin/certs-daemon
  160. config:
  161. plugin: dump
  162. source: ./scripts/config
  163. source-type: local
  164. organize:
  165. plug-bin: bin/plug-bin