1
0

snapcraft.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. name: home-assistant-snap
  2. version: '2021.6.0'
  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. # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
  86. build-packages:
  87. - python3
  88. - python3-dev
  89. - python3-setuptools
  90. - python3-wheel
  91. - pkg-config
  92. - autoconf
  93. - build-essential
  94. - cmake
  95. - cython3
  96. - ffmpeg
  97. - libavcodec-dev
  98. - libavdevice-dev
  99. - libavfilter-dev
  100. - libavformat-dev
  101. - libavresample-dev
  102. - libavutil-dev
  103. - libffi-dev
  104. - libglib2.0-dev
  105. - libglu1-mesa-dev
  106. - libgpiod-dev
  107. - libjpeg-dev
  108. - libopenzwave1.5-dev
  109. - libssl-dev
  110. - libswscale-dev
  111. - libudev-dev
  112. - libxml2-dev
  113. - libxslt1-dev
  114. - zlib1g-dev
  115. stage-packages:
  116. # - python3-pcapy
  117. # - libpcap0.8
  118. - iptables
  119. - freeglut3
  120. - ffmpeg
  121. - libglu1-mesa
  122. - zlib1g
  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. hooks:
  131. plugin: dump
  132. source: ./scripts/hooks
  133. source-type: local
  134. stage-packages:
  135. - uuid
  136. organize:
  137. install: snap/hooks/install
  138. configure: snap/hooks/configure
  139. post-refresh: snap/hooks/post-refresh
  140. connect-plug-bin: snap/hooks/connect-plug-bin
  141. config:
  142. plugin: dump
  143. source: ./scripts/config
  144. source-type: local
  145. organize:
  146. plug-bin: bin/plug-bin