summaryrefslogtreecommitdiffstats
path: root/package/vsftpd/vsftpd.mk
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-14 14:23:50 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-14 14:23:50 +0000
commit3d98651a6a9bd5aa719430fb2602af11645b3d2c (patch)
treee605a50a504c239b824a82297fe0dde45bbfd123 /package/vsftpd/vsftpd.mk
parent371120ce0eb7d5f1525d5cd59a77e6d2f6ca7612 (diff)
downloadbuildroot-novena-3d98651a6a9bd5aa719430fb2602af11645b3d2c.tar.gz
buildroot-novena-3d98651a6a9bd5aa719430fb2602af11645b3d2c.zip
- Add skeleton for vsftpd, an FTP daemon.
sysdeputil needs treatment, perhaps it get's Claudio Leonel started
Diffstat (limited to 'package/vsftpd/vsftpd.mk')
-rw-r--r--package/vsftpd/vsftpd.mk69
1 files changed, 69 insertions, 0 deletions
diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk
new file mode 100644
index 000000000..f6d30461e
--- /dev/null
+++ b/package/vsftpd/vsftpd.mk
@@ -0,0 +1,69 @@
+#############################################################
+#
+# vsftpd
+#
+#############################################################
+VSFTPD_VERSION:=2.0.5
+VSFTPD_SOURCE:=vsftpd-$(VSFTPD_VERSION).tar.gz
+VSFTPD_SITE:=ftp://vsftpd.beasts.org/users/cevans
+VSFTPD_DIR:=$(BUILD_DIR)/vsftpd-$(VSFTPD_VERSION)
+VSFTPD_CAT:=$(ZCAT)
+VSFTPD_BINARY:=vsftpd
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+VSFTPF_PREREQ:=openssl
+endif
+ifeq ($(BR2_LARGEFILE),)
+#BR2_VSFTPD_CFLAGS:=-U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS
+endif
+
+$(DL_DIR)/$(VSFTPD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(VSFTPD_SITE)/$(VSFTPD_SOURCE)
+
+vsftpd-source: $(DL_DIR)/$(VSFTPD_SOURCE)
+
+$(VSFTPD_DIR)/.unpacked: $(DL_DIR)/$(VSFTPD_SOURCE)
+ $(VSFTPD_CAT) $(DL_DIR)/$(VSFTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(VSFTPD_DIR) package/vsftpd/ vsftpd\*.patch
+ touch $(VSFTPD_DIR)/.unpacked
+
+$(VSFTPD_DIR)/.configured: $(VSFTPD_DIR)/.unpacked
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ $(SED) 's,#undef[ ]*VSF_BUILD_SSL.*,#define VSF_BUILD_SSL,g' $(VSFTPD_DIR)/builddefs.h
+else
+ $(SED) 's,#define[ ]*VSF_BUILD_SSL.*,#undef VSF_BUILD_SSL,g' $(VSFTPD_DIR)/builddefs.h
+endif
+ifneq ($(findstring uclibc,$(BR2_GNU_TARGET_SUFFIX)),)
+ $(SED) 's,#define[ ]*VSF_BUILDDEFS_H.*,#define VSF_BUILDDEFS_H\n#define __UCLIBC__,g' $(VSFTPD_DIR)/builddefs.h
+ $(SED) 's,.*__UCLIBC_HAS_LFS__.*,,g' $(VSFTPD_DIR)/builddefs.h
+ifeq ($(BR2_LARGEFILE),y)
+ $(SED) 's,#define[ ]*VSF_BUILDDEFS_H.*,#define VSF_BUILDDEFS_H\n#define __UCLIBC_HAS_LFS__,g' $(VSFTPD_DIR)/builddefs.h
+endif
+else # not uclibc
+ $(SED) 's,.*__UCLIBC_.*,,g' $(VSFTPD_DIR)/builddefs.h
+endif
+
+
+$(VSFTPD_DIR)/$(VSFTPD_BINARY): $(VSFTPF_PREREQ) $(VSFTPD_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(BR2_VSFTPD_CFLAGS)" -C $(VSFTPD_DIR)
+
+$(TARGET_DIR)/usr/sbin/$(VSFTPD_BINARY): $(VSFTPD_DIR)/$(VSFTPD_BINARY)
+ cp -dpf $< $@
+
+vsftpd: uclibc libgmp $(TARGET_DIR)/$(VSFTPD_TARGET_BINARY)
+
+vsftpd-clean:
+ -$(MAKE) -C $(VSFTPD_DIR) clean
+ rm -f $(TARGET_DIR)/usr/sbin/$(VSFTPD_BINARY)
+
+vsftpd-dirclean:
+ rm -rf $(VSFTPD_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_VSFTPD)),y)
+TARGETS+=vsftpd
+endif