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.

64 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2011-2015 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:=libftdi
  9. PKG_VERSION:=0.20
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
  13. PKG_MD5SUM:=355d4474e3faa81b485d6a604b06951f
  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/libftdi
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+libusb-compat
  25. TITLE:=Library to talk to FTDI chips
  26. URL:=http://www.intra2net.com/en/developer/libftdi/
  27. endef
  28. define Package/libftdi/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 Build/InstallDev
  34. $(INSTALL_DIR) $(1)/usr/include/
  35. $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
  36. $(INSTALL_DIR) $(1)/usr/lib
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(1)/usr/lib/
  38. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc
  40. $(SED) \
  41. 's,/usr/include,$$$${prefix}/include,g' \
  42. $(1)/usr/lib/pkgconfig/libftdi.pc
  43. $(SED) \
  44. 's,/usr/lib,$$$${prefix}/lib,g' \
  45. $(1)/usr/lib/pkgconfig/libftdi.pc
  46. endef
  47. define Package/libftdi/install
  48. $(INSTALL_DIR) $(1)/usr/bin
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libftdi-config $(1)/usr/bin/
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
  52. endef
  53. $(eval $(call BuildPackage,libftdi))