1################################################################################ 2# 3# proftpd 4# 5################################################################################ 6 7PROFTPD_VERSION = 1.3.6e 8PROFTPD_SITE = $(call github,proftpd,proftpd,v$(PROFTPD_VERSION)) 9PROFTPD_LICENSE = GPL-2.0+ 10PROFTPD_LICENSE_FILES = COPYING 11PROFTPD_CPE_ID_VENDOR = proftpd 12PROFTPD_SELINUX_MODULES = ftp 13 14PROFTPD_CONF_ENV = \ 15 ac_cv_func_setpgrp_void=yes \ 16 ac_cv_func_setgrent_void=yes 17 18PROFTPD_CONF_OPTS = \ 19 --localstatedir=/var/run \ 20 --disable-static \ 21 --disable-curses \ 22 --disable-ncurses \ 23 --disable-facl \ 24 --disable-dso \ 25 --enable-sendfile \ 26 --enable-shadow \ 27 --with-gnu-ld \ 28 --without-openssl-cmdline 29 30ifeq ($(BR2_PACKAGE_PROFTPD_MOD_CAP),y) 31PROFTPD_CONF_OPTS += --enable-cap 32PROFTPD_DEPENDENCIES += libcap 33else 34PROFTPD_CONF_OPTS += --disable-cap 35endif 36 37ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REWRITE),y) 38PROFTPD_MODULES += mod_rewrite 39endif 40 41ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REDIS),y) 42PROFTPD_CONF_OPTS += --enable-redis 43PROFTPD_DEPENDENCIES += hiredis 44else 45PROFTPD_CONF_OPTS += --disable-redis 46endif 47 48ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SFTP),y) 49PROFTPD_CONF_OPTS += --enable-openssl 50PROFTPD_MODULES += mod_sftp 51PROFTPD_DEPENDENCIES += openssl 52else 53PROFTPD_CONF_OPTS += --disable-openssl 54endif 55 56ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SQL),y) 57PROFTPD_MODULES += mod_sql 58endif 59 60ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SQL_SQLITE),y) 61PROFTPD_MODULES += mod_sql_sqlite 62PROFTPD_DEPENDENCIES += sqlite 63endif 64 65ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SFTP_SQL),y) 66PROFTPD_MODULES += mod_sftp_sql 67endif 68 69ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB),y) 70PROFTPD_MODULES += mod_quotatab 71endif 72 73ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_FILE),y) 74PROFTPD_MODULES += mod_quotatab_file 75endif 76 77ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_LDAP),y) 78PROFTPD_MODULES += mod_quotatab_ldap 79endif 80 81ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_RADIUS),y) 82PROFTPD_MODULES += mod_quotatab_radius 83endif 84 85ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_SQL),y) 86PROFTPD_MODULES += mod_quotatab_sql 87endif 88 89PROFTPD_CONF_OPTS += --with-modules=$(subst $(space),:,$(PROFTPD_MODULES)) 90 91# configure script doesn't handle detection of %llu format string 92# support for printing the file size when cross compiling, breaking 93# access for large files. 94# We unfortunately cannot AUTORECONF the package, so instead force it 95# on if we know we support it 96define PROFTPD_USE_LLU 97 $(SED) 's/HAVE_LU/HAVE_LLU/' $(@D)/configure 98endef 99PROFTPD_PRE_CONFIGURE_HOOKS += PROFTPD_USE_LLU 100 101PROFTPD_MAKE = $(MAKE1) 102 103# install Perl based scripts in target 104ifeq ($(BR2_PACKAGE_PERL),y) 105ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB),y) 106define PROFTPD_INSTALL_FTPQUOTA 107 $(INSTALL) -D -m 0755 $(@D)/contrib/ftpquota $(TARGET_DIR)/usr/sbin/ftpquota 108endef 109endif 110define PROFTPD_INSTALL_FTPASSWD 111 $(INSTALL) -D -m 0755 $(@D)/contrib/ftpasswd $(TARGET_DIR)/usr/sbin/ftpasswd 112endef 113endif 114 115define PROFTPD_INSTALL_TARGET_CMDS 116 $(INSTALL) -D -m 0755 $(@D)/proftpd $(TARGET_DIR)/usr/sbin/proftpd 117 $(INSTALL) -m 0644 -D $(@D)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf 118 $(PROFTPD_INSTALL_FTPQUOTA) 119 $(PROFTPD_INSTALL_FTPASSWD) 120endef 121 122define PROFTPD_USERS 123 ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User 124endef 125 126define PROFTPD_INSTALL_INIT_SYSV 127 $(INSTALL) -D -m 0755 package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d/S50proftpd 128endef 129 130define PROFTPD_INSTALL_INIT_SYSTEMD 131 $(INSTALL) -D -m 644 package/proftpd/proftpd.service \ 132 $(TARGET_DIR)/usr/lib/systemd/system/proftpd.service 133endef 134 135ifneq ($(BR2_PACKAGE_PROFTPD_BUFFER_SIZE),0) 136PROFTPD_CONF_OPTS += --enable-buffer-size=$(BR2_PACKAGE_PROFTPD_BUFFER_SIZE) 137endif 138 139$(eval $(autotools-package)) 140