snapcraft.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. name: home-assistant-snap
  2. version: '0.117.6'
  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. certs:
  30. interface: content
  31. content: certs
  32. write:
  33. - $SNAP_DATA/certs
  34. configurations:
  35. interface: content
  36. write:
  37. - $SNAP_DATA
  38. hooks:
  39. install:
  40. plugs:
  41. - network
  42. - network-bind
  43. prepare-slot-certs:
  44. plugs:
  45. - network
  46. - network-bind
  47. apps:
  48. home-assistant-snap:
  49. command: bin/hass --config $SNAP_DATA
  50. command-chain:
  51. - bin/plug-bin
  52. daemon: simple
  53. environment:
  54. PIP_USER: 1
  55. restart-condition: always
  56. plugs:
  57. - bluez
  58. - network
  59. - network-bind
  60. - raw-usb
  61. # GPIO devices etc.. (e.g RaZberry HAT)
  62. - physical-memory-control
  63. slots:
  64. - components
  65. check-config:
  66. command: bin/hass --script check_config
  67. renew-cert:
  68. command: bin/certs-daemon
  69. daemon: oneshot
  70. restart-condition: always
  71. timer: 00:00-24:00/24
  72. slots:
  73. - certs
  74. plugs:
  75. - network
  76. - network-bind
  77. force-renew-cert:
  78. command: bin/certs-daemon
  79. slots:
  80. - certs
  81. plugs:
  82. - network
  83. - network-bind
  84. parts:
  85. homeassistant:
  86. plugin: python-wot-plugin
  87. source: https://github.com/home-assistant/core.git
  88. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  89. python-packages:
  90. - setuptools
  91. - wheel
  92. - Cython
  93. - pip
  94. build-packages:
  95. - python3
  96. - python3-dev
  97. - python3-setuptools
  98. - python3-wheel
  99. - pkg-config
  100. - autoconf
  101. - build-essential
  102. - cmake
  103. - cython3
  104. - ffmpeg
  105. - libavcodec-dev
  106. - libavdevice-dev
  107. - libavfilter-dev
  108. - libavformat-dev
  109. - libavresample-dev
  110. - libavutil-dev
  111. - libffi-dev
  112. - libglib2.0-dev
  113. - libglu1-mesa-dev
  114. - libgpiod-dev
  115. - libjpeg-dev
  116. - libopenzwave1.5-dev
  117. - libssl-dev
  118. - libswscale-dev
  119. - libudev-dev
  120. - libxml2-dev
  121. - libxslt1-dev
  122. - zlib1g-dev
  123. stage-packages:
  124. - freeglut3
  125. - ffmpeg
  126. - libglu1-mesa
  127. - zlib1g
  128. requirements:
  129. - requirements_all.txt
  130. constraints:
  131. - homeassistant/package_constraints.txt
  132. override-build: |
  133. snapcraftctl build
  134. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  135. hooks:
  136. plugin: dump
  137. source: ./scripts/hooks
  138. source-type: local
  139. stage-packages:
  140. - uuid
  141. - libossp-uuid16
  142. - libassuan0
  143. - gpg
  144. - gpg-agent
  145. organize:
  146. install: snap/hooks/install
  147. configure: snap/hooks/configure
  148. post-refresh: snap/hooks/post-refresh
  149. prepare-slot-certs: snap/hooks/prepare-slot-certs
  150. connect-plug-bin: snap/hooks/connect-plug-bin
  151. bins:
  152. plugin: dump
  153. source: ./scripts/bin
  154. source-type: local
  155. organize:
  156. slot-certs: bin/slot-certs
  157. certs-daemon: bin/certs-daemon
  158. config:
  159. plugin: dump
  160. source: ./scripts/config
  161. source-type: local
  162. organize:
  163. plug-bin: bin/plug-bin