snapcraft.yaml 3.5 KB

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