28b03b8800eaefba9c9d253e23b62af6cf91c82c
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / ncftp / ncftp.mk
1 ################################################################################
2 #
3 # ncftp
4 #
5 ################################################################################
6
7 NCFTP_VERSION = 3.2.5
8 NCFTP_SOURCE = ncftp-$(NCFTP_VERSION)-src.tar.bz2
9 NCFTP_SITE = ftp://ftp.ncftp.com/ncftp
10 NCFTP_TARGET_BINS = ncftp
11 NCFTP_LICENSE = Clarified Artistic License
12 NCFTP_LICENSE_FILES = doc/LICENSE.txt
13
14 NCFTP_DEPENDENCIES = host-autoconf
15
16 # The bundled configure script is generated by autoconf 2.13 and doesn't
17 # detect cross-compilation correctly. Therefore, we have to regenerate it.
18 # We need to pass -I because of the non-standard m4 directory name, and
19 # none of the other autotools are used, so the below is the easiest.
20 define NCFTP_RUN_AUTOCONF
21         (cd $(@D); $(HOST_DIR)/usr/bin/autoconf -I$(@D)/autoconf_local/)
22 endef
23 NCFTP_PRE_CONFIGURE_HOOKS += NCFTP_RUN_AUTOCONF
24
25 ifeq ($(BR2_PACKAGE_NCFTP_GET),y)
26 NCFTP_TARGET_BINS += ncftpget
27 endif
28
29 ifeq ($(BR2_PACKAGE_NCFTP_PUT),y)
30 NCFTP_TARGET_BINS += ncftpput
31 endif
32
33 ifeq ($(BR2_PACKAGE_NCFTP_LS),y)
34 NCFTP_TARGET_BINS += ncftpls
35 endif
36
37 ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y)
38 NCFTP_TARGET_BINS += ncftpbatch
39 NCFTP_INSTALL_NCFTP_BATCH = \
40         ln -sf /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler
41 endif
42
43 ifeq ($(BR2_PACKAGE_NCFTP_BOOKMARKS),y)
44 NCFTP_TARGET_BINS += ncftpbookmarks
45 NCFTP_DEPENDENCIES += ncurses
46 endif
47
48 define NCFTP_INSTALL_TARGET_CMDS
49         $(INSTALL) -m 0755 $(addprefix $(NCFTP_DIR)/bin/, $(NCFTP_TARGET_BINS)) $(TARGET_DIR)/usr/bin
50         $(NCFTP_INSTALL_NCFTP_BATCH)
51 endef
52
53 $(eval $(autotools-package))