snapcraft.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. name: mosquitto
  2. version: 2.0.13
  3. summary: Eclipse Mosquitto MQTT broker
  4. description: This is a message broker that supports version 5.0, 3.1.1, and 3.1 of the MQTT
  5. protocol.
  6. MQTT provides a method of carrying out messaging using a publish/subscribe
  7. model. It is lightweight, both in terms of bandwidth usage and ease of
  8. implementation. This makes it particularly useful at the edge of the network
  9. where a sensor or other simple device may be implemented using an arduino for
  10. example.
  11. confinement: strict
  12. grade: stable
  13. base: core18
  14. apps:
  15. mosquitto:
  16. command: launcher.sh
  17. daemon: simple
  18. restart-condition: always
  19. plugs: [home, network, network-bind]
  20. ctrl:
  21. command: usr/bin/mosquitto_ctrl
  22. plugs: [home, network]
  23. pub:
  24. command: usr/bin/mosquitto_pub
  25. plugs: [home, network]
  26. rr:
  27. command: usr/bin/mosquitto_rr
  28. plugs: [home, network]
  29. sub:
  30. command: usr/bin/mosquitto_sub
  31. plugs: [home, network]
  32. passwd:
  33. command: usr/bin/mosquitto_passwd
  34. plugs: [home]
  35. parts:
  36. script:
  37. plugin: dump
  38. source: snap/local/
  39. prime:
  40. - default_config.conf
  41. - launcher.sh
  42. config:
  43. plugin: dump
  44. source: .
  45. prime:
  46. - mosquitto.conf
  47. mosquitto:
  48. after:
  49. - lws
  50. plugin: make
  51. make-parameters: ["prefix=/usr", "WITH_WEBSOCKETS=yes", "WITH_ADNS=yes", "CFLAGS=-Wall -ggdb -O2 -I$SNAPCRAFT_STAGE/include -D_GNU_SOURCE"]
  52. source: https://github.com/eclipse/mosquitto
  53. source-type: git
  54. build-packages:
  55. - libssl-dev
  56. - xsltproc
  57. - docbook-xsl
  58. - gcc
  59. - g++
  60. stage-packages:
  61. - libssl1.0.0
  62. - ca-certificates
  63. prime:
  64. - usr/sbin/mosquitto
  65. - usr/bin/mosquitto_ctrl
  66. - usr/bin/mosquitto_pub
  67. - usr/bin/mosquitto_rr
  68. - usr/bin/mosquitto_sub
  69. - usr/bin/mosquitto_passwd
  70. - usr/lib/libmosquitto.so*
  71. - usr/lib/mosquitto_dynamic_security.so*
  72. - lib/*-linux-gnu/libcrypto.so*
  73. - lib/*-linux-gnu/libssl.so*
  74. - usr/include/mosquitto.h
  75. - usr/include/mosquitto_broker.h
  76. - usr/include/mosquitto_plugin.h
  77. - usr/include/mqtt_protocol.h
  78. lws:
  79. after:
  80. - cjson
  81. plugin: cmake
  82. configflags: ["-DLWS_IPV6=ON", "-DLWS_WITHOUT_CLIENT=ON", "-DLWS_WITHOUT_EXTENSIONS=ON", "-DLWS_WITH_ZIP_FOPS=OFF", "-DLWS_WITH_ZLIB=OFF", "-DLWS_WITH_SHARED=OFF"]
  83. source: https://github.com/warmcat/libwebsockets/archive/v2.4.2.tar.gz
  84. source-type: tar
  85. stage:
  86. - include/libwebsockets.h
  87. - include/lws_config.h
  88. - lib/libwebsockets.a
  89. prime: [-*]
  90. cjson:
  91. plugin: cmake
  92. configflags: ["-DCMAKE_C_FLAGS=-fPIC", "-DBUILD_SHARED_AND_STATIC_LIBS=OFF", "-DBUILD_SHARED_LIBS=OFF", "-DCJSON_BUILD_SHARED_LIBS=OFF", "-DCJSON_OVERRIDE_BUILD_SHARED_LIBS=OFF"]
  93. source: https://github.com/DaveGamble/cJSON/archive/v1.7.14.tar.gz
  94. source-type: tar
  95. stage:
  96. - include/cjson/cJSON.h
  97. - lib/libcjson.a
  98. prime: [-*]