snapcraft.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. name: home-assistant-snap
  2. version: '2021.6.0b1'
  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. # GPIO devices etc.. (e.g RaZberry HAT)
  60. - physical-memory-control
  61. - removable-media
  62. slots:
  63. - components
  64. check-config:
  65. plugs:
  66. - network
  67. - network-bind
  68. - network-control
  69. environment:
  70. PIP_USER: 1
  71. command: bin/hass --script check_config --config $SNAP_DATA -i
  72. parts:
  73. homeassistant:
  74. plugin: python #-wot-plugin
  75. source: https://github.com/home-assistant/core.git
  76. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  77. python-packages:
  78. - setuptools
  79. - wheel
  80. - Cython
  81. - pip
  82. # build-environment:
  83. # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
  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. - libssl-dev
  108. - libswscale-dev
  109. - libudev-dev
  110. - libxml2-dev
  111. - libxslt1-dev
  112. - zlib1g-dev
  113. stage-packages:
  114. # - python3-pcapy
  115. # - libpcap0.8
  116. #
  117. - iptables
  118. - freeglut3
  119. - ffmpeg
  120. - libglu1-mesa
  121. - zlib1g
  122. requirements:
  123. - requirements_all.txt
  124. constraints:
  125. - homeassistant/package_constraints.txt
  126. override-build: |
  127. snapcraftctl build
  128. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  129. hooks:
  130. plugin: dump
  131. source: ./scripts/hooks
  132. source-type: local
  133. stage-packages:
  134. - uuid
  135. organize:
  136. install: snap/hooks/install
  137. configure: snap/hooks/configure
  138. post-refresh: snap/hooks/post-refresh
  139. connect-plug-bin: snap/hooks/connect-plug-bin
  140. config:
  141. plugin: dump
  142. source: ./scripts/config
  143. source-type: local
  144. organize:
  145. plug-bin: bin/plug-bin