1 ################################################################################
5 ################################################################################
7 MOSQUITTO_VERSION
= 1.4.10
8 MOSQUITTO_SITE
= http
://mosquitto.org
/files
/source
9 MOSQUITTO_LICENSE
= EPLv1.0 or EDLv1.0
10 MOSQUITTO_LICENSE_FILES
= LICENSE.txt epl-v10 edl-v10
11 MOSQUITTO_INSTALL_STAGING
= YES
13 MOSQUITTO_MAKE_OPTS
= \
20 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),y
)
21 MOSQUITTO_MAKE_OPTS
+= WITH_THREADING
=yes
23 MOSQUITTO_MAKE_OPTS
+= WITH_THREADING
=no
26 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
27 MOSQUITTO_DEPENDENCIES
+= openssl
28 MOSQUITTO_MAKE_OPTS
+= WITH_TLS
=yes
30 MOSQUITTO_MAKE_OPTS
+= WITH_TLS
=no
33 ifeq ($(BR2_PACKAGE_C_ARES
),y
)
34 MOSQUITTO_DEPENDENCIES
+= c-ares
35 MOSQUITTO_MAKE_OPTS
+= WITH_SRV
=yes
37 MOSQUITTO_MAKE_OPTS
+= WITH_SRV
=no
40 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID
),y
)
41 MOSQUITTO_DEPENDENCIES
+= util-linux
42 MOSQUITTO_MAKE_OPTS
+= WITH_UUID
=yes
44 MOSQUITTO_MAKE_OPTS
+= WITH_UUID
=no
47 ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS
),y
)
48 MOSQUITTO_DEPENDENCIES
+= libwebsockets
49 MOSQUITTO_MAKE_OPTS
+= WITH_WEBSOCKETS
=yes
51 MOSQUITTO_MAKE_OPTS
+= WITH_WEBSOCKETS
=no
54 # C++ support is only used to create a wrapper library
55 ifneq ($(BR2_INSTALL_LIBSTDCPP
),y
)
56 define MOSQUITTO_DISABLE_CPP
57 $(SED
) '/-C cpp/d' $(@D
)/lib
/Makefile
60 MOSQUITTO_POST_PATCH_HOOKS
+= MOSQUITTO_DISABLE_CPP
63 define MOSQUITTO_BUILD_CMDS
64 $(MAKE
) -C
$(@D
) $(TARGET_CONFIGURE_OPTS
) \
65 $(MOSQUITTO_MAKE_OPTS
)
68 define MOSQUITTO_INSTALL_STAGING_CMDS
69 $(MAKE
) -C
$(@D
) $(TARGET_CONFIGURE_OPTS
) \
70 $(MOSQUITTO_MAKE_OPTS
) DESTDIR
=$(STAGING_DIR
) install
73 define MOSQUITTO_INSTALL_TARGET_CMDS
74 $(MAKE
) -C
$(@D
) $(TARGET_CONFIGURE_OPTS
) \
75 $(MOSQUITTO_MAKE_OPTS
) DESTDIR
=$(TARGET_DIR
) install
76 rm -f
$(TARGET_DIR
)/etc
/mosquitto
/*.example
77 $(INSTALL
) -D
-m
0644 $(@D
)/mosquitto.conf \
78 $(TARGET_DIR
)/etc
/mosquitto
/mosquitto.conf
81 define MOSQUITTO_INSTALL_INIT_SYSV
82 $(INSTALL
) -D
-m
0755 package
/mosquitto
/S50mosquitto \
83 $(TARGET_DIR
)/etc
/init.d
/S50mosquitto
86 define MOSQUITTO_INSTALL_INIT_SYSTEMD
87 $(INSTALL
) -D
-m
644 package
/mosquitto
/mosquitto.service \
88 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/mosquitto.service
89 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
90 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/mosquitto.service \
91 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/mosquitto.service
94 define MOSQUITTO_USERS
95 mosquitto
-1 nogroup
-1 * - - - Mosquitto user
98 $(eval
$(generic-package
))