lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2928B)


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