From patchwork Thu Jun 22 15:11:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Zwing?= X-Patchwork-Id: 779568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wtlRQ01QQz9ryv for ; Fri, 23 Jun 2017 01:11:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dawncrow.de header.i=@dawncrow.de header.b="o3+6mw78"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 06B56887A7; Thu, 22 Jun 2017 15:11:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GAHyPL7n9lDE; Thu, 22 Jun 2017 15:11:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4D097883B5; Thu, 22 Jun 2017 15:11:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 082441C1F4F for ; Thu, 22 Jun 2017 15:11:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0294D860A3 for ; Thu, 22 Jun 2017 15:11:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U5p+s3Ar9XGm for ; Thu, 22 Jun 2017 15:11:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.161]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1E0A286078 for ; Thu, 22 Jun 2017 15:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1498144293; l=4852; s=domk; d=dawncrow.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Subject:To: From; bh=0Z4S2nhTqphPMWjfxUZmejS3bc4NpS/JadE/iv1BKWU=; b=o3+6mw78vX5Olh3koCAosCyzL1Eu2dnIbim8Q/0wkLbg5sTHJkFQe7o8keJnIXTP6g ti1gXhjOyoL/01DE1pSu5E3vacWa29HE/DPn/6Ghy+2kEIZj5Gs7pN+GrXcSP7+6ulXb 0YscThPOqMX4La7oRahsIifUKz+NQV2vc3Jco= X-RZG-AUTH: :ImkWY2CseuihIZy6ZWWciR6unPh+P/KeXNOPfgUVDCICsaql0sd8Q4Nsov0AbrBb8UDflupTct25u3ofuYmTruC74Kj9 X-RZG-CLASS-ID: mo00 Received: from tesla.fritz.box ([2001:470:6f:b52:e18d:1560:8cfc:ea37]) by smtp.strato.de (RZmta 41.0 AUTH) with ESMTPSA id V04563t5MFBXE7b (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 22 Jun 2017 17:11:33 +0200 (CEST) From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= To: buildroot@buildroot.org Date: Thu, 22 Jun 2017 17:11:30 +0200 Message-Id: <1498144290-13940-1-git-send-email-nerv@dawncrow.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] [PATCH v4] azure-iot-sdk-c: New package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. Signed-off-by: André Hentschel --- v2: Rework the package with help from Arnouts comments v3: Explain some things in the commit message v4: Fix commit message as suggested by Thomas 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 315849a..cfeeb2f 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -81,6 +81,7 @@ N: Anders Darander F: package/ktap/ N: André Hentschel +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 95068fd..b0f62fe 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1262,6 +1262,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))