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.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/libusb
17 PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
20 include $(INCLUDE_DIR)/package.mk
27 TITLE:=A library for accessing Linux USB devices
28 URL:=http://libusb.sourceforge.net/
31 define Build/Configure
32 $(call Build/Configure/Default, \
38 TARGET_CFLAGS += $(FPIC)
40 define Build/InstallDev
41 $(INSTALL_DIR) $(2)/bin
43 $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
46 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
47 $(2)/bin/libusb-config
49 $(INSTALL_DIR) $(1)/usr/include
51 $(PKG_INSTALL_DIR)/usr/include/usb.h \
54 $(INSTALL_DIR) $(1)/usr/lib
56 $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
61 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
62 $(1)/usr/lib/pkgconfig/
65 define Package/libusb/install
66 $(INSTALL_DIR) $(1)/usr/lib
68 $(PKG_INSTALL_DIR)/usr/lib/libusb*.so* \
72 $(eval $(call BuildPackage,libusb))