Skip to contentSkip to conversation

pahomqtt-c: new package

PATCH New Pranit Tanaji Sirsat 2 participants 3 messages Sep 26, 2016 – Sep 27, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 pahomqtt-c: new package

mqtt client c library

---
Changes v1 -> v2:
- remove updates to DEVELOPERS file (suggested by Baruch Siach)

---
 package/Config.in                  |  1 +
 package/pahomqtt-c/Config.in       | 11 +++++++++++
 package/pahomqtt-c/pahomqtt-c.hash |  2 ++
 package/pahomqtt-c/pahomqtt-c.mk   | 18 ++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/pahomqtt-c/Config.in
 create mode 100644 package/pahomqtt-c/pahomqtt-c.hash
 create mode 100644 package/pahomqtt-c/pahomqtt-c.mk
package/Config.in +1 -0
index 9ca6c15..c0d92ba 100644
@@ -1239,6 +1239,7 @@ menu "Networking"
 	source "package/openpgm/Config.in"
 	source "package/openzwave/Config.in"
 	source "package/ortp/Config.in"
+	source "package/pahomqtt-c/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pahomqtt-c/Config.in new file +11 -0
new file mode 100644
index 0000000..53ccef2
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_PAHOMQTT_C
+	bool "pahomqtt-c"
+	depends on !BR2_STATIC_LIBS  # dlopen()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  MQTT client C library
+
+	  https://eclipse.org/paho/clients/c/
+
+comment "pahomqtt-c needs a toolchain w/ threads and dynamic library support"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
package/pahomqtt-c/pahomqtt-c.hash new file +2 -0
new file mode 100644
index 0000000..4bd1e5c
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  970b9621efc24251441d386274cd0a90cf6ad52b64031f3c8cb53fdd5526f5f3  pahomqtt-c-v1.1.0.tar.gz
package/pahomqtt-c/pahomqtt-c.mk new file +18 -0
new file mode 100644
index 0000000..2a533d1
@@ -0,0 +1,18 @@
+################################################################################
+#
+# pahomqtt-c
+#
+################################################################################
+
+PAHOMQTT_C_VERSION = v1.1.0
+PAHOMQTT_C_SITE = $(call github,eclipse,paho.mqtt.c,$(PAHOMQTT_C_VERSION))
+PAHOMQTT_C_LICENSE = EPLv1.0, EDLv1.0
+PAHOMQTT_C_LICENSE_FILES = epl-v10 edl-v10
+PAHOMQTT_C_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+PAHOMQTT_C_DEPENDENCIES = openssl
+PAHOMQTT_C_CONF_OPTS = -DPAHO_WITH_SSL=TRUE
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
2.6.2
#1 lore raw

PATCH v2 2/2 DEVELOPERS: list pahomqtt-c package under my name

---
 DEVELOPERS | 3 +++
 1 file changed, 3 insertions(+)
DEVELOPERS +3 -0
index 84e00c8..19a4270 100644
@@ -1148,6 +1148,9 @@ N:	Pieterjan Camerlynck <[email protected]>
 F:	package/libdvbpsi/
 F:	package/mraa/
 
+N:	Pranit Sirsat <[email protected]>
+F:	package/pahomqtt-c/
+
 N:	Qais Yousef <[email protected]>
 F:	package/bellagio/
 
Signature · 1 line
2.6.2
#2 lore raw

PATCH v2 1/2 pahomqtt-c: new package

In reply to Pranit Tanaji Sirsat

Hi Pranit,

Thank you for this contribution. I have a few remarks. Could you fix and resubmit?

Quoted 62 lines · Pranit Tanaji Sirsat

mqtt client c library

---
Changes v1 -> v2:
- remove updates to DEVELOPERS file (suggested by Baruch Siach)

---
 package/Config.in                  |  1 +
 package/pahomqtt-c/Config.in       | 11 +++++++++++
 package/pahomqtt-c/pahomqtt-c.hash |  2 ++
 package/pahomqtt-c/pahomqtt-c.mk   | 18 ++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/pahomqtt-c/Config.in
 create mode 100644 package/pahomqtt-c/pahomqtt-c.hash
 create mode 100644 package/pahomqtt-c/pahomqtt-c.mk
package/Config.in +1 -0
index 9ca6c15..c0d92ba 100644
@@ -1239,6 +1239,7 @@ menu "Networking"
 	source "package/openpgm/Config.in"
 	source "package/openzwave/Config.in"
 	source "package/ortp/Config.in"
+	source "package/pahomqtt-c/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pahomqtt-c/Config.in new file +11 -0
new file mode 100644
index 0000000..53ccef2
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_PAHOMQTT_C
+	bool "pahomqtt-c"
+	depends on !BR2_STATIC_LIBS  # dlopen()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  MQTT client C library
+
+	  https://eclipse.org/paho/clients/c/
+
+comment "pahomqtt-c needs a toolchain w/ threads and dynamic library support"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
package/pahomqtt-c/pahomqtt-c.hash new file +2 -0
new file mode 100644
index 0000000..4bd1e5c
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  970b9621efc24251441d386274cd0a90cf6ad52b64031f3c8cb53fdd5526f5f3  pahomqtt-c-v1.1.0.tar.gz
package/pahomqtt-c/pahomqtt-c.mk new file +0 -0
new file mode 100644
index 0000000..2a533d1

package/pahomqtt-c/pahomqtt-c.mk line 8

Quoted 8 lines
package/pahomqtt-c/pahomqtt-c.mk new file +8 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# pahomqtt-c
+#
+################################################################################
+
+PAHOMQTT_C_VERSION = v1.1.0
+PAHOMQTT_C_SITE = $(call github,eclipse,paho.mqtt.c,$(PAHOMQTT_C_VERSION))

Since upstream calls it paho.mqtt.c but we don't want . in package names, I
would call the package paho-mqtt-c.

package/pahomqtt-c/pahomqtt-c.mk line 9

Quoted 1 line
package/pahomqtt-c/pahomqtt-c.mk new file +1 -0
+PAHOMQTT_C_LICENSE = EPLv1.0, EDLv1.0

Although we already have two packages that use this convention, we really
should follow the SPDX convention, so EPL-1.0. Also, EDLv1.0 is just BSD-3c (cfr. [1]). And finally, as I understand it, the intention is that the code can be distributed either under EPL or under EDL. So in my opinion it should be:

PAHO_MQTT_C_LICENSE = EPL-1.0 or BSD-3c

package/pahomqtt-c/pahomqtt-c.mk line 15

Quoted 6 lines
package/pahomqtt-c/pahomqtt-c.mk new file +6 -0
+PAHOMQTT_C_LICENSE_FILES = epl-v10 edl-v10
+PAHOMQTT_C_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+PAHOMQTT_C_DEPENDENCIES = openssl
+PAHOMQTT_C_CONF_OPTS = -DPAHO_WITH_SSL=TRUE

Add an explicit -DPAHO_WITH_SSL=FALSE in the else branch.

Also, I think it would be good to add a global -DPAHO_BUILD_DOCUMENTATION=FALSE
and -DPAHO_BUILD_SAMPLES=FALSE. But those are already the default so maybe not needed.

Regards,
Arnout

package/pahomqtt-c/pahomqtt-c.mk line 18

Quoted 4 lines
package/pahomqtt-c/pahomqtt-c.mk new file +3 -0
+endif
+
+$(eval $(cmake-package))

[1] http://spdx-legal.spdx.narkive.com/wmb1FKZ8/new-license-request#post2

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF