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
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://mosquitto.org
/files
/source
/
17 PKG_MD5SUM
:=0874beeff51b3c64d4a7b2d5f9498288
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/package.mk
23 MAKE_FLAGS
+=WITH_MEMORY_TRACKING
=no
25 define Package
/$(PKG_NAME
)/default
28 TITLE
:=mosquitto
- an MQTT message broker
29 URL
:=http
://www.mosquitto.org
/
30 MAINTAINER
:=Karl Palsson
<karlp@remake.is
>
34 define Package
/$(PKG_NAME
)
35 $(call Package
/mosquitto
/default
)
36 TITLE
+= (with SSL support
)
41 define Package
/$(PKG_NAME
)-nossl
42 $(call Package
/$(PKG_NAME
)/default
)
43 TITLE
+= (without SSL support
)
47 define Package
/$(PKG_NAME
)/default
/description
48 mosquitto is a message broker that supports v3.1 of the MQ Telemetry
49 Transport protocol. MQTT provides a lightweight method for
50 messaging using a publish
/subscribe model.
52 This package also includes some basic support for configuring via UCI
55 define Package
/$(PKG_NAME
)/description
56 $(call Package
/$(PKG_NAME
)/default
/description
)
57 This package is built with SSL support
60 define Package
/$(PKG_NAME
)-nossl
/description
61 $(call Package
/$(PKG_NAME
)/default
/description
)
62 This package is built WITHOUT SSL support.
66 define Package
/mosquitto-client
/default
67 $(Package
/mosquitto
/default
)
68 TITLE
:= mosquitto
- client tools
70 define Package
/mosquitto-client
71 $(call Package
/mosquitto-client
/default
)
72 TITLE
+= (With SSL support
)
73 DEPENDS
+=+libmosquitto
76 define Package
/mosquitto-client-nossl
77 $(call Package
/mosquitto-client
/default
)
78 TITLE
+= (Without SSL support
)
79 DEPENDS
+=+libmosquitto-nossl
83 define Package
/mosquitto-client
/default
/description
84 Command line client tools for publishing messages to MQTT servers
85 and subscribing to topics.
88 define Package
/mosquitto-client
/description
89 $(call Package
/mosquitto-client
/default
/description
)
90 This package is built with SSL support
92 define Package
/mosquitto-client-nossl
/description
93 $(call Package
/mosquitto-client
/default
/description
)
94 This package is built without SSL support
97 define Package
/libmosquitto
/default
98 $(Package
/mosquitto
/default
)
101 DEPENDS
:=+libpthread
+librt
102 TITLE
:= mosquitto
- client library
105 define Package
/libmosquitto
106 $(call Package
/libmosquitto
/default
)
107 TITLE
+= (With SSL Support
)
108 DEPENDS
+= +libopenssl
111 define Package
/libmosquitto-nossl
112 $(call Package
/libmosquitto
/default
)
113 TITLE
+= (Without SSL Support
)
117 define Package
/libmosquitto
/default
/description
118 Library required for mosquitto
's command line client tools, also for
119 use by any third party software that wants to communicate with a
122 Should be useable for communicating with any MQTT v3.1 compatible
123 server, such as IBM's RSMB
, in addition to Mosquitto
126 define Package
/libmosquitto
/description
127 $(call Package
/libmosquitto
/default
/description
)
128 This package is built with SSL support
130 define Package
/libmosquitto-nossl
/description
131 $(call Package
/libmosquitto
/default
/description
)
132 This package is built without SSL support
136 define Package
/$(PKG_NAME
)/conffiles
137 /etc
/mosquitto
/mosquitto.conf
138 /etc
/config
/mosquitto
141 Package
/$(PKG_NAME
)-nossl
/conffiles
= $(Package
/$(PKG_NAME
)/conffiles
)
143 define Package
/$(PKG_NAME
)/install
144 $(INSTALL_DIR
) $(1)/usr
/sbin
145 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mosquitto
$(1)/usr
/sbin
/mosquitto
146 $(INSTALL_DIR
) $(1)/etc
/mosquitto
147 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/mosquitto.conf
$(1)/etc
/mosquitto
/mosquitto.conf
148 $(INSTALL_DIR
) $(1)/etc
/init.d
149 $(INSTALL_BIN
) .
/files
/mosquitto.init
$(1)/etc
/init.d
/mosquitto
150 $(INSTALL_DIR
) $(1)/usr
/bin
151 $(INSTALL_BIN
) .
/files
/mosquitto.uci.convert
$(1)/usr
/bin
153 Package
/$(PKG_NAME
)-nossl
/install = $(Package
/$(PKG_NAME
)/install)
156 define Package
/mosquitto-client
/install
157 $(INSTALL_DIR
) $(1)/usr
/bin
158 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/client
/mosquitto_pub
$(1)/usr
/bin
/mosquitto_pub
159 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/client
/mosquitto_sub
$(1)/usr
/bin
/mosquitto_sub
161 Package
/mosquitto-client-nossl
/install = $(Package
/mosquitto-client
/install)
163 # This installs files into ./staging_dir/. so that you can cross compile from the host
164 define Build
/InstallDev
165 $(INSTALL_DIR
) $(1)/usr
/include
166 $(CP
) $(PKG_BUILD_DIR
)/lib
/mosquitto.h
$(1)/usr
/include
167 $(INSTALL_DIR
) $(1)/usr
/lib
168 $(CP
) $(PKG_BUILD_DIR
)/lib
/libmosquitto.so
.1 $(1)/usr
/lib
/
169 $(LN
) libmosquitto.so
.1 $(1)/usr
/lib
/libmosquitto.so
172 # This installs files on the target. Compare with Build/InstallDev
173 define Package
/libmosquitto
/install
174 $(INSTALL_DIR
) $(1)/usr
/lib
175 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/libmosquitto.so
.1 $(1)/usr
/lib
/
176 $(LN
) libmosquitto.so
.1 $(1)/usr
/lib
/libmosquitto.so
178 Package
/libmosquitto-nossl
/install = $(Package
/libmosquitto
/install)
181 ifeq ($(BUILD_VARIANT
),nossl
)
182 MAKE_FLAGS
+= WITH_TLS
=no
185 $(eval
$(call BuildPackage
,$(PKG_NAME
)))
186 $(eval
$(call BuildPackage
,$(PKG_NAME
)-nossl
))
187 $(eval
$(call BuildPackage
,libmosquitto
))
188 $(eval
$(call BuildPackage
,libmosquitto-nossl
))
189 $(eval
$(call BuildPackage
,mosquitto-client
))
190 $(eval
$(call BuildPackage
,mosquitto-client-nossl
))