2008-10-08 16:19:02 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006-2008 OpenWrt.org
|
2006-07-22 16:41:05 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libusb
|
2007-01-25 09:12:30 +00:00
|
|
|
PKG_VERSION:=0.1.12
|
2009-01-04 00:06:33 +00:00
|
|
|
PKG_RELEASE:=2
|
2006-07-22 16:41:05 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=@SF/libusb
|
2007-01-25 09:12:30 +00:00
|
|
|
PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
|
2008-10-08 18:01:24 +00:00
|
|
|
PKG_FIXUP:=libtool
|
2006-07-22 16:41:05 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2008-10-08 16:19:02 +00:00
|
|
|
PKG_INSTALL=1
|
|
|
|
|
2006-07-22 16:41:05 +00:00
|
|
|
define Package/libusb
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=A library for accessing Linux USB devices
|
|
|
|
URL:=http://libusb.sourceforge.net/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
)
|
2006-07-22 16:41:05 +00:00
|
|
|
endef
|
|
|
|
|
2008-08-06 22:43:15 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2006-07-22 16:41:05 +00:00
|
|
|
define Build/InstallDev
|
2008-10-08 16:19:02 +00:00
|
|
|
$(INSTALL_DIR) $(2)/bin
|
|
|
|
$(INSTALL_BIN) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/bin/libusb-config \
|
|
|
|
$(2)/bin/
|
|
|
|
$(SED) \
|
|
|
|
's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
|
|
|
|
$(2)/bin/libusb-config
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/include/usb.h \
|
|
|
|
$(1)/usr/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-01-04 00:06:33 +00:00
|
|
|
$(CP) \
|
2008-10-13 15:42:09 +00:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
|
2008-10-08 16:19:02 +00:00
|
|
|
$(1)/usr/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig/
|
2006-07-22 16:41:05 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/libusb/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-01-04 00:06:33 +00:00
|
|
|
$(CP) \
|
2008-12-31 14:59:32 +00:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/libusb*.so* \
|
2008-10-08 16:19:02 +00:00
|
|
|
$(1)/usr/lib/
|
2006-10-28 22:43:08 +00:00
|
|
|
endef
|
|
|
|
|
2006-07-22 16:41:05 +00:00
|
|
|
$(eval $(call BuildPackage,libusb))
|