blob: 9f6080336af655cf2b641395ff53b1ee53431764 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Open source MQTT implementation"
2DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \
3that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \
45, providing both an MQTT broker and several command-line clients. MQTT \
5provides a lightweight method of carrying out messaging using a \
6publish/subscribe model. "
7HOMEPAGE = "http://mosquitto.org/"
8SECTION = "console/network"
9LICENSE = "EPL-1.0 | EDL-1.0"
10LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \
11 file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \
12 file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
13 file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
14"
15DEPENDS = "uthash"
16
17SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
18 file://mosquitto.init \
19 file://1571.patch \
20 file://install-protocol.patch \
21"
22
Andrew Geisslereafcbb82020-06-05 17:59:17 -050023SRC_URI[md5sum] = "960f963b81b7f93982d7511cd28082e5"
24SRC_URI[sha256sum] = "92d1807717f0f6d57d1ac1207ffdb952e8377e916c7b0bb4718f745239774232"
Andrew Geissler82c905d2020-04-13 13:39:40 -050025
26inherit systemd update-rc.d useradd cmake
27
28PACKAGECONFIG ??= "ssl dlt websockets \
29 ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \
30 "
31
32PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares"
Andrew Geissler89770b02020-06-13 10:40:47 -050033PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl"
Andrew Geissler82c905d2020-04-13 13:39:40 -050034PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd"
35PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets"
36PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon"
37
38EXTRA_OECMAKE = " \
39 -DWITH_BUNDLED_DEPS=OFF \
40 -DWITH_ADNS=ON \
41"
42
43do_install_append() {
44 install -d ${D}${systemd_unitdir}/system/
45 install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service
46
47 install -d ${D}${sysconfdir}/init.d/
48 install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto
49 sed -i -e 's,@SBINDIR@,${sbindir},g' \
50 -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
51 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
52 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
53 ${D}${sysconfdir}/init.d/mosquitto
54}
55
56PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients"
57
58PACKAGE_BEFORE_PN = "${PN}-examples"
59
60FILES_${PN} = "${sbindir}/mosquitto \
61 ${bindir}/mosquitto_passwd \
62 ${sysconfdir}/mosquitto \
63 ${sysconfdir}/init.d \
64 ${systemd_unitdir}/system/mosquitto.service \
65"
66
67CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf"
68
69FILES_libmosquitto1 = "${libdir}/libmosquitto.so.*"
70
71FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.*"
72
73FILES_${PN}-clients = "${bindir}/mosquitto_pub \
74 ${bindir}/mosquitto_sub \
75 ${bindir}/mosquitto_rr \
76"
77
78FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example"
79
80SYSTEMD_SERVICE_${PN} = "mosquitto.service"
81
82INITSCRIPT_NAME = "mosquitto"
83INITSCRIPT_PARAMS = "defaults 30"
84
85USERADD_PACKAGES = "${PN}"
86USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \
87 --user-group mosquitto"
Andrew Geissler89770b02020-06-13 10:40:47 -050088
89BBCLASSEXTEND += "native nativesdk"