Add lftp from #4167
authorFlorian Fainelli <florian@openwrt.org>
Sun, 9 Nov 2008 16:45:18 +0000 (16:45 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 9 Nov 2008 16:45:18 +0000 (16:45 +0000)
SVN-Revision: 13149

net/lftp/Makefile [new file with mode: 0644]
net/lftp/patches/001-libintl.patch [new file with mode: 0644]

diff --git a/net/lftp/Makefile b/net/lftp/Makefile
new file mode 100644 (file)
index 0000000..f29531c
--- /dev/null
@@ -0,0 +1,80 @@
+# 
+# Copyright (C) 2008 OpenWrt.org
+#
+
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lftp
+PKG_VERSION:=3.7.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://ftp.yars.free.net/pub/source/lftp/old/
+PKG_MD5SUM:=fc98506620b059d712341d624eb720d6
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lftp
+  SUBMENU:=FTP
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libncurses +libopenssl +libreadline +uclibcxx
+  TITLE:=lftp
+  URL:=http://lftp.yar.ru/
+endef
+
+# uses GNU configure
+
+CONFIGURE_ARGS += \
+       --without-libiconv-prefix \
+       --without-libintl-prefix \
+       --without-gnutls \
+       --without-libresolv \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --disable-static 
+
+CONFIGURE_VARS += \
+        CXXFLAGS="$$$$CXXFLAGS -fno-builtin -I$(STAGING_DIR)/usr/include/uClibc++ -nostdinc++" \
+        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
+        LDFLAGS="$$$$LDFLAGS" \
+        LIBS="-nodefaultlibs -lz -lutil -luClibc++ -lcurses -lgcc_s -ldl" \
+
+define Build/Compile
+        $(MAKE) -C $(PKG_BUILD_DIR) \
+                LD="\$$$$(CC)" \
+                all
+endef
+
+define Package/lftp/install 
+       $(INSTALL_DIR) $(1)/usr/bin 
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lftp $(1)/usr/bin 
+endef 
+
+define Package/lftp/postinst
+# check for real system
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       if [ ! -e $${IPKG_INSTROOT}/usr/lib/libstdc\+\+.so.6 ]; then
+               ln -s $${IPKG_INSTROOT}/usr/lib/libuClibc++.so.0 $${IPKG_INSTROOT}/usr/lib/libstdc\+\+.so.6
+       fi
+fi
+
+endef
+
+define Package/lftp/postrm
+if [ -z "$${IPKG_INSTROOT}" ]; then
+        if [ -L $${IPKG_INSTROOT}/usr/lib/libstdc\+\+.so.6 ]; then
+               rm $${IPKG_INSTROOT}/usr/lib/libstdc\+\+.so.6
+       fi
+fi
+
+endef
+
+$(eval $(call BuildPackage,lftp))
diff --git a/net/lftp/patches/001-libintl.patch b/net/lftp/patches/001-libintl.patch
new file mode 100644 (file)
index 0000000..ac890ac
--- /dev/null
@@ -0,0 +1,19 @@
+diff -burN lftp-3.7.4.org/lib/gettext.h lftp-3.7.4/lib/gettext.h
+--- lftp-3.7.4.org/lib/gettext.h       2008-05-18 07:58:27.000000000 +0200
++++ lftp-3.7.4/lib/gettext.h   2008-11-05 16:03:37.769820993 +0100
+@@ -22,7 +22,6 @@
+ #if ENABLE_NLS
+ /* Get declarations of GNU message catalog functions.  */
+-# include <libintl.h>
+ /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+    the gettext() and ngettext() macros.  This is an alternative to calling
+@@ -54,7 +53,6 @@
+ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+ # include <cstdlib>
+ # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+-#  include <libintl.h>
+ # endif
+ #endif