Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2014-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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libftdi1
  9. PKG_VERSION:=1.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
  13. PKG_MD5SUM:=156cdf40cece9f8a3ce1582db59a502a
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_LICENSE:=LGPL-2.0
  16. PKG_LICENSE_FILES:=COPYING.LIB
  17. PKG_INSTALL:=1
  18. PKG_USE_MIPS16:=0
  19. CMAKE_OPTIONS:=-DBUILD_TESTS=OFF
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libftdi1
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+libusb-1.0
  26. TITLE:=Library to talk to FTDI chips
  27. URL:=http://www.intra2net.com/en/developer/libftdi/
  28. endef
  29. define Package/libftdi1/description
  30. libFTDI - FTDI USB driver with bitbang mode
  31. libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
  32. The library is linked with your program in userspace, no kernel driver required.
  33. endef
  34. define Package/ftdi_eeprom
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. DEPENDS:=+confuse +libftdi1
  38. TITLE:=Tool for reading/erasing/flashing FTDI USB chip eeproms
  39. URL:=http://www.intra2net.com/en/developer/libftdi/
  40. endef
  41. define Package/ftdi_eeprom/description
  42. ftdi_eeprom is a small tool for reading/erasing/flashing FTDI USB chip
  43. eeproms. It uses libftdi to access the chip, so you will need to have
  44. the required permissions on the device.
  45. The ftdi_sio module should not be loaded.
  46. You have to unplug and replug your device to get the new values to be
  47. read. Otherwise, you will still get the old values.
  48. endef
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include/libftdi1/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so*} $(1)/usr/lib/
  54. $(INSTALL_DIR) $(1)/usr/lib/cmake/libftdi1
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libftdi1/* $(1)/usr/lib/cmake/libftdi1/
  56. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi1.pc $(1)/usr/lib/pkgconfig/libftdi1.pc
  58. $(SED) \
  59. 's,/usr/include,$$$${prefix}/include,g' \
  60. $(1)/usr/lib/pkgconfig/libftdi1.pc
  61. $(SED) \
  62. 's,/usr/lib,$$$${prefix}/lib,g' \
  63. $(1)/usr/lib/pkgconfig/libftdi1.pc
  64. endef
  65. define Package/libftdi1/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libftdi1-config $(1)/usr/bin/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.so.* $(1)/usr/lib/
  70. endef
  71. define Package/ftdi_eeprom/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ftdi_eeprom $(1)/usr/bin/
  74. endef
  75. $(eval $(call BuildPackage,libftdi1))
  76. $(eval $(call BuildPackage,ftdi_eeprom))