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