libftdi - library to control and program the FTDI USB controller
Index: libs/libftdi/Makefile
===================================================================
--- libs/libftdi/Makefile (revision 0)
+++ libs/libftdi/Makefile (revision 0)
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libftdi
+PKG_VERSION:=0.18
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
+PKG_MD5SUM:=916f65fa68d154621fc0cf1f405f2726
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libftdi
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libusb
+  TITLE:=Library to control and program the FTDI USB controller
+  
URL:=http://www.intra2net.com/en/developer/libftdi/<http://mail.google.com/mail/=http://www.intra2net.com/en/developer/libftdi/>
+endef
+
+define Package/libftdi/description
+ A library to talk to FTDI chips: FT232BM/245BM, FT2232C/D and FT232/245R
using libusb,
+ including the popular bitbang mode. This library is linked with your
program in userspace,
+ no kernel driver required.
+endef
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ chmod -R u+w $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+  $(TARGET_CONFIGURE_OPTS) \
+  OFLAGS="$(TARGET_CFLAGS)" \
+  DESTDIR="$(PKG_INSTALL_DIR)" \
+  install
+endef
+
+define Build/InstallDev
+ mkdir -p $(STAGING_DIR)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(STAGING_DIR)/usr/include/
+ mkdir -p $(STAGING_DIR)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(STAGING_DIR)/usr/lib/
+ mkdir -p $(STAGING_DIR)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/libftdi-config $(STAGING_DIR)/usr/bin/
+ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc \
+  $(STAGING_DIR)/usr/lib/pkgconfig
+endef
+
+define Build/UninstallDev
+ rm -rf \
+  $(STAGING_DIR)/usr/include/ftdi.h \
+  $(STAGING_DIR)/usr/lib/libftdi.{a,so*} \
+  $(STAGING_DIR)/usr/bin/libftdi-config \
+  $(STAGING_DIR)/usr/lib/pkgconfig/libftdi.pc
+endef
+
+define Package/libftdi/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libftdi))

--------------------------------------------------------------------------
With the best regards, Michael Grigorev
NVStat lead developer
--------------------------------------------------------------------------
Russia
Chelyabinsk
WWW: http://novell.chel.ru
E-Mail: sleuthho...@gmail.com
ICQ: 161867489
--------------------------------------------------------------------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to