You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2017 Michael Heimpold <mhei@heimpold.de>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libiio
  9. PKG_VERSION:=0.10
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=002d57f35715821efae66479859bc5357b4d8d33bfff1446b4e17b02ae2c10d2
  14. PKG_LICENSE:=LGPL-2.1
  15. PKG_LICENSE_FILES:=COPYING.txt
  16. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. CMAKE_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libiio
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Library for interfacing with Linux IIO devices
  26. URL:=https://github.com/analogdevicesinc/libiio
  27. DEPENDS:=+PACKAGE_libaio:libaio +PACKAGE_libusb-1.0:libusb-1.0 \
  28. +PACKAGE_libavahi-common:libavahi-common +PACKAGE_libavahi-client:libavahi-client +libxml2
  29. endef
  30. define Package/libiio/description
  31. libiio is used to interface to the Linux Industrial Input/Output (IIO) Subsystem.
  32. The Linux IIO subsystem is intended to provide support for devices that in some
  33. sense are analog to digital or digital to analog converters (ADCs, DACs). This
  34. includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, Capacitance
  35. to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors,
  36. Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis),
  37. PLLs (Phase Locked Loops), Variable/Programmable Gain Amplifiers (VGA, PGA),
  38. and RF transceivers. You can use libiio natively on an embedded Linux
  39. target (local mode), or use libiio to communicate remotely to that same target
  40. from a host Linux, Windows or MAC over USB or Ethernet or Serial.
  41. endef
  42. define Package/iiod
  43. SECTION:=net
  44. CATEGORY:=Network
  45. TITLE:=Linux IIO daemon
  46. URL:=https://github.com/analogdevicesinc/libiio
  47. DEPENDS:=+libiio
  48. endef
  49. define Package/libiio/description
  50. Daemon to access IIO devices via network.
  51. endef
  52. define Package/iio-utils
  53. SECTION:=utils
  54. CATEGORY:=Utilities
  55. TITLE:=Linux IIO tools
  56. URL:=https://github.com/analogdevicesinc/libiio
  57. DEPENDS:=+libiio
  58. endef
  59. define Package/iio-utils/description
  60. Command tools for IIO devices.
  61. endef
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/iio.h $(1)/usr/include/
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/
  67. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  68. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libiio.pc $(1)/usr/lib/pkgconfig/
  69. endef
  70. define Package/libiio/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/
  73. endef
  74. define Package/iiod/install
  75. $(INSTALL_DIR) $(1)/usr/sbin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iiod $(1)/usr/sbin/
  77. endef
  78. define Package/iio-utils/install
  79. $(INSTALL_DIR) $(1)/usr/bin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  81. endef
  82. $(eval $(call BuildPackage,libiio))
  83. $(eval $(call BuildPackage,iiod))
  84. $(eval $(call BuildPackage,iio-utils))