|
@@ -0,0 +1,142 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2006-2014 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+
|
|
7
|
+#TODO
|
|
8
|
+#
|
|
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
|
|
11
|
+#
|
|
12
|
+
|
|
13
|
+include $(TOPDIR)/rules.mk
|
|
14
|
+
|
|
15
|
+PKG_NAME:=nmap
|
|
16
|
+PKG_VERSION:=6.47
|
|
17
|
+PKG_RELEASE:=1
|
|
18
|
+PKG_MAINTAINER=Nuno Goncalves <nunojpg@gmail.com>
|
|
19
|
+
|
|
20
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
21
|
+PKG_SOURCE_URL:=http://nmap.org/dist/
|
|
22
|
+PKG_MD5SUM:=edfe81f6763223c0a29bfa15a8526e2a
|
|
23
|
+PKG_LICENSE:=GPL-2.0
|
|
24
|
+PKG_LICENSE_FILE:=COPYING
|
|
25
|
+
|
|
26
|
+PKG_INSTALL:=1
|
|
27
|
+
|
|
28
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
29
|
+
|
|
30
|
+include $(INCLUDE_DIR)/package.mk
|
|
31
|
+
|
|
32
|
+NMAP_DEPENDS:=+libpcap +libstdcpp
|
|
33
|
+NCAT_DEPENDS:=+libpcap
|
|
34
|
+NPING_DEPENDS:=+libpcap +libpthread +libstdcpp
|
|
35
|
+NDIFF_DEPENDS:=+python
|
|
36
|
+
|
|
37
|
+define Package/nmap/default
|
|
38
|
+ SUBMENU:=NMAP Suite
|
|
39
|
+ SECTION:=net
|
|
40
|
+ CATEGORY:=Network
|
|
41
|
+ URL:=http://nmap.org/
|
|
42
|
+endef
|
|
43
|
+
|
|
44
|
+define Package/nmap
|
|
45
|
+$(call Package/nmap/default)
|
|
46
|
+ DEPENDS:=$(NMAP_DEPENDS)
|
|
47
|
+ VARIANT:=nossl
|
|
48
|
+ TITLE:=Utility for network exploration or security auditing
|
|
49
|
+endef
|
|
50
|
+
|
|
51
|
+define Package/nmap-ssl
|
|
52
|
+$(call Package/nmap/default)
|
|
53
|
+ DEPENDS:=$(NMAP_DEPENDS) +libopenssl
|
|
54
|
+ VARIANT:=ssl
|
|
55
|
+ TITLE:=Nmap (with OpenSSL support)
|
|
56
|
+endef
|
|
57
|
+
|
|
58
|
+define Package/ncat
|
|
59
|
+$(call Package/nmap/default)
|
|
60
|
+ DEPENDS:=$(NCAT_DEPENDS)
|
|
61
|
+ VARIANT:=nossl
|
|
62
|
+ TITLE:=Much-improved reimplementation of Netcat
|
|
63
|
+endef
|
|
64
|
+
|
|
65
|
+define Package/ncat-ssl
|
|
66
|
+$(call Package/nmap/default)
|
|
67
|
+ DEPENDS:=$(NCAT_DEPENDS) +libopenssl
|
|
68
|
+ VARIANT:=ssl
|
|
69
|
+ TITLE:=Ncat (with OpenSSL support)
|
|
70
|
+endef
|
|
71
|
+
|
|
72
|
+define Package/nping
|
|
73
|
+$(call Package/nmap/default)
|
|
74
|
+ DEPENDS:=$(NPING_DEPENDS)
|
|
75
|
+ VARIANT:=nossl
|
|
76
|
+ TITLE:=Network packet generation tool / ping utility
|
|
77
|
+endef
|
|
78
|
+
|
|
79
|
+define Package/ndiff
|
|
80
|
+$(call Package/nmap/default)
|
|
81
|
+ DEPENDS:=$(NDIFF_DEPENDS)
|
|
82
|
+ VARIANT:=nossl
|
|
83
|
+ TITLE:=Utility to compare the results of Nmap scans
|
|
84
|
+endef
|
|
85
|
+
|
|
86
|
+CONFIGURE_ARGS += \
|
|
87
|
+ --with-libdnet=included \
|
|
88
|
+ --with-libpcre=included \
|
|
89
|
+ --with-libpcap="$(STAGING_DIR)/usr" \
|
|
90
|
+ --without-liblua
|
|
91
|
+
|
|
92
|
+CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
|
|
93
|
+
|
|
94
|
+ifeq ($(BUILD_VARIANT),ssl)
|
|
95
|
+ CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
|
|
96
|
+else
|
|
97
|
+ CONFIGURE_ARGS += --without-openssl
|
|
98
|
+endif
|
|
99
|
+
|
|
100
|
+define Package/nmap/install
|
|
101
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
102
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
|
|
103
|
+ $(INSTALL_DIR) $(1)/usr/share/nmap
|
|
104
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
|
|
105
|
+endef
|
|
106
|
+
|
|
107
|
+define Package/nmap-ssl/install
|
|
108
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
109
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
|
|
110
|
+ $(INSTALL_DIR) $(1)/usr/share/nmap
|
|
111
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
|
|
112
|
+endef
|
|
113
|
+
|
|
114
|
+define Package/ncat/install
|
|
115
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
116
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
|
|
117
|
+endef
|
|
118
|
+
|
|
119
|
+define Package/ncat-ssl/install
|
|
120
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
121
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
|
|
122
|
+ $(INSTALL_DIR) $(1)/usr/share/ncat
|
|
123
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
|
|
124
|
+endef
|
|
125
|
+
|
|
126
|
+define Package/ndiff/install
|
|
127
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
128
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
|
|
129
|
+endef
|
|
130
|
+
|
|
131
|
+define Package/nping/install
|
|
132
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
133
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/
|
|
134
|
+endef
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+$(eval $(call BuildPackage,nmap))
|
|
138
|
+$(eval $(call BuildPackage,nmap-ssl))
|
|
139
|
+$(eval $(call BuildPackage,ncat))
|
|
140
|
+$(eval $(call BuildPackage,ncat-ssl))
|
|
141
|
+$(eval $(call BuildPackage,nping))
|
|
142
|
+$(eval $(call BuildPackage,ndiff))
|