snapcraft.yaml 3.1 KB

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