snapcraft.yaml 3.1 KB

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