Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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" |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 9 | LICENSE = "EPL-2.0 | EDL-1.0" |
| 10 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 12 | file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 13 | file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | " |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 15 | DEPENDS = "uthash cjson dlt-daemon" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | |
| 17 | SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ |
| 18 | file://mosquitto.init \ |
| 19 | file://1571.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | " |
| 21 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 22 | SRC_URI[md5sum] = "638d801e6aac611b41de76d030951612" |
| 23 | SRC_URI[sha256sum] = "7b36a7198bce85cf31b132f5c6ee36dcf5dadf86fb768501eb1e11ce95d4f78a" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | |
| 25 | inherit systemd update-rc.d useradd cmake |
| 26 | |
| 27 | PACKAGECONFIG ??= "ssl dlt websockets \ |
| 28 | ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ |
| 29 | " |
| 30 | |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 31 | PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares" |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 33 | PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 34 | PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" |
| 35 | PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets" |
| 36 | PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon" |
| 37 | |
| 38 | EXTRA_OECMAKE = " \ |
| 39 | -DWITH_BUNDLED_DEPS=OFF \ |
| 40 | -DWITH_ADNS=ON \ |
| 41 | " |
| 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 43 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
| 56 | PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" |
| 57 | |
| 58 | PACKAGE_BEFORE_PN = "${PN}-examples" |
| 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 60 | FILES:${PN} = "${sbindir}/mosquitto \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 61 | ${bindir}/mosquitto_passwd \ |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 62 | ${bindir}/mosquitto_ctrl \ |
| 63 | ${libdir}/mosquitto_dynamic_security.so \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | ${sysconfdir}/mosquitto \ |
| 65 | ${sysconfdir}/init.d \ |
| 66 | ${systemd_unitdir}/system/mosquitto.service \ |
| 67 | " |
| 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 69 | CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 71 | FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 72 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 73 | FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 75 | FILES:${PN}-clients = "${bindir}/mosquitto_pub \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | ${bindir}/mosquitto_sub \ |
| 77 | ${bindir}/mosquitto_rr \ |
| 78 | " |
| 79 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 80 | FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 81 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 82 | SYSTEMD_SERVICE:${PN} = "mosquitto.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 83 | |
| 84 | INITSCRIPT_NAME = "mosquitto" |
| 85 | INITSCRIPT_PARAMS = "defaults 30" |
| 86 | |
| 87 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 88 | USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | --user-group mosquitto" |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 90 | |
| 91 | BBCLASSEXTEND += "native nativesdk" |