diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.8.bb')
-rw-r--r-- | meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.8.bb | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.8.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.8.bb new file mode 100644 index 0000000000..ea533d8a02 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.8.bb | |||
@@ -0,0 +1,98 @@ | |||
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-1.0 | EDL-1.0" | ||
10 | LIC_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 | " | ||
15 | DEPENDS = "uthash" | ||
16 | |||
17 | SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ | ||
18 | file://mosquitto.init \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "24a0e567c845b3e41b75e237d200edf8" | ||
22 | SRC_URI[sha256sum] = "7df23c81ca37f0e070574fe74414403cf25183016433d07add6134366fb45df6" | ||
23 | |||
24 | inherit systemd update-rc.d useradd | ||
25 | |||
26 | PACKAGECONFIG ??= "ssl uuid \ | ||
27 | ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ | ||
28 | " | ||
29 | |||
30 | PACKAGECONFIG[dns-srv] = "WITH_SRV=yes,WITH_SRV=no,c-ares" | ||
31 | PACKAGECONFIG[ssl] = "WITH_TLS=yes WITH_TLS_PSK=yes,WITH_TLS=no WITH_TLS_PSK=no,openssl" | ||
32 | PACKAGECONFIG[uuid] = "WITH_UUID=yes,WITH_UUID=no,util-linux" | ||
33 | PACKAGECONFIG[systemd] = "WITH_SYSTEMD=yes,WITH_SYSTEMD=no,systemd" | ||
34 | PACKAGECONFIG[websockets] = "WITH_WEBSOCKETS=yes,WITH_WEBSOCKETS=no,libwebsockets" | ||
35 | |||
36 | EXTRA_OEMAKE = " \ | ||
37 | prefix=${prefix} \ | ||
38 | mandir=${mandir} \ | ||
39 | localedir=${localedir} \ | ||
40 | ${PACKAGECONFIG_CONFARGS} \ | ||
41 | STRIP=/bin/true \ | ||
42 | WITH_DOCS=no \ | ||
43 | WITH_BUNDLED_DEPS=no \ | ||
44 | " | ||
45 | |||
46 | export LIB_SUFFIX = "${@d.getVar('baselib').replace('lib', '')}" | ||
47 | |||
48 | do_install() { | ||
49 | oe_runmake 'DESTDIR=${D}' install | ||
50 | |||
51 | install -d ${D}${systemd_unitdir}/system/ | ||
52 | install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service | ||
53 | |||
54 | install -d ${D}${sysconfdir}/mosquitto | ||
55 | install -m 0644 ${D}${sysconfdir}/mosquitto/mosquitto.conf.example \ | ||
56 | ${D}${sysconfdir}/mosquitto/mosquitto.conf | ||
57 | |||
58 | install -d ${D}${sysconfdir}/init.d/ | ||
59 | install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto | ||
60 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
61 | -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ | ||
62 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ | ||
63 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
64 | ${D}${sysconfdir}/init.d/mosquitto | ||
65 | } | ||
66 | |||
67 | PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" | ||
68 | |||
69 | PACKAGE_BEFORE_PN = "${PN}-examples" | ||
70 | |||
71 | FILES_${PN} = "${sbindir}/mosquitto \ | ||
72 | ${bindir}/mosquitto_passwd \ | ||
73 | ${sysconfdir}/mosquitto \ | ||
74 | ${sysconfdir}/init.d \ | ||
75 | ${systemd_unitdir}/system/mosquitto.service \ | ||
76 | " | ||
77 | |||
78 | CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" | ||
79 | |||
80 | FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" | ||
81 | |||
82 | FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" | ||
83 | |||
84 | FILES_${PN}-clients = "${bindir}/mosquitto_pub \ | ||
85 | ${bindir}/mosquitto_sub \ | ||
86 | ${bindir}/mosquitto_rr \ | ||
87 | " | ||
88 | |||
89 | FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example" | ||
90 | |||
91 | SYSTEMD_SERVICE_${PN} = "mosquitto.service" | ||
92 | |||
93 | INITSCRIPT_NAME = "mosquitto" | ||
94 | INITSCRIPT_PARAMS = "defaults 30" | ||
95 | |||
96 | USERADD_PACKAGES = "${PN}" | ||
97 | USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \ | ||
98 | --user-group mosquitto" | ||