]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/nmap/nmap.mk
nmap: bump to version 7.70
[coffee/buildroot.git] / package / nmap / nmap.mk
1 ################################################################################
2 #
3 # nmap
4 #
5 ################################################################################
6
7 NMAP_VERSION = 7.70
8 NMAP_SITE = https://nmap.org/dist
9 NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2
10 NMAP_DEPENDENCIES = libpcap
11 NMAP_CONF_OPTS = --without-liblua --without-zenmap \
12         --with-libdnet=included --with-liblinear=included
13 NMAP_LICENSE = GPL-2.0
14 NMAP_LICENSE_FILES = COPYING
15
16 # needed by libpcap
17 NMAP_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
18
19 ifeq ($(BR2_STATIC_LIBS),y)
20 NMAP_CONF_ENV += LIBS="$(NMAP_LIBS_FOR_STATIC_LINK)"
21 endif
22
23 # for 0001-libdnet-wrapper-configure.patch
24 define NMAP_WRAPPER_EXEC
25         chmod +x $(@D)/libdnet-stripped/configure.gnu
26 endef
27 NMAP_POST_PATCH_HOOKS += NMAP_WRAPPER_EXEC
28
29 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
30 NMAP_CONF_OPTS += --with-libssh2="$(STAGING_DIR)/usr"
31 NMAP_DEPENDENCIES += libssh2
32 NMAP_LIBS_FOR_STATIC_LINK += `$(PKG_CONFIG_HOST_BINARY) --libs libssh2`
33 else
34 NMAP_CONF_OPTS += --without-libssh2
35 endif
36
37 ifeq ($(BR2_PACKAGE_OPENSSL),y)
38 NMAP_CONF_OPTS += --with-openssl="$(STAGING_DIR)/usr"
39 NMAP_DEPENDENCIES += host-pkgconf openssl
40 NMAP_LIBS_FOR_STATIC_LINK += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
41 else
42 NMAP_CONF_OPTS += --without-openssl
43 endif
44
45 NMAP_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR)
46
47 ifeq ($(BR2_PACKAGE_NMAP_NCAT),y)
48 NMAP_CONF_OPTS += --with-ncat
49 NMAP_MAKE_OPTS += build-ncat
50 NMAP_INSTALL_TARGET_OPTS += install-ncat
51 else
52 NMAP_CONF_OPTS += --without-ncat
53 endif
54
55 ifeq ($(BR2_PACKAGE_NMAP_NDIFF),y)
56 NMAP_DEPENDENCIES += python
57 NMAP_CONF_OPTS += --with-ndiff
58 NMAP_MAKE_OPTS += build-ndiff
59 NMAP_INSTALL_TARGET_OPTS += install-ndiff
60 else
61 NMAP_CONF_OPTS += --without-ndiff
62 endif
63
64 ifeq ($(BR2_PACKAGE_NMAP_NMAP),y)
65 NMAP_DEPENDENCIES += pcre
66 NMAP_CONF_OPTS += --with-libpcre="$(STAGING_DIR)/usr"
67 NMAP_MAKE_OPTS += nmap
68 NMAP_INSTALL_TARGET_OPTS += install-nmap
69 endif
70
71 ifeq ($(BR2_PACKAGE_NMAP_NPING),y)
72 NMAP_CONF_OPTS += --with-nping
73 NMAP_MAKE_OPTS += build-nping
74 NMAP_INSTALL_TARGET_OPTS += install-nping
75 else
76 NMAP_CONF_OPTS += --without-nping
77 endif
78
79 # If we are going to install ncat, ensure Busybox gets built/installed
80 # before, so that this package overrides Busybox nc.
81 ifeq ($(BR2_PACKAGE_NMAP_NCAT)$(BR2_PACKAGE_BUSYBOX),yy)
82 NMAP_DEPENDENCIES += busybox
83 endif
84
85 # Add a symlink to "nc" if none of the competing netcats is selected
86 ifeq ($(BR2_PACKAGE_NMAP_NCAT):$(BR2_PACKAGE_NETCAT)$(BR2_PACKAGE_NETCAT_OPENBSD),y:)
87 define NMAP_INSTALL_NCAT_SYMLINK
88         ln -fs ncat $(TARGET_DIR)/usr/bin/nc
89 endef
90 NMAP_POST_INSTALL_TARGET_HOOKS += NMAP_INSTALL_NCAT_SYMLINK
91 endif
92
93 $(eval $(autotools-package))