summaryrefslogtreecommitdiff
path: root/package/ncftp/ncftp.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2007-05-22 11:59:22 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2007-05-22 11:59:22 +0000
commita3bf044725e2112696eec787d6b5a82a750310d1 (patch)
treea6504b1e27db633b9b491640f7f508341f6d1f88 /package/ncftp/ncftp.mk
parent293c026854f602e37d0f72aa761c7fb68e196b82 (diff)
ncftp package. Patch from #1355
Diffstat (limited to 'package/ncftp/ncftp.mk')
-rw-r--r--package/ncftp/ncftp.mk61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/ncftp/ncftp.mk b/package/ncftp/ncftp.mk
new file mode 100644
index 000000000..3cc6166c4
--- /dev/null
+++ b/package/ncftp/ncftp.mk
@@ -0,0 +1,61 @@
+#############################################################
+#
+# ncftp client
+#
+#############################################################
+NCFTP_VERSION:=3.2.0
+NCFTP_SOURCE:=ncftp-$(NCFTP_VERSION)-src.tar.bz2
+NCFTP_SITE:=ftp://ftp.ncftp.com/ncftp
+NCFTP_DIR:=$(BUILD_DIR)/ncftp-$(NCFTP_VERSION)
+
+NCFTP_TARGET_BINS:=ncftp
+
+ifeq ($(strip $(BR2_PACKAGE_NCFTP_UTILS)),y)
+NCFTP_TARGET_BINS+=ncftpbatch ncftpbookmarks ncftpget ncftpls ncftpput
+endif
+
+ncftp-source: $(DL_DIR)/$(NCFTP_SOURCE)
+
+$(DL_DIR)/$(NCFTP_SOURCE):
+ $(WGET) -P $(DL_DIR) $(NCFTP_SITE)/$(NCFTP_SOURCE)
+
+$(NCFTP_DIR)/.source: $(DL_DIR)/$(NCFTP_SOURCE)
+ bzcat $(DL_DIR)/$(NCFTP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(NCFTP_DIR)/.configured: $(NCFTP_DIR)/.source
+ (cd $(NCFTP_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ );
+ touch $@
+
+$(NCFTP_DIR)/bin/%: $(NCFTP_DIR)/.configured
+ $(MAKE) -C $(NCFTP_DIR)
+
+$(TARGET_DIR)/usr/bin/ncftp $(TARGET_DIR)/usr/bin/ncftp%: $(addprefix $(NCFTP_DIR)/bin/, $(NCFTP_TARGET_BINS))
+ $(INSTALL) -m 0755 $(NCFTP_DIR)/bin/$(notdir $@) $(TARGET_DIR)/usr/bin
+
+ncftp: uclibc $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS))
+
+ncftp-clean:
+ $(MAKE) -C $(NCFTP_DIR) clean
+ rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS))
+
+ncftp-dirclean:
+ rm -rf $(NCFTP_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_NCFTP)),y)
+TARGETS+=ncftp
+endif