2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/libusb
/hidapi
/tar.gz
/$(PKG_NAME
)-$(PKG_VERSION
)?
16 PKG_HASH
:=630ee1834bdd5c5761ab079fd04f463a89585df8fcae51a7bfe4229b1e02a652
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_MAINTAINER
:=Paul Fertser
<fercerpav@gmail.com
>
20 PKG_LICENSE
:=BSD-3-Clause
21 PKG_LICENSE_FILES
:=LICENSE-bsd.txt
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/nls.mk
33 DEPENDS
:=+libusb-1.0
+librt
+libudev-fbsd
$(ICONV_DEPENDS
)
34 TITLE
:=Library to talk to HID devices
35 URL
:=https
://github.com
/libusb
/hidapi
38 define Package
/hidapi
/description
39 HIDAPI is a multi-platform library which allows an application to interface
40 with USB and Bluetooth HID-Class devices on Windows
, Linux
, FreeBSD
, and Mac
41 OS X. HIDAPI can be either built
as a shared library
(.so or .dll
) or
42 can be embedded directly into a target application by adding a single source
43 file
(per platform
) and a single header.
49 TARGET_LDFLAGS
+= -liconv
51 define Build
/InstallDev
52 $(INSTALL_DIR
) $(1)/usr
/include/hidapi
53 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/hidapi
/hidapi.h
$(1)/usr
/include/hidapi
/
54 $(INSTALL_DIR
) $(1)/usr
/lib
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-hidraw.so
* $(1)/usr
/lib
/
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
//libhidapi-libusb.so
* $(1)/usr
/lib
/
57 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
/
58 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/hidapi-libusb.
pc $(1)/usr
/lib
/pkgconfig
/
61 define Package
/hidapi
/install
62 $(INSTALL_DIR
) $(1)/usr
/lib
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-hidraw.so.
* $(1)/usr
/lib
/
64 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-libusb.so.
* $(1)/usr
/lib
/
67 $(eval
$(call BuildPackage
,hidapi
))