2 # Copyright (C) 2006-2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 # * uClibcpp not supported, performance +100x slower. libstdcpp is being used. https://bugs.busybox.net/show_bug.cgi?id=2545
10 # * liblua is still not recognized/blindly accepted. Impossible to compile with support
13 include $(TOPDIR
)/rules.mk
18 PKG_MAINTAINER
:=Nuno Gonçalves
<nunojpg@gmail.com
>
20 # Restore PKG_VERSION and revert to using release as soon as NMAP publish a new
21 # version that supports PCRE2.
22 # PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
23 # PKG_SOURCE_URL:=https://nmap.org/dist/
24 # PKG_HASH:=d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
27 PKG_SOURCE_URL
=https
://github.com
/nmap
/nmap
28 PKG_SOURCE_DATE
:=2023-08-28
29 PKG_SOURCE_VERSION
:=7dcea0187a9b8bccd552487de91512c97c791e3d
30 PKG_MIRROR_HASH
:=3a086013df4759f394c93a23254689fddd2dcbb06574d4898ea276bdabdf5bff
32 PKG_LICENSE
:=NPSL-0.94
-or-NPSL-0.95
33 PKG_LICENSE_FILES
:=LICENSE
34 PKG_CPE_ID
:=cpe
:/a
:nmap
:nmap
39 PYTHON3_PKG_FORCE_DISTUTILS_SETUP
:=1
41 include $(INCLUDE_DIR
)/package.mk
42 include ..
/..
/lang
/python
/python3-package.mk
44 NMAP_DEPENDS
:=+libpcap
+libstdcpp
+zlib
+libpcre2
45 NCAT_DEPENDS
:=+libpcap
46 NPING_DEPENDS
:=+libpcap
+libpthread
+libstdcpp
47 SSL_DEPENDS
:=+libopenssl
+ca-certs
49 define Package
/nmap
/default
53 URL
:=https
://nmap.org
/
57 $(call Package
/nmap
/default
)
58 DEPENDS
:=$(NMAP_DEPENDS
)
60 TITLE
:=Utility for network exploration or security auditing
63 define Package
/nmap-ssl
64 $(call Package
/nmap
/default
)
65 DEPENDS
:=$(NMAP_DEPENDS
) $(SSL_DEPENDS
)
67 TITLE
:=Nmap
(with OpenSSL support
)
70 define Package
/nmap-full
71 $(call Package
/nmap
/default
)
72 DEPENDS
:=$(NMAP_DEPENDS
) $(SSL_DEPENDS
) +liblua5.4
+libssh2
74 TITLE
:=Nmap
(with OpenSSL and scripting support
)
78 $(call Package
/nmap
/default
)
79 DEPENDS
:=$(NCAT_DEPENDS
)
81 TITLE
:=Much-improved reimplementation of Netcat
84 define Package
/ncat-ssl
85 $(call Package
/nmap
/default
)
86 DEPENDS
:=$(NCAT_DEPENDS
) $(SSL_DEPENDS
)
88 TITLE
:=Ncat
(with OpenSSL support
)
91 define Package
/ncat-full
92 $(call Package
/nmap
/default
)
93 DEPENDS
:=$(NCAT_DEPENDS
) $(SSL_DEPENDS
) +liblua5.4
95 TITLE
:=Ncat
(with OpenSSL and scripting support
)
99 $(call Package
/nmap
/default
)
100 DEPENDS
:=$(NPING_DEPENDS
)
102 TITLE
:=Network packet generation tool
/ ping utility
105 define Package
/nping-ssl
106 $(call Package
/nmap
/default
)
107 DEPENDS
:=$(NPING_DEPENDS
) $(SSL_DEPENDS
)
109 TITLE
:=Nping
(with OpenSSL support
)
113 $(call Package
/nmap
/default
)
114 DEPENDS
:=+python3-light
+python3-xml
115 TITLE
:=Utility to compare the results of Nmap scans
119 --with-libdnet
=included \
120 --with-liblinear
=included \
121 --with-libpcap
="$(STAGING_DIR)/usr" \
122 --with-libpcre
="$(STAGING_DIR)/usr" \
123 --with-libz
="$(STAGING_DIR)/usr" \
125 --without-localdirs \
128 # --with-libnbase=included
129 # --with-libnsock=included
131 ifeq ($(BUILD_VARIANT
),full
)
133 --with-liblua
="$(STAGING_DIR)/usr" \
134 --with-libssh2
="$(STAGING_DIR)/usr" \
135 --with-openssl
="$(STAGING_DIR)/usr" \
138 else ifeq ($(BUILD_VARIANT
),ssl
)
141 --with-openssl
="$(STAGING_DIR)/usr" \
154 ac_cv_dnet_bsd_bpf
=no
156 PYTHON3_PKG_SETUP_DIR
:=ndiff
157 PYTHON3_PKG_SETUP_ARGS
:=
160 $(call Build
/Compile
/Default
,)
161 $(call Py3Build
/Compile
)
165 $(call Build
/Install
/Default
,)
166 $(call Py3Build
/Install
)
169 define Package
/nmap
/install
170 $(INSTALL_DIR
) $(1)/usr
/bin
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nmap
$(1)/usr
/bin
/
172 $(INSTALL_DIR
) $(1)/usr
/share
/nmap
173 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/nmap
/nmap
* $(1)/usr
/share
/nmap
/
176 Package
/nmap-ssl
/install=$(Package
/nmap
/install)
178 define Package
/nmap-full
/install
179 $(call Package
/nmap
/install,$(1))
180 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/nmap
/nse_main.lua
$(1)/usr
/share
/nmap
/
181 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/nmap
/{nselib
,scripts
} $(1)/usr
/share
/nmap
/
184 define Package
/ncat
/install
185 $(INSTALL_DIR
) $(1)/usr
/bin
186 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ncat
$(1)/usr
/bin
/
189 define Package
/ncat-ssl
/install
190 $(call Package
/ncat
/install,$(1))
191 $(INSTALL_DIR
) $(1)/usr
/share
/ncat
194 Package
/ncat-full
/install=$(Package
/ncat-ssl
/install)
196 define Package
/nping
/install
197 $(INSTALL_DIR
) $(1)/usr
/bin
198 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nping
$(1)/usr
/bin
/
201 Package
/nping-ssl
/install=$(Package
/nping
/install)
203 define Py3Package
/ndiff
/install
204 $(INSTALL_DIR
) $(1)/usr
/bin
205 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ndiff
$(1)/usr
/bin
/
208 $(eval
$(call BuildPackage
,nmap
))
209 $(eval
$(call BuildPackage
,nmap-ssl
))
210 $(eval
$(call BuildPackage
,nmap-full
))
211 $(eval
$(call BuildPackage
,ncat
))
212 $(eval
$(call BuildPackage
,ncat-ssl
))
213 $(eval
$(call BuildPackage
,ncat-full
))
214 $(eval
$(call BuildPackage
,nping
))
215 $(eval
$(call BuildPackage
,nping-ssl
))
217 $(eval
$(call Py3Package
,ndiff
))
218 $(eval
$(call BuildPackage
,ndiff
))
219 $(eval
$(call BuildPackage
,ndiff-src
))