Blame view

buildroot/buildroot-2016.08.1/package/lftp/lftp.mk 1.94 KB
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  ################################################################################
  #
  # lftp
  #
  ################################################################################
  
  LFTP_VERSION = 4.7.3
  LFTP_SOURCE = lftp-$(LFTP_VERSION).tar.xz
  LFTP_SITE = http://lftp.yar.ru/ftp
  LFTP_LICENSE = GPLv3+
  LFTP_LICENSE_FILES = COPYING
  # Needed so that our libtool patch applies properly, and for patch
  # 0001-fix-static-link-with-readline.patch.
  LFTP_AUTORECONF = YES
  LFTP_DEPENDENCIES = readline zlib host-pkgconf
  
  # Help lftp finding readline and zlib
  LFTP_CONF_OPTS = \
  	--with-readline=$(STAGING_DIR)/usr \
  	--with-zlib=$(STAGING_DIR)/usr
  
  ifneq ($(BR2_STATIC_LIBS),y)
  LFTP_CONF_OPTS += --with-modules
  endif
  
  ifeq ($(BR2_PACKAGE_EXPAT)$(BR2_PACKAGE_LFTP_PROTO_HTTP),yy)
  LFTP_DEPENDENCIES += expat
  endif
  
  ifeq ($(BR2_PACKAGE_GNUTLS),y)
  LFTP_DEPENDENCIES += gnutls
  LFTP_CONF_OPTS += --with-gnutls
  else
  LFTP_CONF_OPTS += --without-gnutls
  endif
  
  ifeq ($(BR2_PACKAGE_OPENSSL),y)
  LFTP_DEPENDENCIES += openssl
  LFTP_CONF_OPTS += --with-openssl
  else
  LFTP_CONF_OPTS += --without-openssl
  endif
  
  # Remove /usr/share/lftp
  define LFTP_REMOVE_DATA
  	$(RM) -fr $(TARGET_DIR)/usr/share/lftp
  endef
  
  LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_DATA
  
  # Optional commands and protocols
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_MIRROR) += cmd-mirror.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_SLEEP) += cmd-sleep.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_TORRENT) += cmd-torrent.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FISH) += proto-fish.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FTP) += proto-ftp.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_HTTP) += proto-http.so
  LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_SFTP) += proto-sftp.so
  
  define LFTP_REMOVE_MODULES
  	for f in $(LFTP_MODULES_TO_REMOVE-) ; do \
  		$(RM) -f $(TARGET_DIR)/usr/lib/lftp/$(LFTP_VERSION)/$$f ; \
  	done
  endef
  
  LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_MODULES
  
  $(eval $(autotools-package))