|
@@ -0,0 +1,190 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2011-2013 OpenWrt.org
|
|
3
|
+# Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
|
|
4
|
+#
|
|
5
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
6
|
+# See /LICENSE for more information.
|
|
7
|
+#
|
|
8
|
+
|
|
9
|
+include $(TOPDIR)/rules.mk
|
|
10
|
+
|
|
11
|
+PKG_NAME:=mosquitto
|
|
12
|
+PKG_VERSION:=1.3.1
|
|
13
|
+PKG_RELEASE:=1
|
|
14
|
+
|
|
15
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
16
|
+PKG_SOURCE_URL:=http://mosquitto.org/files/source/
|
|
17
|
+PKG_MD5SUM:=2f2870e965cf6f0b5df4ecaf2a0955d2
|
|
18
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
19
|
+
|
|
20
|
+include $(INCLUDE_DIR)/package.mk
|
|
21
|
+
|
|
22
|
+MAKE_FLAGS+=WITH_MEMORY_TRACKING=no
|
|
23
|
+
|
|
24
|
+define Package/$(PKG_NAME)/default
|
|
25
|
+ SECTION:=net
|
|
26
|
+ CATEGORY:=Network
|
|
27
|
+ TITLE:=mosquitto - an MQTT message broker
|
|
28
|
+ URL:=http://www.mosquitto.org/
|
|
29
|
+ MAINTAINER:=Karl Palsson <karlp@remake.is>
|
|
30
|
+ DEPENDS:= +librt
|
|
31
|
+endef
|
|
32
|
+
|
|
33
|
+define Package/$(PKG_NAME)
|
|
34
|
+ $(call Package/mosquitto/default)
|
|
35
|
+ TITLE+= (with SSL support)
|
|
36
|
+ DEPENDS+= +libopenssl
|
|
37
|
+ VARIANT:=ssl
|
|
38
|
+endef
|
|
39
|
+
|
|
40
|
+define Package/$(PKG_NAME)-nossl
|
|
41
|
+ $(call Package/$(PKG_NAME)/default)
|
|
42
|
+ TITLE+= (without SSL support)
|
|
43
|
+ VARIANT:=nossl
|
|
44
|
+endef
|
|
45
|
+
|
|
46
|
+define Package/$(PKG_NAME)/default/description
|
|
47
|
+ mosquitto is a message broker that supports v3.1 of the MQ Telemetry
|
|
48
|
+Transport protocol. MQTT provides a lightweight method for
|
|
49
|
+messaging using a publish/subscribe model.
|
|
50
|
+
|
|
51
|
+This package also includes some basic support for configuring via UCI
|
|
52
|
+endef
|
|
53
|
+
|
|
54
|
+define Package/$(PKG_NAME)/description
|
|
55
|
+ $(call Package/$(PKG_NAME)/default/description)
|
|
56
|
+ This package is built with SSL support
|
|
57
|
+endef
|
|
58
|
+
|
|
59
|
+define Package/$(PKG_NAME)-nossl/description
|
|
60
|
+ $(call Package/$(PKG_NAME)/default/description)
|
|
61
|
+ This package is built WITHOUT SSL support.
|
|
62
|
+endef
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+define Package/mosquitto-client/default
|
|
66
|
+ $(Package/mosquitto/default)
|
|
67
|
+ TITLE:= mosquitto - client tools
|
|
68
|
+ DEPENDS+=+libcares
|
|
69
|
+endef
|
|
70
|
+define Package/mosquitto-client
|
|
71
|
+ $(call Package/mosquitto-client/default)
|
|
72
|
+ TITLE+= (With SSL support)
|
|
73
|
+ DEPENDS+=+libmosquitto
|
|
74
|
+ VARIANT:=ssl
|
|
75
|
+endef
|
|
76
|
+define Package/mosquitto-client-nossl
|
|
77
|
+ $(call Package/mosquitto-client/default)
|
|
78
|
+ TITLE+= (Without SSL support)
|
|
79
|
+ DEPENDS+=+libmosquitto-nossl
|
|
80
|
+ VARIANT:=nossl
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+define Package/mosquitto-client/default/description
|
|
84
|
+ Command line client tools for publishing messages to MQTT servers
|
|
85
|
+and subscribing to topics.
|
|
86
|
+endef
|
|
87
|
+
|
|
88
|
+define Package/mosquitto-client/description
|
|
89
|
+$(call Package/mosquitto-client/default/description)
|
|
90
|
+ This package is built with SSL support
|
|
91
|
+endef
|
|
92
|
+define Package/mosquitto-client-nossl/description
|
|
93
|
+$(call Package/mosquitto-client/default/description)
|
|
94
|
+ This package is built without SSL support
|
|
95
|
+endef
|
|
96
|
+
|
|
97
|
+define Package/libmosquitto/default
|
|
98
|
+ $(Package/mosquitto/default)
|
|
99
|
+ SECTION:=libs
|
|
100
|
+ CATEGORY:=Libraries
|
|
101
|
+ DEPENDS:=+libpthread +librt +libcares
|
|
102
|
+ TITLE:= mosquitto - client library
|
|
103
|
+endef
|
|
104
|
+
|
|
105
|
+define Package/libmosquitto
|
|
106
|
+ $(call Package/libmosquitto/default)
|
|
107
|
+ TITLE+= (With SSL Support)
|
|
108
|
+ DEPENDS+= +libopenssl
|
|
109
|
+ VARIANT=ssl
|
|
110
|
+endef
|
|
111
|
+define Package/libmosquitto-nossl
|
|
112
|
+ $(call Package/libmosquitto/default)
|
|
113
|
+ TITLE+= (Without SSL Support)
|
|
114
|
+ VARIANT=nossl
|
|
115
|
+endef
|
|
116
|
+
|
|
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
|
|
120
|
+mosquitto server.
|
|
121
|
+
|
|
122
|
+Should be useable for communicating with any MQTT v3.1 compatible
|
|
123
|
+server, such as IBM's RSMB, in addition to Mosquitto
|
|
124
|
+endef
|
|
125
|
+
|
|
126
|
+define Package/libmosquitto/description
|
|
127
|
+ $(call Package/libmosquitto/default/description)
|
|
128
|
+ This package is built with SSL support
|
|
129
|
+endef
|
|
130
|
+define Package/libmosquitto-nossl/description
|
|
131
|
+ $(call Package/libmosquitto/default/description)
|
|
132
|
+ This package is built without SSL support
|
|
133
|
+endef
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+define Package/$(PKG_NAME)/conffiles
|
|
137
|
+/etc/mosquitto/mosquitto.conf
|
|
138
|
+/etc/config/mosquitto
|
|
139
|
+endef
|
|
140
|
+
|
|
141
|
+Package/$(PKG_NAME)-nossl/conffiles = $(Package/$(PKG_NAME)/conffiles)
|
|
142
|
+
|
|
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
|
|
152
|
+endef
|
|
153
|
+Package/$(PKG_NAME)-nossl/install = $(Package/$(PKG_NAME)/install)
|
|
154
|
+
|
|
155
|
+
|
|
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
|
|
160
|
+endef
|
|
161
|
+Package/mosquitto-client-nossl/install = $(Package/mosquitto-client/install)
|
|
162
|
+
|
|
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
|
|
170
|
+endef
|
|
171
|
+
|
|
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
|
|
177
|
+endef
|
|
178
|
+Package/libmosquitto-nossl/install = $(Package/libmosquitto/install)
|
|
179
|
+
|
|
180
|
+# Applies to all...
|
|
181
|
+ifeq ($(BUILD_VARIANT),nossl)
|
|
182
|
+ MAKE_FLAGS += WITH_TLS=no
|
|
183
|
+endif
|
|
184
|
+
|
|
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))
|