[packages] babel: fix typo in initscript, bump release number
[packages.git] / libs / libusb / Makefile
1 #
2 # Copyright (C) 2006-2008 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
11 PKG_VERSION:=0.1.12
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/libusb
16 PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
17 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 PKG_INSTALL=1
22
23 define Package/libusb
24   SECTION:=libs
25   CATEGORY:=Libraries
26   TITLE:=A library for accessing Linux USB devices
27   URL:=http://libusb.sourceforge.net/
28 endef
29
30 define Build/Configure
31         $(call Build/Configure/Default, \
32                 --enable-shared \
33                 --enable-static \
34         )
35 endef
36
37 TARGET_CFLAGS += $(FPIC)
38
39 define Build/InstallDev
40         $(INSTALL_DIR) $(2)/bin
41         $(INSTALL_BIN) \
42                 $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
43                 $(2)/bin/
44         $(SED) \
45                 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
46                 $(2)/bin/libusb-config
47
48         $(INSTALL_DIR) $(1)/usr/include
49         $(INSTALL_DATA) \
50                 $(PKG_INSTALL_DIR)/usr/include/usb.h \
51                 $(1)/usr/include/
52
53         $(INSTALL_DIR) $(1)/usr/lib
54         $(CP) \
55                 $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
56                 $(1)/usr/lib/
57
58         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59         $(INSTALL_DATA) \
60                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
61                 $(1)/usr/lib/pkgconfig/
62 endef
63
64 define Package/libusb/install
65         $(INSTALL_DIR) $(1)/usr/lib
66         $(CP) \
67                 $(PKG_INSTALL_DIR)/usr/lib/libusb*.so* \
68                 $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libusb))