瀏覽代碼

libftdi1: add libftdi1-config and ftdi_eeprom, simplify files copy

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Álvaro Fernández Rojas 10 年之前
父節點
當前提交
a42982c970
共有 1 個檔案被更改,包括 33 行新增4 行删除
  1. 33
    4
      libs/libftdi1/Makefile

+ 33
- 4
libs/libftdi1/Makefile 查看文件

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2014 OpenWrt.org
2
+# Copyright (C) 2014-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=libftdi1
11 11
 PKG_VERSION:=1.2
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 15
 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
@@ -39,19 +39,48 @@ define Package/libftdi1/description
39 39
   The library is linked with your program in userspace, no kernel driver required.
40 40
 endef
41 41
 
42
+define Package/ftdi_eeprom
43
+  SECTION:=libs
44
+  CATEGORY:=Libraries
45
+  DEPENDS:=+confuse +libftdi1
46
+  TITLE:=Tool for reading/erasing/flashing FTDI USB chip eeproms
47
+  URL:=http://www.intra2net.com/en/developer/libftdi/
48
+endef
49
+
50
+define Package/ftdi_eeprom/description
51
+  ftdi_eeprom is a small tool for reading/erasing/flashing FTDI USB chip
52
+  eeproms. It uses libftdi to access the chip, so you will need to have
53
+  the required permissions on the device.
54
+
55
+  The ftdi_sio module should not be loaded. You can prevent it to be
56
+  automatically loaded by adding it to /etc/modprobe.d/blacklist.
57
+
58
+  You have to unplug and replug your device to get the new values to be
59
+  read. Otherwise, you will still get the old values.
60
+endef
61
+
42 62
 define Build/InstallDev
43 63
 	$(INSTALL_DIR) $(1)/usr/include/libftdi1/
44 64
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/
45 65
 	$(INSTALL_DIR) $(1)/usr/lib
46
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so} $(1)/usr/lib/
47
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.so* $(1)/usr/lib/
66
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so*} $(1)/usr/lib/
67
+	$(INSTALL_DIR) $(1)/usr/lib/cmake/libftdi1
68
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libftdi1/* $(1)/usr/lib/cmake/libftdi1/
48 69
 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
49 70
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi1.pc $(1)/usr/lib/pkgconfig/libftdi1.pc
50 71
 endef
51 72
 
52 73
 define Package/libftdi1/install
74
+	$(INSTALL_DIR) $(1)/usr/bin
75
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libftdi1-config $(1)/usr/bin/
53 76
 	$(INSTALL_DIR) $(1)/usr/lib
54 77
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.so.* $(1)/usr/lib/
55 78
 endef
56 79
 
80
+define Package/ftdi_eeprom/install
81
+	$(INSTALL_DIR) $(1)/usr/bin
82
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ftdi_eeprom $(1)/usr/bin/
83
+endef
84
+
57 85
 $(eval $(call BuildPackage,libftdi1))
86
+$(eval $(call BuildPackage,ftdi_eeprom))