snapcraft.yaml 3.4 KB

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