2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2006-12-14 15:23:50 +01:00
|
|
|
#
|
|
|
|
# vsftpd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2006-12-14 15:23:50 +01:00
|
|
|
|
2015-07-28 00:52:59 +02:00
|
|
|
VSFTPD_VERSION = 3.0.3
|
2011-12-11 16:25:57 +01:00
|
|
|
VSFTPD_SITE = https://security.appspot.com/downloads
|
2010-09-27 17:55:18 +02:00
|
|
|
VSFTPD_LIBS = -lcrypt
|
2017-03-30 15:43:32 +02:00
|
|
|
VSFTPD_LICENSE = GPL-2.0
|
2012-10-15 17:50:26 +02:00
|
|
|
VSFTPD_LICENSE_FILES = COPYING
|
2006-12-14 15:23:50 +01:00
|
|
|
|
2014-09-16 15:17:30 +02:00
|
|
|
define VSFTPD_DISABLE_UTMPX
|
|
|
|
$(SED) 's/.*VSF_BUILD_UTMPX/#undef VSF_BUILD_UTMPX/' $(@D)/builddefs.h
|
|
|
|
endef
|
|
|
|
|
2010-09-27 17:55:18 +02:00
|
|
|
define VSFTPD_ENABLE_SSL
|
|
|
|
$(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(@D)/builddefs.h
|
|
|
|
endef
|
2006-12-14 15:23:50 +01:00
|
|
|
|
2014-09-16 15:17:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_VSFTPD_UTMPX),)
|
|
|
|
VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX
|
|
|
|
endif
|
|
|
|
|
2006-12-14 15:23:50 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2015-05-12 23:07:04 +02:00
|
|
|
VSFTPD_DEPENDENCIES += openssl host-pkgconf
|
2015-07-12 16:35:26 +02:00
|
|
|
VSFTPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`
|
2010-09-27 17:55:18 +02:00
|
|
|
VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
|
2006-12-14 15:23:50 +01:00
|
|
|
endif
|
|
|
|
|
2010-10-18 17:36:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
|
|
VSFTPD_DEPENDENCIES += libcap
|
|
|
|
VSFTPD_LIBS += -lcap
|
|
|
|
endif
|
|
|
|
|
2012-08-12 09:01:16 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
|
|
|
VSFTPD_DEPENDENCIES += linux-pam
|
|
|
|
VSFTPD_LIBS += -lpam
|
|
|
|
endif
|
|
|
|
|
2010-09-27 17:55:18 +02:00
|
|
|
define VSFTPD_BUILD_CMDS
|
2016-10-17 18:07:08 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
|
2010-09-27 17:55:18 +02:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D)
|
|
|
|
endef
|
|
|
|
|
2015-10-04 15:31:34 +02:00
|
|
|
define VSFTPD_USERS
|
|
|
|
ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User
|
|
|
|
endef
|
|
|
|
|
2014-11-30 15:17:49 +01:00
|
|
|
define VSFTPD_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/vsftpd/S70vsftpd $(TARGET_DIR)/etc/init.d/S70vsftpd
|
|
|
|
endef
|
|
|
|
|
2015-10-04 15:31:34 +02:00
|
|
|
# vsftpd won't work if the jail directory is writable, it has to be
|
|
|
|
# readable only otherwise you get the following error:
|
|
|
|
# 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
|
|
|
|
# That's why we have to adjust the permissions of /home/ftp
|
2010-09-27 17:55:18 +02:00
|
|
|
define VSFTPD_INSTALL_TARGET_CMDS
|
2014-06-01 14:38:01 +02:00
|
|
|
$(INSTALL) -D -m 755 $(@D)/vsftpd $(TARGET_DIR)/usr/sbin/vsftpd
|
2013-01-16 00:24:08 +01:00
|
|
|
test -f $(TARGET_DIR)/etc/vsftpd.conf || \
|
|
|
|
$(INSTALL) -D -m 644 $(@D)/vsftpd.conf \
|
|
|
|
$(TARGET_DIR)/etc/vsftpd.conf
|
2014-06-01 14:38:01 +02:00
|
|
|
$(INSTALL) -d -m 700 $(TARGET_DIR)/usr/share/empty
|
2015-10-04 15:31:34 +02:00
|
|
|
$(INSTALL) -d -m 555 $(TARGET_DIR)/home/ftp
|
2010-09-27 17:55:18 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|