snapcraft.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. apps:
  44. home-assistant-snap:
  45. command: bin/hass --config $SNAP_DATA
  46. command-chain:
  47. - bin/plug-bin
  48. daemon: simple
  49. environment:
  50. PIP_USER: 1
  51. restart-condition: always
  52. plugs:
  53. - bluez
  54. - network
  55. - network-bind
  56. - network-control
  57. - raw-usb
  58. - serial-port
  59. - physical-memory-control
  60. - removable-media
  61. slots:
  62. - components
  63. open-localhost:
  64. command: bin/open-localhost
  65. plugs:
  66. - desktop
  67. check-config:
  68. plugs:
  69. - network
  70. environment:
  71. PIP_USER: 1
  72. command: bin/hass --script check_config --config $SNAP_DATA -i
  73. parts:
  74. homeassistant:
  75. plugin: python-wot-plugin
  76. source: https://github.com/home-assistant/core.git
  77. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  78. python-packages:
  79. - setuptools
  80. - wheel
  81. - Cython
  82. - pip
  83. build-packages:
  84. - python3
  85. - python3-dev
  86. - python3-setuptools
  87. - python3-wheel
  88. - pkg-config
  89. - autoconf
  90. - build-essential
  91. - cmake
  92. - cython3
  93. - ffmpeg
  94. - libavcodec-dev
  95. - libavdevice-dev
  96. - libavfilter-dev
  97. - libavformat-dev
  98. - libavresample-dev
  99. - libavutil-dev
  100. - libffi-dev
  101. - libglib2.0-dev
  102. - libglu1-mesa-dev
  103. - libgpiod-dev
  104. - libjpeg-dev
  105. - libopenzwave1.5-dev
  106. - libpcap0.8-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. - libglu1-mesa
  118. - tcpdump
  119. - libpcap0.8
  120. - zlib1g
  121. stage:
  122. - -lib/python3.8/site-packages/homeassistant/components/updater
  123. requirements:
  124. - requirements_all.txt
  125. constraints:
  126. - homeassistant/package_constraints.txt
  127. override-build: |
  128. snapcraftctl build
  129. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  130. updater:
  131. after: [homeassistant]
  132. plugin: dump
  133. source: ./src/components
  134. source-type: local
  135. organize:
  136. '*': lib/python3.8/site-packages/homeassistant/components/
  137. bins:
  138. plugin: dump
  139. source: ./src/bin
  140. source-type: local
  141. organize:
  142. open-localhost: bin/open-localhost
  143. hooks:
  144. plugin: dump
  145. source: ./src/hooks
  146. source-type: local
  147. stage-packages:
  148. - uuid
  149. organize:
  150. install: snap/hooks/install
  151. configure: snap/hooks/configure
  152. post-refresh: snap/hooks/post-refresh
  153. connect-plug-bin: snap/hooks/connect-plug-bin
  154. config:
  155. plugin: dump
  156. source: ./src/config
  157. source-type: local
  158. organize:
  159. plug-bin: bin/plug-bin