Add libmosquitto and its CLI clients (#515)
authorNathaniel Wesley Filardo <VP331RHQ115POU58JFRLKB7OPA0L18E3@cmx.ietfng.org>
Mon, 31 Oct 2016 21:01:12 +0000 (17:01 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 31 Oct 2016 21:01:12 +0000 (22:01 +0100)
packages/libmosquitto/build.sh [new file with mode: 0644]
packages/libmosquitto/config.patch [new file with mode: 0644]
packages/libmosquitto/mosquitto.subpackage.sh [new file with mode: 0644]

diff --git a/packages/libmosquitto/build.sh b/packages/libmosquitto/build.sh
new file mode 100644 (file)
index 0000000..b3aa40b
--- /dev/null
@@ -0,0 +1,17 @@
+TERMUX_PKG_HOMEPAGE=http://www.mosquitto.org
+TERMUX_PKG_DESCRIPTION="MQTT library"
+TERMUX_PKG_VERSION=1.4.10
+TERMUX_PKG_SHA256=437648d68a4a781dd8d913814cd5451f59ab4a5fcf84cccaf7c36e6a07459770
+TERMUX_PKG_SRCURL=http://mosquitto.org/files/source/mosquitto-${TERMUX_PKG_VERSION}.tar.gz
+TERMUX_PKG_BUILD_IN_SRC=Yes
+TERMUX_PKG_DEPENDS="c-ares, openssl"
+TERMUX_PKG_MAINTAINER="Nathaniel Wesley Filardo @nwf"
+
+termux_step_configure () { : ; }
+termux_step_make () {
+  for i in lib client; do make -C $i; done
+}
+termux_step_make_install() {
+  for i in lib client; do make -C $i DESTDIR=${TERMUX_PREFIX} install; done
+}
+
diff --git a/packages/libmosquitto/config.patch b/packages/libmosquitto/config.patch
new file mode 100644 (file)
index 0000000..2505036
--- /dev/null
@@ -0,0 +1,36 @@
+diff --git a/config.mk b/config.mk
+index 087766c..6ff9bc1 100644
+--- a/config.mk
++++ b/config.mk
+@@ -26,10 +26,10 @@ WITH_TLS:=yes
+ # Comment out to disable TLS/PSK support in the broker and client. Requires
+ # WITH_TLS=yes.
+ # This must be disabled if using openssl < 1.0.
+-WITH_TLS_PSK:=yes
++WITH_TLS_PSK:=no
+ # Comment out to disable client client threading support.
+-WITH_THREADING:=yes
++WITH_THREADING:=no
+ # Comment out to remove bridge support from the broker. This allow the broker
+ # to connect to other brokers and subscribe/publish to topics. You probably
+@@ -124,8 +124,7 @@ LIB_LIBS:=
+ PASSWD_LIBS:=
+ ifeq ($(UNAME),Linux)
+-      BROKER_LIBS:=$(BROKER_LIBS) -lrt -Wl,--dynamic-list=linker.syms
+-      LIB_LIBS:=$(LIB_LIBS) -lrt
++      BROKER_LIBS:=$(BROKER_LIBS) -Wl,--dynamic-list=linker.syms
+ endif
+ CLIENT_LDFLAGS:=$(LDFLAGS) -L../lib ../lib/libmosquitto.so.${SOVERSION}
+@@ -241,7 +240,7 @@ ifeq ($(WITH_DOCS),yes)
+ endif
+ INSTALL?=install
+-prefix=/usr/local
++prefix=
+ mandir=${prefix}/share/man
+ localedir=${prefix}/share/locale
+ STRIP?=strip
diff --git a/packages/libmosquitto/mosquitto.subpackage.sh b/packages/libmosquitto/mosquitto.subpackage.sh
new file mode 100644 (file)
index 0000000..a5426f8
--- /dev/null
@@ -0,0 +1,3 @@
+TERMUX_SUBPKG_DEPENDS="libmosquitto"
+TERMUX_SUBPKG_INCLUDE="bin/mosquitto_pub bin/mosquitto_sub"
+TERMUX_SUBPKG_DESCRIPTION="mosquitto_pub and _sub clients"