snapcraft.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. check-config:
  64. plugs:
  65. - network
  66. environment:
  67. PIP_USER: 1
  68. command: bin/hass --script check_config --config $SNAP_DATA -i
  69. parts:
  70. homeassistant:
  71. plugin: python-wot-plugin
  72. source: https://github.com/home-assistant/core.git
  73. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  74. python-packages:
  75. - setuptools
  76. - wheel
  77. - Cython
  78. - pip
  79. build-packages:
  80. - python3
  81. - python3-dev
  82. - python3-setuptools
  83. - python3-wheel
  84. - pkg-config
  85. - autoconf
  86. - build-essential
  87. - cmake
  88. - cython3
  89. - ffmpeg
  90. - libavcodec-dev
  91. - libavdevice-dev
  92. - libavfilter-dev
  93. - libavformat-dev
  94. - libavresample-dev
  95. - libavutil-dev
  96. - libffi-dev
  97. - libglib2.0-dev
  98. - libglu1-mesa-dev
  99. - libgpiod-dev
  100. - libjpeg-dev
  101. - libopenzwave1.5-dev
  102. - libswresample-dev
  103. - libssl-dev
  104. - libswscale-dev
  105. - libudev-dev
  106. - libxml2-dev
  107. - libxslt1-dev
  108. - zlib1g-dev
  109. stage-packages:
  110. - freeglut3
  111. - ffmpeg
  112. - libglu1-mesa
  113. - tcpdump
  114. - libpcap0.8
  115. - zlib1g
  116. stage:
  117. - -lib/python3.8/site-packages/homeassistant/components/updater
  118. requirements:
  119. - requirements_all.txt
  120. constraints:
  121. - homeassistant/package_constraints.txt
  122. override-build: |
  123. snapcraftctl build
  124. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  125. updater:
  126. after: [homeassistant]
  127. plugin: dump
  128. source: ./src/components
  129. source-type: local
  130. organize:
  131. '*': lib/python3.8/site-packages/homeassistant/components/
  132. hooks:
  133. plugin: dump
  134. source: ./src/hooks
  135. source-type: local
  136. stage-packages:
  137. - uuid
  138. organize:
  139. install: snap/hooks/install
  140. configure: snap/hooks/configure
  141. post-refresh: snap/hooks/post-refresh
  142. connect-plug-bin: snap/hooks/connect-plug-bin
  143. config:
  144. plugin: dump
  145. source: ./src/config
  146. source-type: local
  147. organize:
  148. plug-bin: bin/plug-bin