The host package will be used for qemu in the next commit.

Signed-off-by: Roland Hieber <r...@pengutronix.de>
---
 rules/host-libslirp.in   |  7 +++++
 rules/host-libslirp.make | 23 ++++++++++++++++
 rules/libslirp.in        | 10 +++++++
 rules/libslirp.make      | 58 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 98 insertions(+)
 create mode 100644 rules/host-libslirp.in
 create mode 100644 rules/host-libslirp.make
 create mode 100644 rules/libslirp.in
 create mode 100644 rules/libslirp.make

diff --git a/rules/host-libslirp.in b/rules/host-libslirp.in
new file mode 100644
index 000000000000..d0a9f211f89a
--- /dev/null
+++ b/rules/host-libslirp.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_LIBSLIRP
+       tristate
+       select HOST_GLIB
+       select HOST_MESON
+       prompt "libslirp"
diff --git a/rules/host-libslirp.make b/rules/host-libslirp.make
new file mode 100644
index 000000000000..de2af49fb9bd
--- /dev/null
+++ b/rules/host-libslirp.make
@@ -0,0 +1,23 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Roland Hieber <r...@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_LIBSLIRP) += host-libslirp
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# meson
+#
+HOST_LIBSLIRP_CONF_TOOL        := meson
+
+# vim: syntax=make
diff --git a/rules/libslirp.in b/rules/libslirp.in
new file mode 100644
index 000000000000..a078775a1887
--- /dev/null
+++ b/rules/libslirp.in
@@ -0,0 +1,10 @@
+## SECTION=networking
+
+config LIBSLIRP
+       tristate
+       select HOST_MESON
+       select GLIB
+       prompt "libslirp"
+       help
+         libslirp is a user-mode networking library used by virtual machines,
+         containers or various tools, like qemu.
diff --git a/rules/libslirp.make b/rules/libslirp.make
new file mode 100644
index 000000000000..232241da2b96
--- /dev/null
+++ b/rules/libslirp.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Roland Hieber <r...@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBSLIRP) += libslirp
+
+#
+# Paths and names
+#
+LIBSLIRP_VERSION       := 4.7.0
+LIBSLIRP_MD5           := b815c4de99265559caf5ef635a213609
+LIBSLIRP               := libslirp-v$(LIBSLIRP_VERSION)
+LIBSLIRP_SUFFIX                := tar.bz2
+LIBSLIRP_URL           := 
https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.7.0/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
+LIBSLIRP_SOURCE                := $(SRCDIR)/$(LIBSLIRP).$(LIBSLIRP_SUFFIX)
+LIBSLIRP_DIR           := $(BUILDDIR)/$(LIBSLIRP)
+LIBSLIRP_LICENSE       := BSD-3-Clause AND MIT
+LIBSLIRP_LICENSE_FILES := \
+       file://src/main.h;endline=4;md5=1e742c49b6e4dd48549742f8727faceb \
+       file://src/slirp.c;endline=24;md5=1e11fddaa17f36215c1697d4bad0e70a \
+       file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# meson
+#
+LIBSLIRP_CONF_TOOL     := meson
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libslirp.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, libslirp)
+       @$(call install_fixup, libslirp,PRIORITY,optional)
+       @$(call install_fixup, libslirp,SECTION,base)
+       @$(call install_fixup, libslirp,AUTHOR,"Roland Hieber 
<r...@pengutronix.de>")
+       @$(call install_fixup, libslirp,DESCRIPTION,missing)
+
+       @$(call install_lib, libslirp, 0, 0, 0644, libslirp)
+
+       @$(call install_finish, libslirp)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.30.2


Reply via email to