2 # Copyright (C) 2011-2013 OpenWrt.org
3 # Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_LICENSE
:=BSD-3-Clause
15 PKG_LICENSE_FILES
:=LICENSE.txt
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://mosquitto.org
/files
/source
/
19 PKG_MD5SUM
:=4cb978502312bff2dcdaab6a433b1bf2
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/$(PKG_NAME
)/default
27 TITLE
:=mosquitto
- an MQTT message broker
28 URL
:=http
://www.mosquitto.org
/
29 MAINTAINER
:=Karl Palsson
<karlp@remake.is
>
30 DEPENDS
:= +librt
+libuuid
31 USERID
:=mosquitto
=200:mosquitto
=200
34 define Package
/$(PKG_NAME
)
35 $(call Package
/mosquitto
/default
)
36 TITLE
+= (with SSL support
)
37 DEPENDS
+= +libopenssl
+MOSQUITTO_LWS
:libwebsockets-openssl
41 define Package
/$(PKG_NAME
)-nossl
42 $(call Package
/$(PKG_NAME
)/default
)
43 TITLE
+= (without SSL support
)
47 define Package
/$(PKG_NAME
)/config
48 source
"$(SOURCE)/Config.in"
51 define Package
/$(PKG_NAME
)/default
/description
52 Mosquitto is an open source
(BSD licensed
) message broker that implements
53 the MQTT protocol version
3.1 and
3.1.1. MQTT provides a lightweight
54 method of carrying out messaging using a publish
/subscribe model.
56 This package also includes some basic support for configuring via UCI
59 define Package
/$(PKG_NAME
)/description
60 $(call Package
/$(PKG_NAME
)/default
/description
)
61 This package is built with SSL support
64 define Package
/$(PKG_NAME
)-nossl
/description
65 $(call Package
/$(PKG_NAME
)/default
/description
)
66 This package is built WITHOUT SSL support.
70 define Package
/mosquitto-client
/default
71 $(Package
/mosquitto
/default
)
72 TITLE
:= mosquitto
- client tools
75 define Package
/mosquitto-client
76 $(call Package
/mosquitto-client
/default
)
77 TITLE
+= (With SSL support
)
78 DEPENDS
+=+libmosquitto
81 define Package
/mosquitto-client-nossl
82 $(call Package
/mosquitto-client
/default
)
83 TITLE
+= (Without SSL support
)
84 DEPENDS
+=+libmosquitto-nossl
88 define Package
/mosquitto-client
/default
/description
89 Command line client tools for publishing messages to MQTT servers
90 and subscribing to topics.
93 define Package
/mosquitto-client
/description
94 $(call Package
/mosquitto-client
/default
/description
)
95 This package is built with SSL support
97 define Package
/mosquitto-client-nossl
/description
98 $(call Package
/mosquitto-client
/default
/description
)
99 This package is built without SSL support
102 define Package
/libmosquitto
/default
103 $(Package
/mosquitto
/default
)
106 DEPENDS
:=+libpthread
+librt
+libcares
107 TITLE
:= mosquitto
- client library
110 define Package
/libmosquitto
111 $(call Package
/libmosquitto
/default
)
112 TITLE
+= (With SSL Support
)
113 DEPENDS
+= +libopenssl
116 define Package
/libmosquitto-nossl
117 $(call Package
/libmosquitto
/default
)
118 TITLE
+= (Without SSL Support
)
122 define Package
/libmosquitto
/default
/description
123 Library required for mosquitto
's command line client tools, also for
124 use by any third party software that wants to communicate with a
127 Should be useable for communicating with any MQTT v3.1/3.1.1 compatible
128 server, such as IBM's RSMB
, in addition to Mosquitto
131 define Package
/libmosquitto
/description
132 $(call Package
/libmosquitto
/default
/description
)
133 This package is built with SSL support
135 define Package
/libmosquitto-nossl
/description
136 $(call Package
/libmosquitto
/default
/description
)
137 This package is built without SSL support
140 define Package
/libmosquittopp
143 DEPENDS
:=+libmosquitto
+libstdcpp
144 TITLE
:= mosquitto
- client c
++ library
147 define Package
/libmosquittopp
/description
148 C
++ Library wrapper for libmosquitto.
151 define Package
/$(PKG_NAME
)/conffiles
152 /etc
/mosquitto
/mosquitto.conf
153 /etc
/config
/mosquitto
156 Package
/$(PKG_NAME
)-nossl
/conffiles
= $(Package
/$(PKG_NAME
)/conffiles
)
158 define Package
/mosquitto
/install/default
159 $(INSTALL_DIR
) $(1)/usr
/sbin
160 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mosquitto
$(1)/usr
/sbin
/mosquitto
161 $(INSTALL_DIR
) $(1)/etc
/mosquitto
162 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/mosquitto.conf
$(1)/etc
/mosquitto
/mosquitto.conf
163 $(CP
) .
/files
/* $(1)/
166 define Package
/mosquitto-nossl
/install
167 $(call Package
/mosquitto
/install/default
,$(1))
170 define Package
/mosquitto
/install
171 $(call Package
/mosquitto
/install/default
,$(1))
172 ifeq ($(CONFIG_MOSQUITTO_PASSWD
),y
)
173 $(INSTALL_DIR
) $(1)/usr
/bin
174 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mosquitto_passwd
$(1)/usr
/bin
178 define Package
/mosquitto-client
/install
179 $(INSTALL_DIR
) $(1)/usr
/bin
180 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/client
/mosquitto_pub
$(1)/usr
/bin
/mosquitto_pub
181 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/client
/mosquitto_sub
$(1)/usr
/bin
/mosquitto_sub
183 Package
/mosquitto-client-nossl
/install = $(Package
/mosquitto-client
/install)
185 # This installs files into ./staging_dir/. so that you can cross compile from the host
186 define Build
/InstallDev
187 $(INSTALL_DIR
) $(1)/usr
/include
188 $(CP
) $(PKG_BUILD_DIR
)/lib
/mosquitto.h
$(1)/usr
/include
189 $(CP
) $(PKG_BUILD_DIR
)/lib
/cpp/mosquittopp.h
$(1)/usr
/include
190 $(INSTALL_DIR
) $(1)/usr
/lib
191 $(CP
) $(PKG_BUILD_DIR
)/lib
/libmosquitto.so
.1 $(1)/usr
/lib
/
192 $(CP
) $(PKG_BUILD_DIR
)/lib
/cpp/libmosquittopp.so
.1 $(1)/usr
/lib
/
193 $(LN
) libmosquitto.so
.1 $(1)/usr
/lib
/libmosquitto.so
194 $(LN
) libmosquittopp.so
.1 $(1)/usr
/lib
/libmosquittopp.so
197 # This installs files on the target. Compare with Build/InstallDev
198 define Package
/libmosquitto
/install
199 $(INSTALL_DIR
) $(1)/usr
/lib
200 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/libmosquitto.so
.1 $(1)/usr
/lib
/
201 $(LN
) libmosquitto.so
.1 $(1)/usr
/lib
/libmosquitto.so
203 Package
/libmosquitto-nossl
/install = $(Package
/libmosquitto
/install)
205 define Package
/libmosquittopp
/install
206 $(INSTALL_DIR
) $(1)/usr
/lib
207 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/cpp/libmosquittopp.so
.1 $(1)/usr
/lib
/
208 $(LN
) libmosquittopp.so
.1 $(1)/usr
/lib
/libmosquittopp.so
212 MAKE_FLAGS
+= WITH_DOCS
=no
213 ifeq ($(BUILD_VARIANT
),nossl
)
214 MAKE_FLAGS
+= WITH_TLS
=no WITH_WEBSOCKETS
=no
216 MAKE_FLAGS
+= WITH_WEBSOCKETS
=$(if
$(CONFIG_MOSQUITTO_LWS
),"yes","no")
219 $(eval
$(call BuildPackage
,$(PKG_NAME
)))
220 $(eval
$(call BuildPackage
,$(PKG_NAME
)-nossl
))
221 $(eval
$(call BuildPackage
,libmosquitto
))
222 $(eval
$(call BuildPackage
,libmosquitto-nossl
))
223 $(eval
$(call BuildPackage
,libmosquittopp
))
224 $(eval
$(call BuildPackage
,mosquitto-client
))
225 $(eval
$(call BuildPackage
,mosquitto-client-nossl
))