From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 16 Feb 2023 13:10:23 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pSd5k-009JJy-I2 for lore@lore.pengutronix.de; Thu, 16 Feb 2023 13:10:23 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pSd5i-0002sJ-DV; Thu, 16 Feb 2023 13:10:22 +0100 Received: from smtp96.ord1d.emailsrvr.com ([184.106.54.96]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSd5P-0002qz-EJ for ptxdist@pengutronix.de; Thu, 16 Feb 2023 13:10:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1676549401; bh=xKMHLw49eXl3gk8E4P58QpyKLl3Fkp3d2BDpLx7eO3Y=; h=From:To:Subject:Date:From; b=Haf/pYhFg6pCeHz7vN5x6r0dI/HtUs+TjyaijKcg8PaWwm6EW27ZmoltF51w+5EKM fq/Hia3bPTvRn1tjZZ5lummfFmWlRkVCqRTeHIOw3lhxL5S2C+DGfGH8sTxG/R+H1O EFEUoAveR4CzC7GeoLbtMGvAmghfd5d2jJ1YYphI= X-Auth-ID: abbotti@mev.co.uk Received: by smtp21.relay.ord1d.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 16A84601CC; Thu, 16 Feb 2023 07:10:00 -0500 (EST) From: Ian Abbott To: ptxdist@pengutronix.de Date: Thu, 16 Feb 2023 12:09:44 +0000 Message-Id: <20230216120944.26693-1-abbotti@mev.co.uk> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Classification-ID: 34a0ccb9-097f-40d2-8a2a-4ec2bcae5e86-1-1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] libtahu: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Ian Abbott Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Includes the C library from the Eclipse Tahu project that provides an implementation of the Sparkplug specification. This package does not include the implementations from the Tahu project for other programming languages other than C. Signed-off-by: Ian Abbott --- rules/libtahu.in | 11 ++++++ rules/libtahu.make | 88 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 rules/libtahu.in create mode 100644 rules/libtahu.make diff --git a/rules/libtahu.in b/rules/libtahu.in new file mode 100644 index 000000000..451d40957 --- /dev/null +++ b/rules/libtahu.in @@ -0,0 +1,11 @@ +## SECTION=system_libraries + +config LIBTAHU + tristate + prompt "libtahu" + help + Eclipse Tahu C library for encoding and decoding Sparkplug B + messages. + + A typical application will also require an MQTT library such + as "mosquitto". diff --git a/rules/libtahu.make b/rules/libtahu.make new file mode 100644 index 000000000..c4e62cc61 --- /dev/null +++ b/rules/libtahu.make @@ -0,0 +1,88 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Ian Abbott +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_LIBTAHU) += libtahu + +# +# Paths and names +# +LIBTAHU_VERSION := 1.0.1 +LIBTAHU_MD5 := 7e980ed17e34a78d6d61c000e4957292 +LIBTAHU := libtahu-$(LIBTAHU_VERSION) +LIBTAHU_SUFFIX := tar.gz +LIBTAHU_URL := https://github.com/eclipse/tahu/archive/refs/tags/v$(LIBTAHU_VERSION).$(LIBTAHU_SUFFIX) +LIBTAHU_SOURCE := $(SRCDIR)/$(LIBTAHU).$(LIBTAHU_SUFFIX) +LIBTAHU_DIR := $(BUILDDIR)/$(LIBTAHU) +LIBTAHU_SUBDIR := c/core +LIBTAHU_LICENSE := EPL-2.0 +LIBTAHU_LICENSE_FILES := \ + file://LICENSE;md5=c7cc8aa73fb5717f8291fcec5ce9ed6c \ + file://epl-v20.html;md5=84283fa8859daf213bdda5a9f8d1be1d + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +LIBTAHU_CONF_TOOL := NO + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +#LIBTAHU_MAKE_ENV := $(CROSS_ENV) + +# Default target builds tests that depend on libmosquitto, so just build +# the library files. +LIBTAHU_MAKE_OPT := \ + $(CROSS_ENV_CC) \ + $(CROSS_ENV_AR) \ + $(CROSS_ENV_LD) \ + lib/libtahu.so \ + lib/libtahu.a + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/libtahu.install: + @$(call targetinfo) + @install -m 644 -D -t "$(LIBTAHU_PKGDIR)/usr/lib" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/lib/libtahu.so" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/lib/libtahu.a" + @install -m 644 -D -t "$(LIBTAHU_PKGDIR)/usr/include" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/pb.h" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/pb_common.h" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/pb_decode.h" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/pb_encode.h" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/tahu.h" \ + "$(LIBTAHU_DIR)/$(LIBTAHU_SUBDIR)/include/tahu.pb.h" + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/libtahu.targetinstall: + @$(call targetinfo) + + @$(call install_init, libtahu) + @$(call install_fixup, libtahu,PRIORITY,optional) + @$(call install_fixup, libtahu,SECTION,base) + @$(call install_fixup, libtahu,AUTHOR,"Ian Abbott ") + @$(call install_fixup, libtahu,DESCRIPTION,missing) + + @$(call install_lib, libtahu, 0, 0, 0644, libtahu) + + @$(call install_finish, libtahu) + + @$(call touch) + +# vim: syntax=make -- 2.39.1