ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / package / libs / libusb / Makefile
1 #
2 # Copyright (C) 2010-2016 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:=1.0.26
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=\
16 https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION) \
17 @SF/$(PKG_NAME)
18 PKG_HASH:=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
19
20 PKG_MAINTAINER:= Felix Fietkau <nbd@nbd.name>
21 PKG_LICENSE:=LGPL-2.1-or-later
22 PKG_LICENSE_FILES:=COPYING
23 PKG_CPE_ID:=cpe:/a:libusb:libusb
24
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libusb-1.0
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=A library for accessing Linux USB devices
34 DEPENDS:=+libpthread +librt +libatomic
35 URL:=http://libusb.info/
36 ABI_VERSION:=0
37 endef
38
39 define Package/libusb-1.0/description
40 libusb is a C library that gives applications easy access to USB devices on
41 many different operating systems.
42 endef
43
44 define Package/fxload
45 SECTION:=utils
46 CATEGORY:=Utilities
47 TITLE:=fxload firmware loader
48 URL:=http://linux-hotplug.sourceforge.net
49 DEPENDS:=+libusb-1.0
50 endef
51
52 define Package/fxload/description
53 This program is conveniently able to download firmware into FX, FX2,
54 and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB.
55 It is intended to be invoked by hotplug scripts when the unprogrammed
56 device appears on the bus.
57 endef
58
59 TARGET_CFLAGS += $(FPIC)
60 CONFIGURE_ARGS += \
61 --enable-examples-build \
62 --disable-log \
63 --disable-udev
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/include/libusb-1.0
67 $(CP) $(PKG_INSTALL_DIR)/usr/include/libusb-1.0/libusb.h $(1)/usr/include/libusb-1.0/
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.* $(1)/usr/lib/
70 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb-1.0.pc $(1)/usr/lib/pkgconfig/
72 endef
73
74 define Package/libusb-1.0/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/
77 endef
78
79 define Package/fxload/install
80 $(INSTALL_DIR) $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/.libs/fxload $(1)/usr/sbin
82 endef
83
84 $(eval $(call BuildPackage,libusb-1.0))
85 $(eval $(call BuildPackage,fxload))