source: packages_10.03.1/net/nmap/Makefile @ 27593

Last change on this file since 27593 was 26951, checked in by florian, 5 years ago

[packages] fix nmap build variants (#9387)

The default variant of nmap does not appear to be building correctly, if
at all (all invocations of configure have --with-openssl). Add a nossl
variant to fix building.

Set PKG_BULID_DIR to differ between variants to prevent overlapping of
builds.

Signed-off-by: Kevin Locke <klocke@…>

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