snapcraft.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. name: zwavejs2mqtt
  2. base: core20
  3. version: 'v4.5.2'
  4. summary: Fully configurable Zwave to MQTT Gateway and Control Panel.
  5. description: |
  6. - Configurable Zwave to Mqtt Gateway
  7. - Home Assistant integration (beta)
  8. - Zwave Control Panel:
  9. - Nodes management: check all nodes discovered in the z-wave network, send/receive nodes values updates directly from the UI and send action to the nodes and controller for diagnostics and network heal Custom Node naming and Location: Starting from v1.3.0 nodes name and location are stored in a JSON file named nodes.json. This because not all nodes have native support for naming and location features (#45). This change is back compatible with older versions of this package: on startup it will get all nodes names and location from the zwcfg_homeHEX.xml file (if present) and create the new nodes.json file based on that. This file can be imported/exported from the UI control panel with the import/export buttons placed on the top of nodes table, on the right of controller actions select.
  10. - Firmware updates: You are able to send firmware updates to your devices using the UI, just select the controller action Begin Firmware Update
  11. - Groups associations: create associations between nodes (also supports multi-instance associations, need to use last version of zwave-js)
  12. - Custom scenes management
  13. - Log debug in UI
  14. - Mesh graph showing devices neighbors
  15. grade: stable # must be 'stable' to release into candidate/stable channels
  16. confinement: strict # use 'strict' once you have the right plugs and slots
  17. assumes:
  18. - command-chain
  19. architectures:
  20. - build-on: amd64
  21. - build-on: arm64
  22. - build-on: armhf
  23. #- build-on: ppc64el
  24. apps:
  25. zwavejs2mqtt:
  26. daemon: simple
  27. restart-condition: always
  28. environment:
  29. STORE_DIR: $SNAP_DATA
  30. DAEMONIZED: 1
  31. command: usr/lib/zwavejs2mqtt/bin/www
  32. command-chain:
  33. - helper/env-wrapper
  34. plugs:
  35. - network
  36. - network-bind
  37. - raw-usb
  38. - serial-port
  39. - hardware-observe
  40. exec:
  41. environment:
  42. STORE_DIR: $SNAP_DATA
  43. command: usr/lib/zwavejs2mqtt/bin/www
  44. command-chain:
  45. - helper/env-wrapper
  46. plugs:
  47. - network
  48. - network-bind
  49. - raw-usb
  50. - serial-port
  51. - hardware-observe
  52. help:
  53. command: helper/env-wrapper --help
  54. enable:
  55. command: bin/daemonize
  56. disable:
  57. command: bin/de-daemonize
  58. restart:
  59. command: bin/restart
  60. layout:
  61. $SNAP/usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config:
  62. bind: $SNAP/usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config
  63. parts:
  64. zwavejs2mqtt:
  65. after: [nodejs]
  66. plugin: npm
  67. source: https://github.com/zwave-js/zwavejs2mqtt.git
  68. #source-branch: "fix#1274"
  69. source-tag: $SNAPCRAFT_PROJECT_VERSION
  70. npm-node-version: '15.14.0'
  71. build-packages:
  72. - gcc
  73. - build-essential
  74. stage-snaps:
  75. - jq
  76. stage-packages:
  77. - git
  78. - udev
  79. - rsync
  80. override-build: |
  81. set -ex
  82. if [ -n "${http_proxy-}" ]; then
  83. export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
  84. export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"
  85. fi
  86. npm config set unsafe-perm true
  87. npm install npm@latest detect-libc
  88. npm run build
  89. chmod +x $SNAPCRAFT_PART_BUILD/bin/www
  90. cp -rf $SNAPCRAFT_PART_BUILD $SNAPCRAFT_PART_INSTALL/usr/lib/zwavejs2mqtt
  91. stage:
  92. - -usr/lib/zwavejs2mqtt/kubernetes
  93. - -usr/lib/zwavejs2mqtt/kustomization.yaml
  94. - -usr/lib/zwavejs2mqtt/docker
  95. - -usr/lib/zwavejs2mqtt/.dockerignore
  96. - -usr/lib/zwavejs2mqtt/.markdown*
  97. organize:
  98. usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config: snap/zwave-js/config
  99. nodejs:
  100. plugin: dump
  101. source:
  102. - on amd64: https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.gz
  103. - on arm64: https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-arm64.tar.gz
  104. - on armhf: https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-armv7l.tar.gz
  105. stage-packages:
  106. - on armhf:
  107. - libatomic1
  108. organize:
  109. '*.md' : nodejs/
  110. LICENSE : nodejs/
  111. prime:
  112. - -include
  113. - -share
  114. local:
  115. plugin: dump
  116. source: src/
  117. stage-packages:
  118. - uuid
  119. organize:
  120. hooks: snap/hooks