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
:=28ec1451f0527ad40c1a4c92547966ffef96813528c8b184a665f03ecbb508bc
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
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/nls.mk
25 include $(INCLUDE_DIR
)/cmake.mk
30 DEPENDS
:=+libusb-1.0
+libudev
$(ICONV_DEPENDS
)
31 TITLE
:=Library to talk to HID devices
32 URL
:=https
://github.com
/libusb
/hidapi
35 define Package
/hidapi
/description
36 HIDAPI is a multi-platform library which allows an application to interface
37 with USB and Bluetooth HID-Class devices on Windows
, Linux
, FreeBSD
, and Mac
38 OS X. HIDAPI can be either built
as a shared library
(.so or .dll
) or
39 can be embedded directly into a target application by adding a single source
40 file
(per platform
) and a single header.
43 define Build
/InstallDev
44 $(INSTALL_DIR
) $(1)/usr
/include/hidapi
45 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/hidapi
/hidapi.h
$(1)/usr
/include/hidapi
/
46 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/hidapi
/hidapi_libusb.h
$(1)/usr
/include/hidapi
/
47 $(INSTALL_DIR
) $(1)/usr
/lib
48 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-hidraw.so
* $(1)/usr
/lib
/
49 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-libusb.so
* $(1)/usr
/lib
/
50 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
/
51 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/hidapi-libusb.
pc $(1)/usr
/lib
/pkgconfig
/
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/hidapi-hidraw.
pc $(1)/usr
/lib
/pkgconfig
/
55 define Package
/hidapi
/install
56 $(INSTALL_DIR
) $(1)/usr
/lib
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-hidraw.so.
* $(1)/usr
/lib
/
58 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhidapi-libusb.so.
* $(1)/usr
/lib
/
61 $(eval
$(call BuildPackage
,hidapi
))