snapcraft.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. name: home-assistant-snap
  2. version: '2021.7.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. 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_DATA/pip.conf
  24. /etc/openzwave:
  25. bind: $SNAP/openzwave
  26. # /etc/ethertypes:
  27. # bind-file: $SNAP/etc/ethertypes
  28. plugs:
  29. bin:
  30. interface: content
  31. content: executables
  32. target: $SNAP/shared-bin
  33. slots:
  34. components:
  35. interface: content
  36. content: components
  37. write:
  38. - $SNAP_DATA/custom_components
  39. configurations:
  40. interface: content
  41. write:
  42. - $SNAP_DATA
  43. # hooks:
  44. # post-refresh:
  45. # plugs:
  46. # - network
  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. # GPIO devices etc.. (e.g RaZberry HAT)
  64. - physical-memory-control
  65. - removable-media
  66. slots:
  67. - components
  68. check-config:
  69. plugs:
  70. - network
  71. environment:
  72. PIP_USER: 1
  73. command: bin/hass --script check_config --config $SNAP_DATA -i
  74. parts:
  75. homeassistant:
  76. plugin: python-wot-plugin
  77. source: https://github.com/home-assistant/core.git
  78. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  79. python-packages:
  80. - setuptools
  81. - wheel
  82. - Cython
  83. - pip
  84. build-packages:
  85. - python3
  86. - python3-dev
  87. - python3-setuptools
  88. - python3-wheel
  89. - pkg-config
  90. - autoconf
  91. - build-essential
  92. - cmake
  93. - cython3
  94. - ffmpeg
  95. - libavcodec-dev
  96. - libavdevice-dev
  97. - libavfilter-dev
  98. - libavformat-dev
  99. - libavresample-dev
  100. - libavutil-dev
  101. - libffi-dev
  102. - libglib2.0-dev
  103. - libglu1-mesa-dev
  104. - libgpiod-dev
  105. - libjpeg-dev
  106. - libopenzwave1.5-dev
  107. - libswresample-dev
  108. - libssl-dev
  109. - libswscale-dev
  110. - libudev-dev
  111. - libxml2-dev
  112. - libxslt1-dev
  113. - zlib1g-dev
  114. stage-packages:
  115. - freeglut3
  116. - ffmpeg
  117. - iputils-ping
  118. - libglu1-mesa
  119. #- libpcap0.8-dev
  120. - tcpdump
  121. - zlib1g
  122. stage:
  123. - -lib/python3.8/site-packages/homeassistant/components/updater
  124. requirements:
  125. - requirements_all.txt
  126. constraints:
  127. - homeassistant/package_constraints.txt
  128. override-build: |
  129. snapcraftctl build
  130. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  131. updater:
  132. after: [homeassistant]
  133. plugin: dump
  134. source: ./src/components
  135. source-type: local
  136. organize:
  137. '*': lib/python3.8/site-packages/homeassistant/components/
  138. hooks:
  139. plugin: dump
  140. source: ./src/hooks
  141. source-type: local
  142. stage-packages:
  143. - uuid
  144. organize:
  145. install: snap/hooks/install
  146. configure: snap/hooks/configure
  147. post-refresh: snap/hooks/post-refresh
  148. connect-plug-bin: snap/hooks/connect-plug-bin
  149. config:
  150. plugin: dump
  151. source: ./src/config
  152. source-type: local
  153. organize:
  154. plug-bin: bin/plug-bin