toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / lftp / lftp.mk
bloba7e1f92619e78cc656a057b68179926f85e64f25
1 ################################################################################
3 # lftp
5 ################################################################################
7 LFTP_VERSION = 4.7.4
8 LFTP_SOURCE = lftp-$(LFTP_VERSION).tar.xz
9 LFTP_SITE = http://lftp.yar.ru/ftp
10 LFTP_LICENSE = GPLv3+
11 LFTP_LICENSE_FILES = COPYING
12 # Needed so that our libtool patch applies properly, and for patch
13 # 0001-fix-static-link-with-readline.patch.
14 LFTP_AUTORECONF = YES
15 LFTP_DEPENDENCIES = readline zlib host-pkgconf
17 # Help lftp finding readline and zlib
18 LFTP_CONF_OPTS = \
19 --with-readline=$(STAGING_DIR)/usr \
20 --with-zlib=$(STAGING_DIR)/usr
22 ifneq ($(BR2_STATIC_LIBS),y)
23 LFTP_CONF_OPTS += --with-modules
24 endif
26 ifeq ($(BR2_PACKAGE_EXPAT)$(BR2_PACKAGE_LFTP_PROTO_HTTP),yy)
27 LFTP_DEPENDENCIES += expat
28 endif
30 ifeq ($(BR2_PACKAGE_GNUTLS),y)
31 LFTP_DEPENDENCIES += gnutls
32 LFTP_CONF_OPTS += --with-gnutls
33 else
34 LFTP_CONF_OPTS += --without-gnutls
35 endif
37 ifeq ($(BR2_PACKAGE_OPENSSL),y)
38 LFTP_DEPENDENCIES += openssl
39 LFTP_CONF_OPTS += --with-openssl
40 else
41 LFTP_CONF_OPTS += --without-openssl
42 endif
44 # Remove /usr/share/lftp
45 define LFTP_REMOVE_DATA
46 $(RM) -fr $(TARGET_DIR)/usr/share/lftp
47 endef
49 LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_DATA
51 # Optional commands and protocols
52 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_MIRROR) += cmd-mirror.so
53 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_SLEEP) += cmd-sleep.so
54 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_TORRENT) += cmd-torrent.so
55 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FISH) += proto-fish.so
56 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FTP) += proto-ftp.so
57 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_HTTP) += proto-http.so
58 LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_SFTP) += proto-sftp.so
60 define LFTP_REMOVE_MODULES
61 for f in $(LFTP_MODULES_TO_REMOVE-) ; do \
62 $(RM) -f $(TARGET_DIR)/usr/lib/lftp/$(LFTP_VERSION)/$$f ; \
63 done
64 endef
66 LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_MODULES
68 $(eval $(autotools-package))