2 # Copyright (C) 2006-2008 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:=@SF/libusb
16 PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
19 include $(INCLUDE_DIR)/package.mk
26 TITLE:=A library for accessing Linux USB devices
27 URL:=http://libusb.sourceforge.net/
30 define Build/Configure
31 $(call Build/Configure/Default, \
37 TARGET_CFLAGS += $(FPIC)
39 define Build/InstallDev
40 $(INSTALL_DIR) $(2)/bin
42 $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
45 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
46 $(2)/bin/libusb-config
48 $(INSTALL_DIR) $(1)/usr/include
50 $(PKG_INSTALL_DIR)/usr/include/usb.h \
53 $(INSTALL_DIR) $(1)/usr/lib
55 $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
58 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
60 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
61 $(1)/usr/lib/pkgconfig/
64 define Package/libusb/install
65 $(INSTALL_DIR) $(1)/usr/lib
67 $(PKG_INSTALL_DIR)/usr/lib/libusb*.so* \
71 $(eval $(call BuildPackage,libusb))