1
0

snapcraft.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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-environment:
  85. # - on ppc64el:
  86. # - CHPL_TARGET_ARCH: none
  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. - libswresample-dev
  111. - libssl-dev
  112. - libswscale-dev
  113. - libudev-dev
  114. - libxml2-dev
  115. - libxslt1-dev
  116. - zlib1g-dev
  117. stage-packages:
  118. # - python3-pcapy
  119. # - libpcap0.8
  120. - iptables
  121. - freeglut3
  122. - ffmpeg
  123. - libglu1-mesa
  124. #- libpulse0
  125. - zlib1g
  126. requirements:
  127. - requirements_all.txt
  128. constraints:
  129. - homeassistant/package_constraints.txt
  130. override-build: |
  131. python3 -m platform "print(platform.machine())"
  132. snapcraftctl build
  133. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  134. hooks:
  135. plugin: dump
  136. source: ./scripts/hooks
  137. source-type: local
  138. stage-packages:
  139. - uuid
  140. organize:
  141. install: snap/hooks/install
  142. configure: snap/hooks/configure
  143. post-refresh: snap/hooks/post-refresh
  144. connect-plug-bin: snap/hooks/connect-plug-bin
  145. config:
  146. plugin: dump
  147. source: ./scripts/config
  148. source-type: local
  149. organize:
  150. plug-bin: bin/plug-bin