2 # Copyright (C) 2010-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
10 PKG_NAME
:=libusb-compat
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=https
://github.com
/libusb
/libusb-compat-0.1
/releases
/download
/v
$(PKG_VERSION
)
16 PKG_HASH
:=b692dcf674c070c8c0bee3c8230ce4ee5903f926d77dc8b968a4dd1b70f9b05c
18 PKG_MAINTAINER
:= Felix Fietkau
<nbd@nbd.name
>
19 PKG_LICENSE
:=LGPL-2.1
-or-later
20 PKG_LICENSE_FILES
:=COPYING
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/libusb-compat
30 TITLE
:=libusb-0.1 compatibility library
32 URL
:=https
://libusb.
info/
36 define Package
/libusb-compat
/description
37 libusb is a C library that gives applications easy access to USB devices on
38 many different operating systems.
41 TARGET_CFLAGS
+= $(FPIC
)
43 define Build
/InstallDev
44 $(INSTALL_DIR
) $(1)/usr
/bin
45 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/libusb-config
$(1)/usr
/bin
/
47 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
48 $(1)/usr
/bin
/libusb-config
49 $(INSTALL_DIR
) $(2)/bin
50 $(LN
) ..
/..
/usr
/bin
/libusb-config
$(2)/bin
/
51 $(INSTALL_DIR
) $(1)/usr
/include
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/usb.h
$(1)/usr
/include/
53 $(INSTALL_DIR
) $(1)/usr
/lib
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libusb
* $(1)/usr
/lib
/
55 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libusb.
pc $(1)/usr
/lib
/pkgconfig
/
59 define Package
/libusb-compat
/install
60 $(INSTALL_DIR
) $(1)/usr
/lib
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libusb-0.1.so.
$(ABI_VERSION
)* $(1)/usr
/lib
/
64 $(eval
$(call BuildPackage
,libusb-compat
))