1
0

snapcraft.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. name: home-assistant-snap
  2. version: '2021.8.8'
  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. Your new installation will be available through your browser at http://localhost:8123/
  9. Please see official docs: https://git.giaever.org/joachimmg/home-assistant-snap and https://community.home-assistant.io for help on configuration etc.
  10. See `snap connections home-assistant-snap` for necessary plugs (such as access to USB etc).
  11. NOTE! Snap will automatically update whenever a new revision of the snap package is available.
  12. base: core20
  13. grade: stable
  14. confinement: strict
  15. license: Apache-2.0
  16. architectures:
  17. - build-on: amd64
  18. - build-on: arm64
  19. - build-on: armhf
  20. - build-on: ppc64el
  21. layout:
  22. /etc/pip.conf:
  23. bind-file: $SNAP_COMMON/pip.conf
  24. /etc/openzwave:
  25. bind: $SNAP/openzwave
  26. /etc/ethertypes:
  27. bind-file: $SNAP/etc/ethertypes
  28. /etc/protocols:
  29. bind-file: $SNAP/etc/protocols
  30. /etc/services:
  31. bind-file: $SNAP/etc/services
  32. plugs:
  33. bin:
  34. interface: content
  35. content: executables
  36. target: $SNAP/shared-bin
  37. slots:
  38. components:
  39. interface: content
  40. content: components
  41. write:
  42. - $SNAP_DATA/custom_components
  43. configurations:
  44. interface: content
  45. write:
  46. - $SNAP_DATA
  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. - network-control
  61. - raw-usb
  62. - serial-port
  63. - physical-memory-control
  64. - removable-media
  65. slots:
  66. - components
  67. open-localhost:
  68. command: bin/open-localhost
  69. plugs:
  70. - desktop
  71. check-config:
  72. plugs:
  73. - network
  74. environment:
  75. PIP_USER: 1
  76. command: bin/hass --script check_config --config $SNAP_DATA -i
  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. - libpcap0.8-dev
  111. - libswresample-dev
  112. - libssl-dev
  113. - libswscale-dev
  114. - libudev-dev
  115. - libxml2-dev
  116. - libxslt1-dev
  117. - zlib1g-dev
  118. stage-packages:
  119. - freeglut3
  120. - ffmpeg
  121. - libglu1-mesa
  122. - netbase
  123. - tcpdump
  124. - libpcap0.8
  125. - zlib1g
  126. stage:
  127. - -lib/python3.8/site-packages/homeassistant/components/updater
  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. updater:
  136. after: [homeassistant]
  137. plugin: dump
  138. source: ./src/components
  139. source-type: local
  140. organize:
  141. '*': lib/python3.8/site-packages/homeassistant/components/
  142. bins:
  143. plugin: dump
  144. source: ./src/bin
  145. source-type: local
  146. organize:
  147. open-localhost: bin/open-localhost
  148. hooks:
  149. plugin: dump
  150. source: ./src/hooks
  151. source-type: local
  152. stage-packages:
  153. - uuid
  154. organize:
  155. install: snap/hooks/install
  156. configure: snap/hooks/configure
  157. post-refresh: snap/hooks/post-refresh
  158. connect-plug-bin: snap/hooks/connect-plug-bin
  159. config:
  160. plugin: dump
  161. source: ./src/config
  162. source-type: local
  163. organize:
  164. plug-bin: bin/plug-bin