mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] libosdp: new package
@ 2025-01-23  6:17 Rouven Czerwinski
  2025-01-27  8:35 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Rouven Czerwinski @ 2025-01-23  6:17 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Add libosdp for support of the osdp protocol. Add a patch to build the
osdpctl program without the rest of the utilities, it is otherwise not
possible to build osdpctl without the python bindings.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
v2:
- fix permissions to executable 755
- use _PARTS syntax for CUTILS dependency
- remove no longer required extract stage
- add break for _CONF_OPT

 ...eLists-build-ospdctl-in-library-mode.patch | 29 ++++++++
 patches/libosdp-2.4.0/series                  |  1 +
 rules/libosdp.in                              |  9 +++
 rules/libosdp.make                            | 69 +++++++++++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch
 create mode 100644 patches/libosdp-2.4.0/series
 create mode 100644 rules/libosdp.in
 create mode 100644 rules/libosdp.make

diff --git a/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch b/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch
new file mode 100644
index 000000000..7f1c53cce
--- /dev/null
+++ b/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch
@@ -0,0 +1,29 @@
+From dbf9ac4f156f545c233e3259995c00413c68ba3f Mon Sep 17 00:00:00 2001
+From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+Date: Fri, 1 Mar 2024 12:11:20 +0100
+Subject: [PATCH] CMakeLists: build ospdctl in library mode
+
+Also build osdpctl when only the library parts are build.
+
+Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1efeb4b..e844b5c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,8 +40,8 @@ option(CONFIG_OSDP_LIB_ONLY "Only build the library" OFF)
+ include(GitSubmodules)
+ add_subdirectory(utils)
+ add_subdirectory(src)
++add_subdirectory(osdpctl)
+ if (NOT CONFIG_OSDP_STATIC_PD AND NOT CONFIG_OSDP_LIB_ONLY)
+-	add_subdirectory(osdpctl)
+ 	add_subdirectory(tests/pytest)
+ 	add_subdirectory(tests/unit-tests)
+ 	add_subdirectory(samples/c)
+-- 
+2.43.1
+
diff --git a/patches/libosdp-2.4.0/series b/patches/libosdp-2.4.0/series
new file mode 100644
index 000000000..fad17c996
--- /dev/null
+++ b/patches/libosdp-2.4.0/series
@@ -0,0 +1 @@
+0001-CMakeLists-build-ospdctl-in-library-mode.patch
diff --git a/rules/libosdp.in b/rules/libosdp.in
new file mode 100644
index 000000000..336fd01b1
--- /dev/null
+++ b/rules/libosdp.in
@@ -0,0 +1,9 @@
+## SECTION=system_libraries
+
+config LIBOSDP
+	bool
+	prompt "libosdp"
+	select HOST_CMAKE
+	select OPENSSL
+	help
+	  OSDP (Open Supervised Device Protocol) library and osdpctl cli.
diff --git a/rules/libosdp.make b/rules/libosdp.make
new file mode 100644
index 000000000..9b66fa8df
--- /dev/null
+++ b/rules/libosdp.make
@@ -0,0 +1,69 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBOSDP) += libosdp
+
+#
+# Paths and names
+#
+LIBOSDP_VERSION		:= 2.4.0
+LIBOSDP_MD5		:= 14484c746fa28a4a0005e893279bd8ec
+LIBOSDP			:= libosdp-$(LIBOSDP_VERSION)
+LIBOSDP_SUFFIX		:= tar.gz
+LIBOSDP_URL		:= https://github.com/goToMain/libosdp/archive/v$(LIBOSDP_VERSION).$(LIBOSDP_SUFFIX)
+LIBOSDP_SOURCE		:= $(SRCDIR)/$(LIBOSDP).$(LIBOSDP_SUFFIX)
+LIBOSDP_DIR		:= $(BUILDDIR)/$(LIBOSDP)
+LIBOSDP_LICENSE		:= Apache-2.0
+LIBOSDP_LICENSE_FILES	:= file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327
+
+CUTILS_VERSION		:= 7d5cb004258b8b8a195b63ad15177ff196cefd08
+CUTILS_MD5		:= 018ceb214d27bb9ad237274de8307112 
+CUTILS_URL		:= https://github.com/goToMain/c-utils/archive/$(CUTILS_VERSION).zip
+CUTILS_SOURCE		:= $(SRCDIR)/c-utils-$(CUTILS_VERSION).zip
+CUTILS_DIR		:= $(LIBOSDP_DIR)/utils/
+
+LIBOSDP_PARTS		+= \
+	CUTILS
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+LIBOSDP_CONF_TOOL	:= cmake
+LIBOSDP_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DCONFIG_OSDP_LIB_ONLY=y
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libosdp.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libosdp)
+	@$(call install_fixup, libosdp, PRIORITY, optional)
+	@$(call install_fixup, libosdp, SECTION, base)
+	@$(call install_fixup, libosdp, AUTHOR, "Rouven Czerwinski <r.czerwinski@pengutronix.de>")
+	@$(call install_fixup, libosdp, DESCRIPTION, missing)
+
+	@$(call install_lib, libosdp, 0, 0, 0755, libosdp)
+
+	@$(call install_copy, libosdp, 0, 0, 0755, -, /usr/bin/osdpctl)
+
+	@$(call install_finish, libosdp)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] libosdp: new package
  2025-01-23  6:17 [ptxdist] [PATCH v2] libosdp: new package Rouven Czerwinski
@ 2025-01-27  8:35 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-01-27  8:35 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Thanks, applied as 89e83b0615d73a8587aef8acae581c78b52ed919.

Michael

[sent from post-receive hook]

On Mon, 27 Jan 2025 09:35:10 +0100, Rouven Czerwinski <r.czerwinski@pengutronix.de> wrote:
> Add libosdp for support of the osdp protocol. Add a patch to build the
> osdpctl program without the rest of the utilities, it is otherwise not
> possible to build osdpctl without the python bindings.
> 
> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> Message-Id: <20250123061757.2589212-1-r.czerwinski@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch b/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch
> new file mode 100644
> index 000000000000..7f1c53cceb7e
> --- /dev/null
> +++ b/patches/libosdp-2.4.0/0001-CMakeLists-build-ospdctl-in-library-mode.patch
> @@ -0,0 +1,29 @@
> +From dbf9ac4f156f545c233e3259995c00413c68ba3f Mon Sep 17 00:00:00 2001
> +From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> +Date: Fri, 1 Mar 2024 12:11:20 +0100
> +Subject: [PATCH] CMakeLists: build ospdctl in library mode
> +
> +Also build osdpctl when only the library parts are build.
> +
> +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 1efeb4b..e844b5c 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -40,8 +40,8 @@ option(CONFIG_OSDP_LIB_ONLY "Only build the library" OFF)
> + include(GitSubmodules)
> + add_subdirectory(utils)
> + add_subdirectory(src)
> ++add_subdirectory(osdpctl)
> + if (NOT CONFIG_OSDP_STATIC_PD AND NOT CONFIG_OSDP_LIB_ONLY)
> +-	add_subdirectory(osdpctl)
> + 	add_subdirectory(tests/pytest)
> + 	add_subdirectory(tests/unit-tests)
> + 	add_subdirectory(samples/c)
> +-- 
> +2.43.1
> +
> diff --git a/patches/libosdp-2.4.0/series b/patches/libosdp-2.4.0/series
> new file mode 100644
> index 000000000000..fad17c996510
> --- /dev/null
> +++ b/patches/libosdp-2.4.0/series
> @@ -0,0 +1 @@
> +0001-CMakeLists-build-ospdctl-in-library-mode.patch
> diff --git a/rules/libosdp.in b/rules/libosdp.in
> new file mode 100644
> index 000000000000..336fd01b1e79
> --- /dev/null
> +++ b/rules/libosdp.in
> @@ -0,0 +1,9 @@
> +## SECTION=system_libraries
> +
> +config LIBOSDP
> +	bool
> +	prompt "libosdp"
> +	select HOST_CMAKE
> +	select OPENSSL
> +	help
> +	  OSDP (Open Supervised Device Protocol) library and osdpctl cli.
> diff --git a/rules/libosdp.make b/rules/libosdp.make
> new file mode 100644
> index 000000000000..9b66fa8dfe76
> --- /dev/null
> +++ b/rules/libosdp.make
> @@ -0,0 +1,69 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2023 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBOSDP) += libosdp
> +
> +#
> +# Paths and names
> +#
> +LIBOSDP_VERSION		:= 2.4.0
> +LIBOSDP_MD5		:= 14484c746fa28a4a0005e893279bd8ec
> +LIBOSDP			:= libosdp-$(LIBOSDP_VERSION)
> +LIBOSDP_SUFFIX		:= tar.gz
> +LIBOSDP_URL		:= https://github.com/goToMain/libosdp/archive/v$(LIBOSDP_VERSION).$(LIBOSDP_SUFFIX)
> +LIBOSDP_SOURCE		:= $(SRCDIR)/$(LIBOSDP).$(LIBOSDP_SUFFIX)
> +LIBOSDP_DIR		:= $(BUILDDIR)/$(LIBOSDP)
> +LIBOSDP_LICENSE		:= Apache-2.0
> +LIBOSDP_LICENSE_FILES	:= file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327
> +
> +CUTILS_VERSION		:= 7d5cb004258b8b8a195b63ad15177ff196cefd08
> +CUTILS_MD5		:= 018ceb214d27bb9ad237274de8307112 
> +CUTILS_URL		:= https://github.com/goToMain/c-utils/archive/$(CUTILS_VERSION).zip
> +CUTILS_SOURCE		:= $(SRCDIR)/c-utils-$(CUTILS_VERSION).zip
> +CUTILS_DIR		:= $(LIBOSDP_DIR)/utils/
> +
> +LIBOSDP_PARTS		+= \
> +	CUTILS
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# cmake
> +#
> +LIBOSDP_CONF_TOOL	:= cmake
> +LIBOSDP_CONF_OPT	:= \
> +	$(CROSS_CMAKE_USR) \
> +	-DCONFIG_OSDP_LIB_ONLY=y
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libosdp.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libosdp)
> +	@$(call install_fixup, libosdp, PRIORITY, optional)
> +	@$(call install_fixup, libosdp, SECTION, base)
> +	@$(call install_fixup, libosdp, AUTHOR, "Rouven Czerwinski <r.czerwinski@pengutronix.de>")
> +	@$(call install_fixup, libosdp, DESCRIPTION, missing)
> +
> +	@$(call install_lib, libosdp, 0, 0, 0755, libosdp)
> +
> +	@$(call install_copy, libosdp, 0, 0, 0755, -, /usr/bin/osdpctl)
> +
> +	@$(call install_finish, libosdp)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-27  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-23  6:17 [ptxdist] [PATCH v2] libosdp: new package Rouven Czerwinski
2025-01-27  8:35 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox