xref: /OK3568_Linux_fs/buildroot/package/ncftp/ncftp.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# ncftp
4#
5################################################################################
6
7NCFTP_VERSION = 3.2.6
8# use .gz as upstream .xz tarball has changed after the hash was added for
9# 2017.02. Can be changed back to .xz when version is bumped
10NCFTP_SOURCE = ncftp-$(NCFTP_VERSION)-src.tar.gz
11NCFTP_SITE = ftp://ftp.ncftp.com/ncftp
12NCFTP_TARGET_BINS = ncftp
13NCFTP_LICENSE = Clarified Artistic License
14NCFTP_LICENSE_FILES = doc/LICENSE.txt
15
16NCFTP_DEPENDENCIES = host-autoconf
17NCFTP_CONF_OPTS = --disable-ccdv
18
19# The bundled configure script is generated by autoconf 2.13 and doesn't
20# detect cross-compilation correctly. Therefore, we have to regenerate it.
21# We need to pass -I because of the non-standard m4 directory name, and
22# none of the other autotools are used, so the below is the easiest.
23define NCFTP_RUN_AUTOCONF
24	(cd $(@D); $(AUTOCONF) -I$(@D)/autoconf_local/)
25endef
26NCFTP_PRE_CONFIGURE_HOOKS += NCFTP_RUN_AUTOCONF
27
28ifeq ($(BR2_PACKAGE_NCFTP_GET),y)
29NCFTP_TARGET_BINS += ncftpget
30endif
31
32ifeq ($(BR2_PACKAGE_NCFTP_PUT),y)
33NCFTP_TARGET_BINS += ncftpput
34endif
35
36ifeq ($(BR2_PACKAGE_NCFTP_LS),y)
37NCFTP_TARGET_BINS += ncftpls
38endif
39
40ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y)
41NCFTP_TARGET_BINS += ncftpbatch
42NCFTP_INSTALL_NCFTP_BATCH = \
43	ln -sf /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler
44endif
45
46ifeq ($(BR2_PACKAGE_NCFTP_BOOKMARKS),y)
47NCFTP_TARGET_BINS += ncftpbookmarks
48NCFTP_DEPENDENCIES += ncurses
49endif
50
51define NCFTP_INSTALL_TARGET_CMDS
52	$(INSTALL) -m 0755 $(addprefix $(NCFTP_DIR)/bin/, $(NCFTP_TARGET_BINS)) $(TARGET_DIR)/usr/bin
53	$(NCFTP_INSTALL_NCFTP_BATCH)
54endef
55
56$(eval $(autotools-package))
57