python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / mosquitto / mosquitto.mk
blob96607f32e3231ef5756ee053b385371f3bd699dc
1 ################################################################################
3 # mosquitto
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 = \
14 UNAME=Linux \
15 STRIP=true \
16 prefix=/usr \
17 WITH_WRAP=no \
18 WITH_DOCS=no
20 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
21 MOSQUITTO_MAKE_OPTS += WITH_THREADING=yes
22 else
23 MOSQUITTO_MAKE_OPTS += WITH_THREADING=no
24 endif
26 ifeq ($(BR2_PACKAGE_OPENSSL),y)
27 MOSQUITTO_DEPENDENCIES += openssl
28 MOSQUITTO_MAKE_OPTS += WITH_TLS=yes
29 else
30 MOSQUITTO_MAKE_OPTS += WITH_TLS=no
31 endif
33 ifeq ($(BR2_PACKAGE_C_ARES),y)
34 MOSQUITTO_DEPENDENCIES += c-ares
35 MOSQUITTO_MAKE_OPTS += WITH_SRV=yes
36 else
37 MOSQUITTO_MAKE_OPTS += WITH_SRV=no
38 endif
40 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
41 MOSQUITTO_DEPENDENCIES += util-linux
42 MOSQUITTO_MAKE_OPTS += WITH_UUID=yes
43 else
44 MOSQUITTO_MAKE_OPTS += WITH_UUID=no
45 endif
47 ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y)
48 MOSQUITTO_DEPENDENCIES += libwebsockets
49 MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=yes
50 else
51 MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=no
52 endif
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
58 endef
60 MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP
61 endif
63 define MOSQUITTO_BUILD_CMDS
64 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
65 $(MOSQUITTO_MAKE_OPTS)
66 endef
68 define MOSQUITTO_INSTALL_STAGING_CMDS
69 $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
70 $(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
71 endef
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
79 endef
81 define MOSQUITTO_INSTALL_INIT_SYSV
82 $(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \
83 $(TARGET_DIR)/etc/init.d/S50mosquitto
84 endef
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
92 endef
94 define MOSQUITTO_USERS
95 mosquitto -1 nogroup -1 * - - - Mosquitto user
96 endef
98 $(eval $(generic-package))