snapcraft.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. name: home-assistant-snap
  2. version: '2021.5.1'
  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. - raw-usb
  55. - serial-port
  56. # GPIO devices etc.. (e.g RaZberry HAT)
  57. - physical-memory-control
  58. - removable-media
  59. slots:
  60. - components
  61. check-config:
  62. command: bin/hass --script check_config --config $SNAP_DATA -i
  63. parts:
  64. homeassistant:
  65. plugin: python #-wot-plugin
  66. source: https://github.com/home-assistant/core.git
  67. source-tag: ${SNAPCRAFT_PROJECT_VERSION}
  68. python-packages:
  69. - setuptools
  70. - wheel
  71. - Cython
  72. - pip
  73. # build-environment:
  74. # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
  75. build-packages:
  76. - python3
  77. - python3-dev
  78. - python3-setuptools
  79. - python3-wheel
  80. - pkg-config
  81. - autoconf
  82. - build-essential
  83. - cmake
  84. - cython3
  85. - ffmpeg
  86. - libavcodec-dev
  87. - libavdevice-dev
  88. - libavfilter-dev
  89. - libavformat-dev
  90. - libavresample-dev
  91. - libavutil-dev
  92. - libffi-dev
  93. - libglib2.0-dev
  94. - libglu1-mesa-dev
  95. - libgpiod-dev
  96. - libjpeg-dev
  97. - libopenzwave1.5-dev
  98. - libssl-dev
  99. - libswscale-dev
  100. - libudev-dev
  101. - libxml2-dev
  102. - libxslt1-dev
  103. - zlib1g-dev
  104. stage-packages:
  105. - freeglut3
  106. - ffmpeg
  107. - libglu1-mesa
  108. - zlib1g
  109. requirements:
  110. - requirements_all.txt
  111. constraints:
  112. - homeassistant/package_constraints.txt
  113. override-build: |
  114. snapcraftctl build
  115. sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
  116. hooks:
  117. plugin: dump
  118. source: ./scripts/hooks
  119. source-type: local
  120. stage-packages:
  121. - uuid
  122. organize:
  123. install: snap/hooks/install
  124. configure: snap/hooks/configure
  125. post-refresh: snap/hooks/post-refresh
  126. connect-plug-bin: snap/hooks/connect-plug-bin
  127. config:
  128. plugin: dump
  129. source: ./scripts/config
  130. source-type: local
  131. organize:
  132. plug-bin: bin/plug-bin