source: branches/packages_10.03.1/net/nmap/Makefile @ 29148

Last change on this file since 29148 was 29148, checked in by nico, 5 years ago

[backfire] packages/nmap: add dependencies on libnl (closes: #9868)

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