From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 1/2] libwebsockets: new package
Date: Mon, 13 May 2024 11:11:04 +0200 [thread overview]
Message-ID: <ZkHZKIxjMvmxDcKV@pengutronix.de> (raw)
In-Reply-To: <20240510090419.4399-2-abbotti@mev.co.uk>
On Fri, May 10, 2024 at 09:58:47AM +0100, Ian Abbott wrote:
> Includes the C library from the Libwebsockets (LWS) project, with
> options for adding TLS (SSL) support, and options the adding various
> event loop libraries that are dynamically loaded as plug-ins.
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> rules/libwebsockets.in | 56 ++++++++++++++++++++++++++
> rules/libwebsockets.make | 85 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 141 insertions(+)
> create mode 100644 rules/libwebsockets.in
> create mode 100644 rules/libwebsockets.make
>
> diff --git a/rules/libwebsockets.in b/rules/libwebsockets.in
> new file mode 100644
> index 000000000..e10413604
> --- /dev/null
> +++ b/rules/libwebsockets.in
> @@ -0,0 +1,56 @@
> +## SECTION=networking
> +
> +menuconfig LIBWEBSOCKETS
> + tristate
> + select HOST_CMAKE
> + select ZLIB
> + select LIBCAP
> + select OPENSSL if LIBWEBSOCKETS_TLS
> + select LIBEV if LIBWEBSOCKETS_LIBEV
> + select LIBUV if LIBWEBSOCKETS_LIBUV
> + select LIBEVENT if LIBWEBSOCKETS_LIBEVENT
> + select GLIB if LIBWEBSOCKETS_GLIB
> + prompt "libwebsockets "
> + help
> + Libwebsockets is a lightweight pure C library for both
> + websockets clients and servers built to use minimal CPU
> + and memory resources and provide fast throughput in both
> + directions.
> +
> +if LIBWEBSOCKETS
> +
> +config LIBWEBSOCKETS_TLS
> + bool
> + prompt "TLS (SSL) support"
> + help
> + Turn on to include TLS (SSL) support.
> +
> +menuconfig LIBWEBSOCKETS_EVLIB
> + bool
> + prompt "Event library options "
> + help
> + Turn on to enable various event library plug-ins.
> +
> +if LIBWEBSOCKETS_EVLIB
> +
> +config LIBWEBSOCKETS_LIBEV
> + bool
> + prompt "compile with support for libev"
> +
> +config LIBWEBSOCKETS_LIBUV
> + bool
> + prompt "compile with support for libuv"
> +
> +config LIBWEBSOCKETS_LIBEVENT
> + bool
> + prompt "compile with support for libevent"
> +
> +config LIBWEBSOCKETS_GLIB
> + bool
> + prompt "compile with support for glib event loop"
> +
> +endif
> +
> +endif
> +
> +# vim: ft=kconfig noet tw=72
> diff --git a/rules/libwebsockets.make b/rules/libwebsockets.make
> new file mode 100644
> index 000000000..4e22e9c18
> --- /dev/null
> +++ b/rules/libwebsockets.make
> @@ -0,0 +1,85 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2024 by Ian Abbott <abbotti@mev.co.uk>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBWEBSOCKETS) += libwebsockets
> +
> +#
> +# Paths and names
> +#
> +LIBWEBSOCKETS_VERSION := 4.3.3
> +LIBWEBSOCKETS_MD5 := 877f457d059718a7eafdaf8db5d7abbb
> +LIBWEBSOCKETS := libwebsockets-v$(LIBWEBSOCKETS_VERSION)
> +LIBWEBSOCKETS_SUFFIX := tar.bz2
> +LIBWEBSOCKETS_URL := https://libwebsockets.org/git/libwebsockets/snapshot/$(LIBWEBSOCKETS).$(LIBWEBSOCKETS_SUFFIX)
Hmmm, the URL does not work properly for me. The md5sum is different and
bzip2 reports "bzip2: Compressed file ends unexpectedly;".
Michael
> +LIBWEBSOCKETS_SOURCE := $(SRCDIR)/$(LIBWEBSOCKETS).$(LIBWEBSOCKETS_SUFFIX)
> +LIBWEBSOCKETS_DIR := $(BUILDDIR)/$(LIBWEBSOCKETS)
> +LIBWEBSOCKETS_LICENSE := MIT AND BSD-2-Clause AND BSD-3-Clause
> +LIBWEBSOCKETS_LICENSE_FILES := file://LICENSE;md5=382bfdf329e774859fd401eaf850d29b
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# cmake
> +#
> +LIBWEBSOCKETS_CONF_TOOL := cmake
> +LIBWEBSOCKETS_CONF_OPT := \
> + $(CROSS_CMAKE_USR) \
> + -DLWS_WITHOUT_DAEMONIZE=OFF \
> + -DLWS_WITH_ZLIB=ON \
> + -DLWS_WITH_SSL=$(call ptx/onoff, PTXCONF_LIBWEBSOCKETS_TLS) \
> + -DLWS_WITH_LIBEV=$(call ptx/onoff, PTXCONF_LIBWEBSOCKETS_LIBEV) \
> + -DLWS_WITH_LIBUV=$(call ptx/onoff, PTXCONF_LIBWEBSOCKETS_LIBUV) \
> + -DLWS_WITH_LIBEVENT=$(call ptx/onoff, PTXCONF_LIBWEBSOCKETS_LIBEVENT) \
> + -DLWS_WITH_GLIB=$(call ptx/onoff, PTXCONF_LIBWEBSOCKETS_GLIB) \
> + -DLWS_WITHOUT_TESTAPPS=ON \
> + -DLWS_WITHOUT_TEST_PING=ON \
> + -DLWS_WITHOUT_TEST_CLIENT=ON \
> + -DLWS_WITHOUT_EXTENSIONS=OFF \
> + -DLWS_WITH_EXTERNAL_POLL=ON \
> + -DLWS_IPV6=$(call ptx/onoff, PTXCONF_GLOBAL_IPV6)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libwebsockets.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, libwebsockets)
> + @$(call install_fixup, libwebsockets,PRIORITY,optional)
> + @$(call install_fixup, libwebsockets,SECTION,base)
> + @$(call install_fixup, libwebsockets,AUTHOR,"Ian Abbott <abbotti@mev.co.uk>")
> + @$(call install_fixup, libwebsockets,DESCRIPTION,missing)
> +
> +# libraries
> + @$(call install_lib, libwebsockets, 0, 0, 0644, libwebsockets)
> +
> +# plug-in libraries
> +ifdef PTXCONF_LIBWEBSOCKETS_LIBEV
> + @$(call install_lib, libwebsockets, 0, 0, 0644, libwebsockets-evlib_ev)
> +endif
> +ifdef PTXCONF_LIBWEBSOCKETS_LIBUV
> + @$(call install_lib, libwebsockets, 0, 0, 0644, libwebsockets-evlib_uv)
> +endif
> +ifdef PTXCONF_LIBWEBSOCKETS_LIBEVENT
> + @$(call install_lib, libwebsockets, 0, 0, 0644, libwebsockets-evlib_event)
> +endif
> +ifdef PTXCONF_LIBWEBSOCKETS_GLIB
> + @$(call install_lib, libwebsockets, 0, 0, 0644, libwebsockets-evlib_glib)
> +endif
> +
> + @$(call install_finish, libwebsockets)
> +
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 2.43.0
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-05-13 9:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 8:58 [ptxdist] [PATCH 0/2] Add WebSocket support to Mosquitto Ian Abbott
2024-05-10 8:58 ` [ptxdist] [PATCH 1/2] libwebsockets: new package Ian Abbott
2024-05-13 9:11 ` Michael Olbrich [this message]
2024-05-13 9:20 ` Ian Abbott
2024-05-10 8:58 ` [ptxdist] [PATCH 2/2] mosquitto: Add optional WebSocket support Ian Abbott
2024-05-13 10:36 ` [ptxdist] [PATCH v2 0/2] Add WebSocket support to Mosquitto Ian Abbott
2024-05-13 10:36 ` [ptxdist] [PATCH v2 1/2] libwebsockets: new package Ian Abbott
2024-05-31 6:08 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-13 10:36 ` [ptxdist] [PATCH v2 2/2] mosquitto: Add optional WebSocket support Ian Abbott
2024-05-31 6:08 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZkHZKIxjMvmxDcKV@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=abbotti@mev.co.uk \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox