2006-12-14 15:23:50 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# vsftpd
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-10-07 00:46:41 +02:00
|
|
|
VSFTPD_VERSION:=2.0.7
|
2006-12-14 15:23:50 +01:00
|
|
|
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
|
2008-07-22 21:47:41 +02:00
|
|
|
VSFTPD_TARGET_BINARY:=usr/sbin/vsftpd
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2008-07-22 21:47:41 +02:00
|
|
|
VSFTPD_LIBS:=-lcrypt -lssl
|
|
|
|
else
|
|
|
|
VSFTPD_LIBS:=-lcrypt
|
2006-12-14 15:23:50 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(VSFTPD_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(VSFTPD_SITE),$(VSFTPD_SOURCE))
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
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
|
2008-10-07 00:46:41 +02:00
|
|
|
touch $@
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
$(VSFTPD_DIR)/.configured: $(VSFTPD_DIR)/.unpacked
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2007-08-22 14:35:41 +02:00
|
|
|
$(SED) 's,#undef[[:space:]]*VSF_BUILD_SSL.*,#define VSF_BUILD_SSL,g' $(VSFTPD_DIR)/builddefs.h
|
2006-12-14 15:23:50 +01:00
|
|
|
else
|
2007-08-22 14:35:41 +02:00
|
|
|
$(SED) 's,#define[[:space:]]*VSF_BUILD_SSL.*,#undef VSF_BUILD_SSL,g' $(VSFTPD_DIR)/builddefs.h
|
2006-12-14 15:23:50 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(findstring uclibc,$(BR2_GNU_TARGET_SUFFIX)),)
|
2007-08-22 14:35:41 +02:00
|
|
|
$(SED) 's,#define[[:space:]]*VSF_BUILDDEFS_H.*,#define VSF_BUILDDEFS_H\n#define __UCLIBC__,g' $(VSFTPD_DIR)/builddefs.h
|
2006-12-14 15:23:50 +01:00
|
|
|
$(SED) 's,.*__UCLIBC_HAS_LFS__.*,,g' $(VSFTPD_DIR)/builddefs.h
|
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
2007-08-22 14:35:41 +02:00
|
|
|
$(SED) 's,#define[[:space:]]*VSF_BUILDDEFS_H.*,#define VSF_BUILDDEFS_H\n#define __UCLIBC_HAS_LFS__,g' $(VSFTPD_DIR)/builddefs.h
|
2006-12-14 15:23:50 +01:00
|
|
|
endif
|
|
|
|
else # not uclibc
|
|
|
|
$(SED) 's,.*__UCLIBC_.*,,g' $(VSFTPD_DIR)/builddefs.h
|
|
|
|
endif
|
2009-10-03 22:47:22 +02:00
|
|
|
touch $@
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
|
2008-10-07 00:46:41 +02:00
|
|
|
$(VSFTPD_DIR)/$(VSFTPD_BINARY): $(VSFTPD_DIR)/.configured
|
2008-08-04 21:07:18 +02:00
|
|
|
$(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(VSFTPD_DIR)
|
2009-10-03 22:47:22 +02:00
|
|
|
touch -c $@
|
2006-12-14 15:23:50 +01:00
|
|
|
|
2008-10-07 00:46:41 +02:00
|
|
|
$(TARGET_DIR)/$(VSFTPD_TARGET_BINARY): $(VSFTPD_DIR)/$(VSFTPD_BINARY)
|
2006-12-14 15:23:50 +01:00
|
|
|
cp -dpf $< $@
|
2008-10-07 00:46:41 +02:00
|
|
|
$(INSTALL) -D -m 0755 package/vsftpd/vsftpd-init $(TARGET_DIR)/etc/init.d/S70vsftpd
|
2006-12-14 15:23:50 +01:00
|
|
|
|
2008-10-07 00:46:41 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2009-09-02 17:02:02 +02:00
|
|
|
vsftpd: openssl $(TARGET_DIR)/$(VSFTPD_TARGET_BINARY)
|
2008-10-07 00:46:41 +02:00
|
|
|
else
|
2009-09-02 17:02:02 +02:00
|
|
|
vsftpd: $(TARGET_DIR)/$(VSFTPD_TARGET_BINARY)
|
2008-10-07 00:46:41 +02:00
|
|
|
endif
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
vsftpd-clean:
|
|
|
|
-$(MAKE) -C $(VSFTPD_DIR) clean
|
2008-10-07 00:46:41 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(VSFTPD_TARGET_BINARY)
|
2006-12-14 15:23:50 +01:00
|
|
|
|
|
|
|
vsftpd-dirclean:
|
|
|
|
rm -rf $(VSFTPD_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_VSFTPD),y)
|
2006-12-14 15:23:50 +01:00
|
|
|
TARGETS+=vsftpd
|
|
|
|
endif
|