123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- #
- # Copyright (C) 2017-2018 Michael Heimpold <mhei@heimpold.de>
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=libiio
- PKG_VERSION:=0.14
- PKG_RELEASE:=2
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)?
- PKG_HASH:=12063db7a9366aa00bfd789db30afaddb29686bc29b3ce1e5d4adfe1c3b42527
- PKG_LICENSE:=LGPL-2.1
- PKG_LICENSE_FILES:=COPYING.txt
- PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
- PKG_BUILD_PARALLEL:=1
- PKG_INSTALL:=1
- CMAKE_INSTALL:=1
- PKG_CONFIG_DEPENDS:= \
- CONFIG_IPV6 \
- CONFIG_LIBIIO_LOCAL_BACKEND \
- CONFIG_LIBIIO_NETWORK_BACKEND \
- CONFIG_LIBIIO_USB_BACKEND \
- CONFIG_LIBIIO_XML_BACKEND
- include $(INCLUDE_DIR)/package.mk
- include $(INCLUDE_DIR)/cmake.mk
- CMAKE_OPTIONS += -DWITH_DOC=OFF
- CMAKE_OPTIONS += -DENABLE_IPV6=$(if $(CONFIG_IPV6),ON,OFF)
- CMAKE_OPTIONS += -DENABLE_AIO=OFF
- CMAKE_OPTIONS += -DWITH_LOCAL_BACKEND=$(if $(CONFIG_LIBIIO_LOCAL_BACKEND),ON,OFF)
- CMAKE_OPTIONS += -DWITH_LOCAL_CONFIG=OFF
- CMAKE_OPTIONS += -DWITH_NETWORK_BACKEND=$(if $(CONFIG_LIBIIO_NETWORK_BACKEND),ON,OFF)
- # serial backend requires libserial which is not packaged yet
- CMAKE_OPTIONS += -DWITH_SERIAL_BACKEND=OFF
- CMAKE_OPTIONS += -DWITH_USB_BACKEND=$(if $(CONFIG_LIBIIO_USB_BACKEND),ON,OFF)
- CMAKE_OPTIONS += -DWITH_XML_BACKEND=$(if $(CONFIG_LIBIIO_XML_BACKEND),ON,OFF)
- define Package/libiio
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Library for interfacing with Linux IIO devices
- URL:=https://github.com/analogdevicesinc/libiio
- DEPENDS:=\
- +LIBIIO_USB_BACKEND:libusb-1.0 \
- +LIBIIO_NETWORK_BACKEND:libavahi-client \
- +LIBIIO_XML_BACKEND:libxml2
- MENU:=1
- endef
- define Package/libiio/config
- config LIBIIO_LOCAL_BACKEND
- bool "Enable local backend"
- depends on PACKAGE_libiio
- default y
- config LIBIIO_NETWORK_BACKEND
- bool "Enable network backend"
- depends on PACKAGE_libiio
- select LIBIIO_XML_BACKEND
- default n
- config LIBIIO_USB_BACKEND
- bool "Enable USB backend"
- depends on PACKAGE_libiio
- select LIBIIO_XML_BACKEND
- default n
- config LIBIIO_XML_BACKEND
- bool "Enable XML backend"
- depends on PACKAGE_libiio
- default n
- endef
- define Package/libiio/description
- libiio is used to interface to the Linux Industrial Input/Output (IIO) Subsystem.
- The Linux IIO subsystem is intended to provide support for devices that in some
- sense are analog to digital or digital to analog converters (ADCs, DACs). This
- includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, Capacitance
- to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors,
- Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis),
- PLLs (Phase Locked Loops), Variable/Programmable Gain Amplifiers (VGA, PGA),
- and RF transceivers. You can use libiio natively on an embedded Linux
- target (local mode), or use libiio to communicate remotely to that same target
- from a host Linux, Windows or MAC over USB or Ethernet or Serial.
- endef
- define Package/iiod
- SECTION:=net
- CATEGORY:=Network
- TITLE:=Linux IIO daemon
- URL:=https://github.com/analogdevicesinc/libiio
- DEPENDS:=+libiio
- endef
- define Package/iiod/description
- Daemon to access IIO devices via network.
- endef
- define Package/iio-utils
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Linux IIO tools
- URL:=https://github.com/analogdevicesinc/libiio
- DEPENDS:=+libiio
- endef
- define Package/iio-utils/description
- Command line tools for IIO devices.
- endef
- define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/iio.h $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libiio.pc $(1)/usr/lib/pkgconfig/
- endef
- define Package/libiio/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/
- endef
- define Package/iiod/install
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/iiod.init $(1)/etc/init.d/iiod
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iiod $(1)/usr/sbin/
- endef
- define Package/iio-utils/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
- endef
- $(eval $(call BuildPackage,libiio))
- $(eval $(call BuildPackage,iiod))
- $(eval $(call BuildPackage,iio-utils))
|