[packages] libusb-1.0: update to 1.0.9, fix title & description, use PKG_INSTALL
[packages.git] / libs / libusb-1.0 / Makefile
1 #
2 # Copyright (C) 2010-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libusb-1.0
11 PKG_VERSION:=1.0.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=libusb-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/libusb
16 PKG_MD5SUM:=7f5a02375ad960d4e33a6dae7d63cfcb
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/libusb-$(PKG_VERSION)
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libusb-1.0
24   SECTION:=libs
25   CATEGORY:=Libraries
26   TITLE:=A library for accessing Linux USB devices (non-legacy)
27   DEPENDS:=+libpthread +librt
28   URL:=http://libusb.wiki.sourceforge.net/
29 endef
30
31 define Package/libusb-1.0/description
32   libusb is a C library that gives applications easy access to USB devices on
33   many different operating systems.
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 define Build/InstallDev
39         $(INSTALL_DIR) $(1)/usr/include/libusb-1.0
40         $(CP) \
41                 $(PKG_INSTALL_DIR)/usr/include/libusb-1.0/libusb.h \
42                 $(1)/usr/include/libusb-1.0/
43         $(INSTALL_DIR) $(1)/usr/lib
44         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.{a,la,so*} $(1)/usr/lib/
45         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
46         $(CP) \
47                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb*.pc \
48                 $(1)/usr/lib/pkgconfig/
49 endef
50
51 define Package/libusb-1.0/install
52         $(INSTALL_DIR) $(1)/usr/lib
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.so* $(1)/usr/lib/
54 endef
55
56 $(eval $(call BuildPackage,libusb-1.0))