* [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package
@ 2017-06-12 19:51 André Hentschel
2017-06-12 20:45 ` Thomas Petazzoni
2017-06-12 22:19 ` Arnout Vandecappelle
0 siblings, 2 replies; 5+ messages in thread
From: André Hentschel @ 2017-06-12 19:51 UTC (permalink / raw)
To: buildroot
I use 2017-05-05 now, because newer versions will need some fixes (maybe as patches), so let's start with a cleaner version that just works.
Still, the projects install target installs the wrong files, that's why commands are needed for staging_install and target_install.
v2: Rework the package with help from Arnouts comments
v3: Explain some things in the commit message
Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/azure-iot-sdk-c/Config.in | 16 ++++++++++
package/azure-iot-sdk-c/azure-iot-sdk-c.mk | 51 ++++++++++++++++++++++++++++++
4 files changed, 69 insertions(+)
create mode 100644 package/azure-iot-sdk-c/Config.in
create mode 100644 package/azure-iot-sdk-c/azure-iot-sdk-c.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1e87d3a..edc23c9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -76,6 +76,7 @@ N: Anders Darander <anders@chargestorm.se>
F: package/ktap/
N: Andr? Hentschel <nerv@dawncrow.de>
+F: package/azure-iot-sdk-c/
F: package/openal/
F: package/p7zip/
F: package/wine/
diff --git a/package/Config.in b/package/Config.in
index e00b162..a56520b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1247,6 +1247,7 @@ menu "Networking"
source "package/alljoyn-base/Config.in"
source "package/alljoyn-tcl/Config.in"
source "package/alljoyn-tcl-base/Config.in"
+ source "package/azure-iot-sdk-c/Config.in"
source "package/batman-adv/Config.in"
source "package/c-ares/Config.in"
source "package/canfestival/Config.in"
diff --git a/package/azure-iot-sdk-c/Config.in b/package/azure-iot-sdk-c/Config.in
new file mode 100644
index 0000000..9fb956a
--- /dev/null
+++ b/package/azure-iot-sdk-c/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_AZURE_IOT_SDK_C
+ bool "azure-iot-sdk-c"
+ depends on BR2_INSTALL_LIBSTDCPP
+ select BR2_PACKAGE_LIBCURL
+ select BR2_PACKAGE_LIBXML2
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ help
+ Microsoft Azure IoT Hub device SDK for C is used
+ to connect devices running C code to Azure IoT Hub.
+
+ https://docs.microsoft.com/nl-nl/azure/iot-hub/iot-hub-device-sdk-c-intro
+
+comment "azure-iot-sdk-c needs a toolchain w/ C++"
+ depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/azure-iot-sdk-c/azure-iot-sdk-c.mk b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk
new file mode 100644
index 0000000..dbdef3e
--- /dev/null
+++ b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk
@@ -0,0 +1,51 @@
+################################################################################
+#
+# azure-iot-sdk-c
+#
+################################################################################
+
+AZURE_IOT_SDK_C_VERSION = 2017-05-05
+AZURE_IOT_SDK_C_SITE = https://github.com/Azure/azure-iot-sdk-c
+AZURE_IOT_SDK_C_SITE_METHOD = git
+AZURE_IOT_SDK_C_GIT_SUBMODULES = YES
+AZURE_IOT_SDK_C_LICENSE = MIT
+AZURE_IOT_SDK_C_LICENSE_FILES = LICENSE
+AZURE_IOT_SDK_C_INSTALL_STAGING = YES
+AZURE_IOT_SDK_C_DEPENDENCIES = libxml2 openssl libcurl util-linux
+AZURE_IOT_SDK_C_CONF_OPTS = -Dskip_samples=ON
+
+# The project only supports building one kind of library.
+# Further the install target installs the wrong files, so we do it here:
+ifeq ($(BR2_STATIC_LIBS),y)
+AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.a c-utility/libaziotsharedutil.a \
+ iothub_client/libiothub_client.a iothub_client/libiothub_client_mqtt_ws_transport.a \
+ iothub_client/libiothub_client_amqp_ws_transport.a \
+ iothub_client/libiothub_client_http_transport.a \
+ iothub_client/libiothub_client_amqp_transport.a \
+ iothub_client/libiothub_client_mqtt_transport.a \
+ iothub_service_client/libiothub_service_client.a serializer/libserializer.a umqtt/libumqtt.a
+else
+AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.so c-utility/libaziotsharedutil.so \
+ iothub_client/libiothub_client.so iothub_client/libiothub_client_mqtt_ws_transport.so \
+ iothub_client/libiothub_client_amqp_ws_transport.so \
+ iothub_client/libiothub_client_http_transport.so \
+ iothub_client/libiothub_client_amqp_transport.so \
+ iothub_client/libiothub_client_mqtt_transport.so \
+ iothub_service_client/libiothub_service_client.so serializer/libserializer.so umqtt/libumqtt.so
+endif
+
+define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
+ $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
+ $(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/
+ )
+ cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
+ cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
+endef
+
+define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS
+ $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
+ $(INSTALL) -D -m 0755 $(@D)/$(l) $(TARGET_DIR)/usr/lib/
+ )
+endef
+
+$(eval $(cmake-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package
2017-06-12 19:51 [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package André Hentschel
@ 2017-06-12 20:45 ` Thomas Petazzoni
2017-06-22 15:14 ` André Hentschel
2017-06-12 22:19 ` Arnout Vandecappelle
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2017-06-12 20:45 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 12 Jun 2017 21:51:31 +0200, Andr? Hentschel wrote:
> I use 2017-05-05 now, because newer versions will need some fixes (maybe as patches), so let's start with a cleaner version that just works.
Don't use "personal" sentences in commit logs, and rewrap commit logs
at 72 characters. So something like:
"""
Despite newer versions being available, this patch creates a package
for version 2017-05-05, because newer version have issues that need to
be addressed.
"""
> Still, the projects install target installs the wrong files, that's
> why commands are needed for staging_install and target_install.
Isn't it better to patch the package build system to fix those issues?
>
> v2: Rework the package with help from Arnouts comments
> v3: Explain some things in the commit message
The commit log should go...
> Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
> ---
... here.
I typically do that by putting "---" below my SoB line, and writing the
commit log (git commit --amend).
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package
2017-06-12 19:51 [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package André Hentschel
2017-06-12 20:45 ` Thomas Petazzoni
@ 2017-06-12 22:19 ` Arnout Vandecappelle
2017-06-22 15:14 ` André Hentschel
1 sibling, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-06-12 22:19 UTC (permalink / raw)
To: buildroot
Hi Andre,
On 12-06-17 21:51, Andr? Hentschel wrote:
[snip]
> +# The project only supports building one kind of library.
> +# Further the install target installs the wrong files, so we do it here:
> +ifeq ($(BR2_STATIC_LIBS),y)
I was going to say: these also have to be installed in the SHARED_STATIC case.
But apparently CMake doesn't build a static library in the SHARED_STATIC case.
Bummer...
> +AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.a c-utility/libaziotsharedutil.a \
> + iothub_client/libiothub_client.a iothub_client/libiothub_client_mqtt_ws_transport.a \
> + iothub_client/libiothub_client_amqp_ws_transport.a \
> + iothub_client/libiothub_client_http_transport.a \
> + iothub_client/libiothub_client_amqp_transport.a \
> + iothub_client/libiothub_client_mqtt_transport.a \
> + iothub_service_client/libiothub_service_client.a serializer/libserializer.a umqtt/libumqtt.a
> +else
> +AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.so c-utility/libaziotsharedutil.so \
> + iothub_client/libiothub_client.so iothub_client/libiothub_client_mqtt_ws_transport.so \
> + iothub_client/libiothub_client_amqp_ws_transport.so \
> + iothub_client/libiothub_client_http_transport.so \
> + iothub_client/libiothub_client_amqp_transport.so \
> + iothub_client/libiothub_client_mqtt_transport.so \
> + iothub_service_client/libiothub_service_client.so serializer/libserializer.so umqtt/libumqtt.so
> +endif
> +
> +define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
> + $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
> + $(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/
> + )
> + cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
> + cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
This is not the location where the CMakeLists.txt installs the headers. Isn't
that going to give problems when there are packages that use this library?
Regards,
Arnout
> +endef
> +
> +define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS
> + $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
> + $(INSTALL) -D -m 0755 $(@D)/$(l) $(TARGET_DIR)/usr/lib/
> + )
> +endef
> +
> +$(eval $(cmake-package))
>
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package
2017-06-12 22:19 ` Arnout Vandecappelle
@ 2017-06-22 15:14 ` André Hentschel
0 siblings, 0 replies; 5+ messages in thread
From: André Hentschel @ 2017-06-22 15:14 UTC (permalink / raw)
To: buildroot
Am 13.06.2017 um 00:19 schrieb Arnout Vandecappelle:
> Hi Andre,
>
> On 12-06-17 21:51, Andr? Hentschel wrote:
> [snip]
>> +# The project only supports building one kind of library.
>> +# Further the install target installs the wrong files, so we do it here:
>> +ifeq ($(BR2_STATIC_LIBS),y)
>
> I was going to say: these also have to be installed in the SHARED_STATIC case.
> But apparently CMake doesn't build a static library in the SHARED_STATIC case.
> Bummer...
>
>> +AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.a c-utility/libaziotsharedutil.a \
>> + iothub_client/libiothub_client.a iothub_client/libiothub_client_mqtt_ws_transport.a \
>> + iothub_client/libiothub_client_amqp_ws_transport.a \
>> + iothub_client/libiothub_client_http_transport.a \
>> + iothub_client/libiothub_client_amqp_transport.a \
>> + iothub_client/libiothub_client_mqtt_transport.a \
>> + iothub_service_client/libiothub_service_client.a serializer/libserializer.a umqtt/libumqtt.a
>> +else
>> +AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.so c-utility/libaziotsharedutil.so \
>> + iothub_client/libiothub_client.so iothub_client/libiothub_client_mqtt_ws_transport.so \
>> + iothub_client/libiothub_client_amqp_ws_transport.so \
>> + iothub_client/libiothub_client_http_transport.so \
>> + iothub_client/libiothub_client_amqp_transport.so \
>> + iothub_client/libiothub_client_mqtt_transport.so \
>> + iothub_service_client/libiothub_service_client.so serializer/libserializer.so umqtt/libumqtt.so
>> +endif
>> +
>> +define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
>> + $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
>> + $(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/
>> + )
>> + cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
>> + cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
>
> This is not the location where the CMakeLists.txt installs the headers. Isn't
> that going to give problems when there are packages that use this library?
>
AFAICT the CMakeLists.txt installs the totally wrong headers, what exactly do you mean here?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package
2017-06-12 20:45 ` Thomas Petazzoni
@ 2017-06-22 15:14 ` André Hentschel
0 siblings, 0 replies; 5+ messages in thread
From: André Hentschel @ 2017-06-22 15:14 UTC (permalink / raw)
To: buildroot
Am 12.06.2017 um 22:45 schrieb Thomas Petazzoni:
> Hello,
Hi, thanks for the review
> On Mon, 12 Jun 2017 21:51:31 +0200, Andr? Hentschel wrote:
>> I use 2017-05-05 now, because newer versions will need some fixes (maybe as patches), so let's start with a cleaner version that just works.
>
> Don't use "personal" sentences in commit logs, and rewrap commit logs
> at 72 characters. So something like:
>
> """
>
> Despite newer versions being available, this patch creates a package
> for version 2017-05-05, because newer version have issues that need to
> be addressed.
>
> """
thx, done
>> Still, the projects install target installs the wrong files, that's
>> why commands are needed for staging_install and target_install.
>
> Isn't it better to patch the package build system to fix those issues?
That would be quite a lot for the first introduction of the package.
I'll get in contact with the project to improve the situation in future versions
>>
>> v2: Rework the package with help from Arnouts comments
>> v3: Explain some things in the commit message
>
> The commit log should go...
>
>> Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
>> ---
>
> ... here.
>
> I typically do that by putting "---" below my SoB line, and writing the
> commit log (git commit --amend).
thx, done
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-22 15:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 19:51 [Buildroot] [PATCH] [PATCH v3] azure-iot-sdk-c: New package André Hentschel
2017-06-12 20:45 ` Thomas Petazzoni
2017-06-22 15:14 ` André Hentschel
2017-06-12 22:19 ` Arnout Vandecappelle
2017-06-22 15:14 ` André Hentschel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.