* [Buildroot] [PATCH v2] libiio: new package
@ 2014-09-18 9:44 Paul Cercueil
2014-09-21 19:41 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Paul Cercueil @ 2014-09-18 9:44 UTC (permalink / raw)
To: buildroot
Libiio is a library to ease the development of software interfacing
Linux Industrial I/O (IIO) devices.
http://wiki.analog.com/resources/tools-software/linux-software/libiio
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
---
package/Config.in | 1 +
package/libiio/Config.in | 42 ++++++++++++++++++++++++++
package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 119 insertions(+)
create mode 100644 package/libiio/Config.in
create mode 100644 package/libiio/libiio.mk
diff --git a/package/Config.in b/package/Config.in
index 73ba86a..487b948 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -665,6 +665,7 @@ menu "Hardware handling"
source "package/libfreefare/Config.in"
source "package/libftdi/Config.in"
source "package/libhid/Config.in"
+ source "package/libiio/Config.in"
source "package/libinput/Config.in"
source "package/libiqrf/Config.in"
source "package/libllcp/Config.in"
diff --git a/package/libiio/Config.in b/package/libiio/Config.in
new file mode 100644
index 0000000..b1f1e4c
--- /dev/null
+++ b/package/libiio/Config.in
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_LIBIIO
+ bool "libiio"
+ help
+ Libiio is a library to ease the development of software interfacing
+ Linux Industrial I/O (IIO) devices.
+
+ http://wiki.analog.com/resources/tools-software/linux-software/libiio
+
+if BR2_PACKAGE_LIBIIO
+
+config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ bool "Local backend"
+ default y
+ help
+ Enable the local backend of the library.
+
+config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
+ bool "Network backend"
+ select BR2_PACKAGE_LIBXML2
+ default y
+ help
+ Enable the network backend of the library.
+
+config BR2_PACKAGE_LIBIIO_IIOD
+ bool "IIO Daemon"
+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ default y
+ help
+ Install the IIO Daemon.
+
+comment "IIO Daemon needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBIIO_TESTS
+ bool "Install test programs"
+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ select BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
+ help
+ Install the test programs (iio_info, iio_genxml, iio_readdev).
+
+endif
diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk
new file mode 100644
index 0000000..2bfe8d9
--- /dev/null
+++ b/package/libiio/libiio.mk
@@ -0,0 +1,76 @@
+################################################################################
+#
+# libiio
+#
+################################################################################
+
+LIBIIO_VERSION = 2014_R1
+LIBIIO_SITE = $(call github,analogdevicesinc,libiio,$(LIBIIO_VERSION))
+LIBIIO_INSTALL_STAGING = YES
+LIBIIO_LICENSE = LGPLv2.1+
+LIBIIO_LICENSE_FILES = COPYING
+
+LIBIIO_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) VERSION_GIT=$(LIBIIO_VERSION)
+
+# Avahi support in libiio requires avahi-client,
+# which needs avahi-daemon and dbus
+ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
+ LIBIIO_DEPENDENCIES += avahi
+else
+ LIBIIO_MAKE_OPTS += WITH_AVAHI=no
+endif
+
+ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y)
+ LIBIIO_MAKE_OPTS += WITH_LOCAL_BACKEND=no
+endif
+
+ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y)
+ LIBIIO_DEPENDENCIES += libxml2
+else
+ LIBIIO_MAKE_OPTS += WITH_NETWORK_BACKEND=no
+endif
+
+# Libiio can run without threads
+ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+ LIBIIO_MAKE_OPTS += WITH_PTHREAD=no
+endif
+
+ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
+define LIBIIO_BUILD_IIOD
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod $(LIBIIO_MAKE_OPTS)
+endef
+define LIBIIO_INSTALL_IIOD
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod install \
+ $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
+define LIBIIO_BUILD_TESTS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests $(LIBIIO_MAKE_OPTS)
+endef
+define LIBIIO_INSTALL_TESTS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests install \
+ $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
+endef
+endif
+
+define LIBIIO_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) libiio $(LIBIIO_MAKE_OPTS)
+ $(LIBIIO_BUILD_IIOD)
+ $(LIBIIO_BUILD_TESTS)
+endef
+
+define LIBIIO_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-sysroot \
+ $(LIBIIO_MAKE_OPTS) DESTDIR=$(STAGING_DIR)
+endef
+
+define LIBIIO_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-lib \
+ $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
+ $(LIBIIO_INSTALL_IIOD)
+ $(LIBIIO_INSTALL_TESTS)
+endef
+
+$(eval $(generic-package))
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] libiio: new package
2014-09-18 9:44 [Buildroot] [PATCH v2] libiio: new package Paul Cercueil
@ 2014-09-21 19:41 ` Thomas Petazzoni
2014-09-22 7:49 ` Paul Cercueil
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-09-21 19:41 UTC (permalink / raw)
To: buildroot
Dear Paul Cercueil,
On Thu, 18 Sep 2014 11:44:27 +0200, Paul Cercueil wrote:
> Libiio is a library to ease the development of software interfacing
> Linux Industrial I/O (IIO) devices.
>
> http://wiki.analog.com/resources/tools-software/linux-software/libiio
>
> Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
> ---
> package/Config.in | 1 +
> package/libiio/Config.in | 42 ++++++++++++++++++++++++++
> package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 119 insertions(+)
> create mode 100644 package/libiio/Config.in
> create mode 100644 package/libiio/libiio.mk
Thanks. However, I tested your package, and it fails to build:
make[1]: entrant dans le r?pertoire ? /home/thomas/projets/buildroot/output/build/libiio-2014_R1/iiod ?
install --strip-program=/home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-strip -D -s -m 0755 \
iiod /home/thomas/projets/buildroot/output/target/usr/sbin/iiod
install -m 0755 iiod.sh /home/thomas/projets/buildroot/output/target/etc/init.d/iiod.sh
update-rc.d iiod.sh defaults 99 01
update-rc.d: /etc/init.d/iiod.sh: file does not exist
make[1]: *** [install] Erreur 1
First, the Makefile should not be calling update-rc.d, and also the
init script in /etc/init.d/ should not be named iiod.sh in Buildroot,
but directly S<number><name>.
Also, is the install command with stripping is not good for Buildroot:
we want to control whether stripping happens or not.
> +# Avahi support in libiio requires avahi-client,
> +# which needs avahi-daemon and dbus
> +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
> + LIBIIO_DEPENDENCIES += avahi
> +else
> + LIBIIO_MAKE_OPTS += WITH_AVAHI=no
> +endif
> +
> +ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y)
> + LIBIIO_MAKE_OPTS += WITH_LOCAL_BACKEND=no
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y)
> + LIBIIO_DEPENDENCIES += libxml2
> +else
> + LIBIIO_MAKE_OPTS += WITH_NETWORK_BACKEND=no
> +endif
> +
> +# Libiio can run without threads
> +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> + LIBIIO_MAKE_OPTS += WITH_PTHREAD=no
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
> +define LIBIIO_BUILD_IIOD
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod $(LIBIIO_MAKE_OPTS)
> +endef
> +define LIBIIO_INSTALL_IIOD
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod install \
> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
> +endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
> +define LIBIIO_BUILD_TESTS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests $(LIBIIO_MAKE_OPTS)
> +endef
> +define LIBIIO_INSTALL_TESTS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests install \
> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
> +endef
> +endif
Now that I think of it, you could also do:
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
LIBIIO_MAKE_DIRS += iiod
endif
ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
LIBIIO_MAKE_DIRS += tests
endif
> +define LIBIIO_BUILD_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) libiio $(LIBIIO_MAKE_OPTS)
> + $(LIBIIO_BUILD_IIOD)
> + $(LIBIIO_BUILD_TESTS)
Replace those last two lines with:
for d in $(LIBIIO_MAKE_DIRS); do \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d $(LIBIIO_MAKE_OPTS) || break ; \
done
> +define LIBIIO_INSTALL_STAGING_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-sysroot \
> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(STAGING_DIR)
> +endef
> +
> +define LIBIIO_INSTALL_TARGET_CMDS
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-lib \
> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
> + $(LIBIIO_INSTALL_IIOD)
> + $(LIBIIO_INSTALL_TESTS)
And ditto here.
Note that the Makefile of libiio could make this a little bit nicer by
having a build and installation scheme that is easy to work with
several make targets.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] libiio: new package
2014-09-21 19:41 ` Thomas Petazzoni
@ 2014-09-22 7:49 ` Paul Cercueil
0 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2014-09-22 7:49 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Allright, thank you for your comments. I'll come with something better.
Regards,
Paul
On 21/09/2014 21:41, Thomas Petazzoni wrote:
> Dear Paul Cercueil,
>
> On Thu, 18 Sep 2014 11:44:27 +0200, Paul Cercueil wrote:
>> Libiio is a library to ease the development of software interfacing
>> Linux Industrial I/O (IIO) devices.
>>
>> http://wiki.analog.com/resources/tools-software/linux-software/libiio
>>
>> Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
>> ---
>> package/Config.in | 1 +
>> package/libiio/Config.in | 42 ++++++++++++++++++++++++++
>> package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 119 insertions(+)
>> create mode 100644 package/libiio/Config.in
>> create mode 100644 package/libiio/libiio.mk
>
> Thanks. However, I tested your package, and it fails to build:
>
> make[1]: entrant dans le r?pertoire ? /home/thomas/projets/buildroot/output/build/libiio-2014_R1/iiod ?
> install --strip-program=/home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-strip -D -s -m 0755 \
> iiod /home/thomas/projets/buildroot/output/target/usr/sbin/iiod
> install -m 0755 iiod.sh /home/thomas/projets/buildroot/output/target/etc/init.d/iiod.sh
> update-rc.d iiod.sh defaults 99 01
> update-rc.d: /etc/init.d/iiod.sh: file does not exist
> make[1]: *** [install] Erreur 1
>
> First, the Makefile should not be calling update-rc.d, and also the
> init script in /etc/init.d/ should not be named iiod.sh in Buildroot,
> but directly S<number><name>.
>
> Also, is the install command with stripping is not good for Buildroot:
> we want to control whether stripping happens or not.
>
>
>> +# Avahi support in libiio requires avahi-client,
>> +# which needs avahi-daemon and dbus
>> +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
>> + LIBIIO_DEPENDENCIES += avahi
>> +else
>> + LIBIIO_MAKE_OPTS += WITH_AVAHI=no
>> +endif
>> +
>> +ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y)
>> + LIBIIO_MAKE_OPTS += WITH_LOCAL_BACKEND=no
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y)
>> + LIBIIO_DEPENDENCIES += libxml2
>> +else
>> + LIBIIO_MAKE_OPTS += WITH_NETWORK_BACKEND=no
>> +endif
>> +
>> +# Libiio can run without threads
>> +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
>> + LIBIIO_MAKE_OPTS += WITH_PTHREAD=no
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
>> +define LIBIIO_BUILD_IIOD
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod $(LIBIIO_MAKE_OPTS)
>> +endef
>> +define LIBIIO_INSTALL_IIOD
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod install \
>> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
>> +endef
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
>> +define LIBIIO_BUILD_TESTS
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests $(LIBIIO_MAKE_OPTS)
>> +endef
>> +define LIBIIO_INSTALL_TESTS
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests install \
>> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
>> +endef
>> +endif
>
> Now that I think of it, you could also do:
>
> ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
> LIBIIO_MAKE_DIRS += iiod
> endif
>
> ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
> LIBIIO_MAKE_DIRS += tests
> endif
>
>> +define LIBIIO_BUILD_CMDS
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) libiio $(LIBIIO_MAKE_OPTS)
>> + $(LIBIIO_BUILD_IIOD)
>> + $(LIBIIO_BUILD_TESTS)
>
> Replace those last two lines with:
>
> for d in $(LIBIIO_MAKE_DIRS); do \
> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d $(LIBIIO_MAKE_OPTS) || break ; \
> done
>
>> +define LIBIIO_INSTALL_STAGING_CMDS
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-sysroot \
>> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(STAGING_DIR)
>> +endef
>> +
>> +define LIBIIO_INSTALL_TARGET_CMDS
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-lib \
>> + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR)
>> + $(LIBIIO_INSTALL_IIOD)
>> + $(LIBIIO_INSTALL_TESTS)
>
> And ditto here.
>
> Note that the Makefile of libiio could make this a little bit nicer by
> having a build and installation scheme that is easy to work with
> several make targets.
>
> Thanks!
>
> Thomas
>
--
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, William A. Martin, Margaret Seif
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] libiio: new package
@ 2014-11-07 13:49 Paul Cercueil
0 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2014-11-07 13:49 UTC (permalink / raw)
To: buildroot
Libiio is a library to ease the development of software interfacing
Linux Industrial I/O (IIO) devices.
http://wiki.analog.com/resources/tools-software/linux-software/libiio
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
---
package/Config.in | 1 +
package/libiio/Config.in | 43 +++++++++++++++++++++++++++++++++++++++++++
package/libiio/S99iiod.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
package/libiio/libiio.mk | 43 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 129 insertions(+)
create mode 100644 package/libiio/Config.in
create mode 100644 package/libiio/S99iiod.sh
create mode 100644 package/libiio/libiio.mk
diff --git a/package/Config.in b/package/Config.in
index 89b46dc..a041476 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -680,6 +680,7 @@ menu "Hardware handling"
source "package/libfreefare/Config.in"
source "package/libftdi/Config.in"
source "package/libhid/Config.in"
+ source "package/libiio/Config.in"
source "package/libinput/Config.in"
source "package/libiqrf/Config.in"
source "package/libllcp/Config.in"
diff --git a/package/libiio/Config.in b/package/libiio/Config.in
new file mode 100644
index 0000000..4bded41
--- /dev/null
+++ b/package/libiio/Config.in
@@ -0,0 +1,43 @@
+config BR2_PACKAGE_LIBIIO
+ bool "libiio"
+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
+ help
+ Libiio is a library to ease the development of software interfacing
+ Linux Industrial I/O (IIO) devices.
+
+ http://wiki.analog.com/resources/tools-software/linux-software/libiio
+
+if BR2_PACKAGE_LIBIIO
+
+config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ bool "Local backend"
+ default y
+ help
+ Enable the local backend of the library.
+
+config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
+ bool "Network backend"
+ select BR2_PACKAGE_LIBXML2
+ default y
+ help
+ Enable the network backend of the library.
+
+config BR2_PACKAGE_LIBIIO_IIOD
+ bool "IIO Daemon"
+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ default y
+ help
+ Install the IIO Daemon.
+
+comment "IIO Daemon needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBIIO_TESTS
+ bool "Install test programs"
+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
+ select BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
+ help
+ Install the test programs (iio_info, iio_genxml, iio_readdev).
+
+endif
diff --git a/package/libiio/S99iiod.sh b/package/libiio/S99iiod.sh
new file mode 100644
index 0000000..f900999
--- /dev/null
+++ b/package/libiio/S99iiod.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# Server-side demuxing by default
+IIOD_OPTS=-D
+
+[ -r /etc/default/iiod ] && . /etc/default/iiod
+
+case "$1" in
+ start)
+ echo "Starting IIO Server Daemon"
+ start-stop-daemon -S -b -q -m -p /var/run/iiod.pid -x /usr/sbin/iiod -- $IIOD_OPTS
+ exit $?
+ ;;
+
+ stop)
+ echo "Stopping IIO Server Daemon"
+ start-stop-daemon -K -q -p /var/run/iiod.pid 2>/dev/null
+ exit $?
+ ;;
+
+ status)
+ RET=1
+ if [ -f /var/run/iiod.pid ] ; then
+ kill -0 `cat /var/run/iiod.pid` >/dev/null 2>&1
+ RET=$?
+ fi
+
+ if [ $RET -eq 0 ] ; then
+ echo "iiod is running"
+ else
+ echo "iiod is NOT running"
+ fi
+
+ return $RET
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|status}"
+ exit 1
+esac
+
+exit 0
diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk
new file mode 100644
index 0000000..104b9d4
--- /dev/null
+++ b/package/libiio/libiio.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# libiio
+#
+################################################################################
+
+LIBIIO_VERSION = v0.2
+LIBIIO_SITE = $(call github,analogdevicesinc,libiio,$(LIBIIO_VERSION))
+LIBIIO_INSTALL_STAGING = YES
+LIBIIO_LICENSE = LGPLv2.1+
+LIBIIO_LICENSE_FILES = COPYING
+
+# Avahi support in libiio requires avahi-client, which needs avahi-daemon
+ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
+LIBIIO_DEPENDENCIES += avahi
+endif
+
+ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y)
+LIBIIO_CONF_OPTS += -DWITH_LOCAL_BACKEND=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y)
+LIBIIO_DEPENDENCIES += libxml2
+else
+LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=OFF
+endif
+
+ifneq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
+LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF
+else
+define LIBIIO_INSTALL_STARTUP_SCRIPT
+ $(INSTALL) -D -m 0755 package/libiio/S99iiod.sh \
+ $(TARGET_DIR)/etc/init.d/S99iiod.sh
+endef
+LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_STARTUP_SCRIPT
+LIBIIO_DEPENDENCIES += host-flex host-bison
+endif
+
+ifneq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
+LIBIIO_CONF_OPTS += -DWITH_TESTS=OFF
+endif
+
+$(eval $(cmake-package))
--
2.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-07 13:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 9:44 [Buildroot] [PATCH v2] libiio: new package Paul Cercueil
2014-09-21 19:41 ` Thomas Petazzoni
2014-09-22 7:49 ` Paul Cercueil
-- strict thread matches above, loose matches on Subject: below --
2014-11-07 13:49 Paul Cercueil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox