diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb')
-rw-r--r-- | meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb new file mode 100644 index 000000000..0c9ccc810 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb | |||
@@ -0,0 +1,92 @@ | |||
1 | SUMMARY = "Open source MQTT implementation" | ||
2 | DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \ | ||
3 | that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \ | ||
4 | 5, providing both an MQTT broker and several command-line clients. MQTT \ | ||
5 | provides a lightweight method of carrying out messaging using a \ | ||
6 | publish/subscribe model. " | ||
7 | HOMEPAGE = "http://mosquitto.org/" | ||
8 | SECTION = "console/network" | ||
9 | LICENSE = "EPL-2.0 | EDL-1.0" | ||
10 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \ | ||
11 | file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \ | ||
12 | file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \ | ||
13 | file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ | ||
14 | " | ||
15 | DEPENDS = "uthash cjson" | ||
16 | |||
17 | SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ | ||
18 | file://mosquitto.init \ | ||
19 | file://1571.patch \ | ||
20 | file://2894.patch \ | ||
21 | file://2895.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[sha256sum] = "d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a" | ||
25 | |||
26 | inherit systemd update-rc.d useradd cmake pkgconfig | ||
27 | |||
28 | PACKAGECONFIG ??= "ssl websockets \ | ||
29 | ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ | ||
30 | " | ||
31 | |||
32 | PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native" | ||
33 | PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares" | ||
34 | PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl" | ||
35 | PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" | ||
36 | PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets" | ||
37 | PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon" | ||
38 | |||
39 | EXTRA_OECMAKE = " \ | ||
40 | -DWITH_BUNDLED_DEPS=OFF \ | ||
41 | -DWITH_ADNS=ON \ | ||
42 | " | ||
43 | |||
44 | do_install:append() { | ||
45 | install -d ${D}${systemd_unitdir}/system/ | ||
46 | install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service | ||
47 | |||
48 | install -d ${D}${sysconfdir}/init.d/ | ||
49 | install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto | ||
50 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
51 | -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ | ||
52 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ | ||
53 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
54 | ${D}${sysconfdir}/init.d/mosquitto | ||
55 | } | ||
56 | |||
57 | PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" | ||
58 | |||
59 | PACKAGE_BEFORE_PN = "${PN}-examples" | ||
60 | |||
61 | FILES:${PN} = "${sbindir}/mosquitto \ | ||
62 | ${bindir}/mosquitto_passwd \ | ||
63 | ${bindir}/mosquitto_ctrl \ | ||
64 | ${libdir}/mosquitto_dynamic_security.so \ | ||
65 | ${sysconfdir}/mosquitto \ | ||
66 | ${sysconfdir}/init.d \ | ||
67 | ${systemd_unitdir}/system/mosquitto.service \ | ||
68 | " | ||
69 | |||
70 | CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" | ||
71 | |||
72 | FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" | ||
73 | |||
74 | FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" | ||
75 | |||
76 | FILES:${PN}-clients = "${bindir}/mosquitto_pub \ | ||
77 | ${bindir}/mosquitto_sub \ | ||
78 | ${bindir}/mosquitto_rr \ | ||
79 | " | ||
80 | |||
81 | FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" | ||
82 | |||
83 | SYSTEMD_SERVICE:${PN} = "mosquitto.service" | ||
84 | |||
85 | INITSCRIPT_NAME = "mosquitto" | ||
86 | INITSCRIPT_PARAMS = "defaults 30" | ||
87 | |||
88 | USERADD_PACKAGES = "${PN}" | ||
89 | USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ | ||
90 | --user-group mosquitto" | ||
91 | |||
92 | BBCLASSEXTEND += "native nativesdk" | ||