package/proftpd: add BR2_PACKAGE_PROFTPD_MOD_SFTP
authorParesh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Tue, 14 Aug 2018 18:15:25 +0000 (13:15 -0500)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 14 Aug 2018 20:14:45 +0000 (22:14 +0200)
This patch adds BR2_PACKAGE_PROFTPD_MOD_SFTP support and also
changes the .mk file to add required modules as a list in a
separate variable. This new variable will help in future to add
more module support in proftpd package.

Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/proftpd/Config.in
package/proftpd/proftpd.mk

index e979d407cf6055a0ef553da6660826d355ccb60d..e7e3c137801b4d6b02e6111b24b41b95a28428e7 100644 (file)
@@ -20,4 +20,10 @@ config BR2_PACKAGE_PROFTPD_MOD_REDIS
          The mod_redis module enables ProFTPD support for caching
          data in Redis servers, using the hiredis client library.
 
+config BR2_PACKAGE_PROFTPD_MOD_SFTP
+       bool "mod_sftp support"
+       select BR2_PACKAGE_OPENSSL
+       help
+         Compile ProFTPD with mod_sftp support
+
 endif
index 3e165c6adabff4a1b06728848a48fdad38d6ba18..b02320f4c06a332d16011cf324e3da91c4825e96 100644 (file)
@@ -24,7 +24,7 @@ PROFTPD_CONF_OPTS = \
        --with-gnu-ld
 
 ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REWRITE),y)
-PROFTPD_CONF_OPTS += --with-modules=mod_rewrite
+PROFTPD_MODULES += mod_rewrite
 endif
 
 ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REDIS),y)
@@ -34,6 +34,16 @@ else
 PROFTPD_CONF_OPTS += --disable-redis
 endif
 
+ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SFTP),y)
+PROFTPD_CONF_OPTS += --enable-openssl
+PROFTPD_MODULES += mod_sftp
+PROFTPD_DEPENDENCIES += openssl
+else
+PROFTPD_CONF_OPTS += --disable-openssl
+endif
+
+PROFTPD_CONF_OPTS += --with-modules=$(subst $(space),:,$(PROFTPD_MODULES))
+
 # configure script doesn't handle detection of %llu format string
 # support for printing the file size when cross compiling, breaking
 # access for large files.