snapcraft.yaml 3.5 KB

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