snapcraft.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. name: home-assistant-snap
  2. version: '2021.5.5'
  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. plugs:
  27. bin:
  28. interface: content
  29. content: executables
  30. target: $SNAP/shared-bin
  31. slots:
  32. components:
  33. interface: content
  34. content: components
  35. write:
  36. - $SNAP_DATA/custom_components
  37. configurations:
  38. interface: content
  39. write:
  40. - $SNAP_DATA
  41. apps:
  42. home-assistant-snap:
  43. command: bin/hass --config $SNAP_DATA
  44. command-chain:
  45. - bin/plug-bin
  46. daemon: simple
  47. environment:
  48. PIP_USER: 1
  49. restart-condition: always
  50. plugs:
  51. - bluez
  52. - network
  53. - network-bind
  54. - network-observe
  55. - raw-usb
  56. - serial-port
  57. # GPIO devices etc.. (e.g RaZberry HAT)
  58. - physical-memory-control
  59. - removable-media
  60. slots:
  61. - components
  62. check-config:
  63. command: bin/hass --script check_config --config $SNAP_DATA -i
  64. parts:
  65. homeassistant:
  66. plugin: python #-wot-plugin
  67. source: https://github.com/home-assistant/core.git
  68. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  69. python-packages:
  70. - setuptools
  71. - wheel
  72. - Cython
  73. - pip
  74. # build-environment:
  75. # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
  76. build-packages:
  77. - python3
  78. - python3-dev
  79. - python3-setuptools
  80. - python3-wheel
  81. - pkg-config
  82. - autoconf
  83. - build-essential
  84. - cmake
  85. - cython3
  86. - ffmpeg
  87. - libavcodec-dev
  88. - libavdevice-dev
  89. - libavfilter-dev
  90. - libavformat-dev
  91. - libavresample-dev
  92. - libavutil-dev
  93. - libffi-dev
  94. - libglib2.0-dev
  95. - libglu1-mesa-dev
  96. - libgpiod-dev
  97. - libjpeg-dev
  98. - libopenzwave1.5-dev
  99. - libssl-dev
  100. - libswscale-dev
  101. - libudev-dev
  102. - libxml2-dev
  103. - libxslt1-dev
  104. - zlib1g-dev
  105. stage-packages:
  106. - freeglut3
  107. - ffmpeg
  108. - libglu1-mesa
  109. - zlib1g
  110. requirements:
  111. - requirements_all.txt
  112. constraints:
  113. - homeassistant/package_constraints.txt
  114. override-build: |
  115. snapcraftctl build
  116. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  117. hooks:
  118. plugin: dump
  119. source: ./scripts/hooks
  120. source-type: local
  121. stage-packages:
  122. - uuid
  123. organize:
  124. install: snap/hooks/install
  125. configure: snap/hooks/configure
  126. post-refresh: snap/hooks/post-refresh
  127. connect-plug-bin: snap/hooks/connect-plug-bin
  128. config:
  129. plugin: dump
  130. source: ./scripts/config
  131. source-type: local
  132. organize:
  133. plug-bin: bin/plug-bin