From patchwork Thu Jun 8 18:08:24 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: 773418 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 3wkD251ctxz9s7B for ; Fri, 9 Jun 2017 04:08: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="YlcxTIJT"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9D49789B93; Thu, 8 Jun 2017 18:08:42 +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 5llmpDzWwJuA; Thu, 8 Jun 2017 18:08:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6535789B95; Thu, 8 Jun 2017 18:08:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 940DC1C20F3 for ; Thu, 8 Jun 2017 18:08:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8255788042 for ; Thu, 8 Jun 2017 18:08:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r4uh2SYeRex5 for ; Thu, 8 Jun 2017 18:08:35 +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 fraxinus.osuosl.org (Postfix) with ESMTPS id 33AB987FFC for ; Thu, 8 Jun 2017 18:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1496945312; l=4020; s=domk; d=dawncrow.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Subject:Cc: To:From; bh=KOrThDLQrcln8gmxrWG0qZ72/Ts2QjNGwcQVka25bpw=; b=YlcxTIJThoBWG8DvznsF9FBhRoKUX/w3S4gKMXg5x5ncYn+GFL8rl9FxGP0g0QfEYr dQtc9hFoH0d68yBbSNk3DbS5XxDMSsd6lknKQI0j8X4YWilYFdW1yjNDJ0sjDtHnhcRJ sl42btH5x7MFvix0FY//pmuxwHBWLnjPj4qX0= 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 40.9 AUTH) with ESMTPSA id 602513t58I8W2A2 (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); Thu, 8 Jun 2017 20:08:32 +0200 (CEST) From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= To: buildroot@buildroot.org Date: Thu, 8 Jun 2017 20:08:24 +0200 Message-Id: <1496945304-8582-1-git-send-email-nerv@dawncrow.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Subject: [Buildroot] [PATCH] 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" From: André Hentschel Signed-off-by: André Hentschel --- package/Config.in | 1 + package/azure-iot-sdk-c/Config.in | 14 ++++++++ package/azure-iot-sdk-c/azure-iot-sdk-c.mk | 52 ++++++++++++++++++++++++++++++ 3 files changed, 67 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/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..a0fac8d --- /dev/null +++ b/package/azure-iot-sdk-c/Config.in @@ -0,0 +1,14 @@ +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. + +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..79d97c1 --- /dev/null +++ b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# azure-iot-sdk-c +# +################################################################################ + +AZURE_IOT_SDK_C_VERSION = lts_03_2017 +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 + +AZURE_IOT_SDK_C_LIBS = +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 +endif # Static enabled + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +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 # Shared enabled + +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))