snapcraft.yaml 3.4 KB

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