mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2] libiio: new package
Date: Mon, 14 Jan 2019 10:28:18 +0100	[thread overview]
Message-ID: <20190114092818.GB9667@lenoch> (raw)

Only local backend is supported for now.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Changes:
 -v2: bump version to 0.17, add options to install test binaries

 rules/libiio.in   | 34 +++++++++++++++++++
 rules/libiio.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 118 insertions(+)
 create mode 100644 rules/libiio.in
 create mode 100644 rules/libiio.make

diff --git a/rules/libiio.in b/rules/libiio.in
new file mode 100644
index 000000000..b1d8f9038
--- /dev/null
+++ b/rules/libiio.in
@@ -0,0 +1,34 @@
+## SECTION=system_libraries
+
+menuconfig LIBIIO
+	tristate
+	prompt "libiio                        "
+	select HOST_CMAKE
+	help
+	  A cross platform library for interfacing with local and
+	  remote Linux IIO devices.
+
+if LIBIIO
+
+config LIBIIO_ADI_XFLOW_CHECK
+	bool "install iio_adi_xflow_check"
+
+config LIBIIO_ATTR
+	bool "install iio_attr"
+
+config LIBIIO_GENXML
+	bool "install iio_genxml"
+
+config LIBIIO_INFO
+	bool "install iio_info"
+
+config LIBIIO_READDEV
+	bool "install iio_readdev"
+
+config LIBIIO_REG
+	bool "install iio_reg"
+
+config LIBIIO_WRITEDEV
+	bool "install iio_writedev"
+
+endif
diff --git a/rules/libiio.make b/rules/libiio.make
new file mode 100644
index 000000000..2a621eae7
--- /dev/null
+++ b/rules/libiio.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Ladislav Michl <ladis@linux-mips.org>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBIIO) += libiio
+
+#
+# Paths and names
+#
+LIBIIO_VERSION	:= 0.17
+LIBIIO_MD5	:= 05a45aad2d50ef8c8a015d0caaf3802d
+LIBIIO		:= libiio-$(LIBIIO_VERSION)
+LIBIIO_SUFFIX	:= tar.gz
+LIBIIO_URL	:= https://github.com/analogdevicesinc/libiio/archive/v$(LIBIIO_VERSION).$(LIBIIO_SUFFIX)
+LIBIIO_SOURCE	:= $(SRCDIR)/$(LIBIIO).$(LIBIIO_SUFFIX)
+LIBIIO_DIR	:= $(BUILDDIR)/$(LIBIIO)
+LIBIIO_LICENSE	:= LGPL-2.1-only
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBIIO_TESTS-y					:=
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_ADI_XFLOW_CHECK)	+= iio_adi_xflow_check
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_ATTR)		+= iio_attr
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_GENXML)		+= iio_genxml
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_INFO)		+= iio_info
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_READDEV)		+= iio_readdev
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_REG)		+= iio_reg
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_WRITEDEV)		+= iio_writedev
+
+ifneq ($(strip $(LIBIIO_TESTS-y)),)
+LIBIIO_TESTS := y
+endif
+
+LIBIIO_CONF_TOOL	:= cmake
+LIBIIO_CONF_OPT		:= \
+	$(CROSS_CMAKE_USR) \
+	-DENABLE_IPV6=$(call ptx/onoff, PTXCONF_GLOBAL_IPV6) \
+	-DWITH_DOC=OFF \
+	-DWITH_IIOD=OFF \
+	-DWITH_LOCAL_BACKEND=ON \
+	-DWITH_LOCAL_CONFIG=OFF \
+	-DWITH_XML_BACKEND=OFF \
+	-DWITH_USB_BACKEND=OFF \
+	-DWITH_SERIAL_BACKEND=OFF \
+	-DWITH_NETWORK_BACKEND=OFF \
+	-DWITH_MATLAB_BINDINGS_API=OFF \
+	-DPYTHON_BINDINGS=OFF \
+	-DCSHARP_BINDINGS=OFF \
+	-DWITH_TESTS=$(call ptx/onoff, LIBIIO_TESTS)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libiio.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libiio)
+	@$(call install_fixup, libiio, PRIORITY, optional)
+	@$(call install_fixup, libiio, SECTION, base)
+	@$(call install_fixup, libiio, AUTHOR, "Ladislav Michl <ladis@linux-mips.org>")
+	@$(call install_fixup, libiio, DESCRIPTION, missing)
+
+	@$(call install_lib, libiio, 0, 0, 0644, libiio)
+
+	@$(foreach bin, $(LIBIIO_TESTS-y), \
+		$(call install_copy, libiio, 0, 0, 0755, -, /usr/bin/$(bin));)
+
+	@$(call install_finish, libiio)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2019-01-14  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  9:28 Ladislav Michl [this message]
2019-01-16 15:30 ` Michael Olbrich
2019-01-16 15:32   ` 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=20190114092818.GB9667@lenoch \
    --to=ladis@linux-mips.org \
    --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