You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.9 KiB

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