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.

107 lines
3.2 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.12
  10. PKG_RELEASE:=1
  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:=36e164fc00535762c819db209928ee2704fc81657d41060ea47873bccfd5c4bc
  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-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/iiod/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 line 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)/etc/init.d
  76. $(INSTALL_BIN) ./files/iiod.init $(1)/etc/init.d/iiod
  77. $(INSTALL_DIR) $(1)/usr/sbin
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iiod $(1)/usr/sbin/
  79. endef
  80. define Package/iio-utils/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  83. endef
  84. $(eval $(call BuildPackage,libiio))
  85. $(eval $(call BuildPackage,iiod))
  86. $(eval $(call BuildPackage,iio-utils))