[packages] nmap: update to version 5.36TEST3, added ncat, nping, ndiff and versions with ssl support

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24947 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nunojpg 2011-01-09 16:19:02 +00:00
parent c85425c52f
commit 79d734c15a
3 changed files with 102 additions and 48 deletions

View File

@ -1,56 +1,132 @@
#TODO
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# * uClibcpp not supported, performance +100x slower. libstdcpp is being used. https://bugs.busybox.net/show_bug.cgi?id=2545
# * liblua is still not recognized/blindly accepted. Impossible to compile with support
#
include $(TOPDIR)/rules.mk
PKG_NAME:=nmap
PKG_VERSION:=5.35DC1
PKG_VERSION:=5.36TEST3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
PKG_MD5SUM:=5bc2f8629f26716aa78d4bfe474a5d3a
PKG_SOURCE_URL:=http://nmap.org/dist/
PKG_MD5SUM:=963fd9a3daec3c6770a411339c5a27e9
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/nmap
NMAP_DEPENDS:=+libpcap +libstdcpp
NCAT_DEPENDS:=+libpcap
NPING_DEPENDS:=+libpcap +libpthread
define Package/nmap/default
SUBMENU:=NMAP Suite
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libdnet +libpcap +libpcre +uclibcxx
TITLE:=Network exploration and/or security auditing utility
URL:=http://nmap.org/
MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
endef
define Package/nmap/description
A free open source utility for network exploration or security auditing.
define Package/nmap
$(call Package/nmap/default)
DEPENDS:=$(NMAP_DEPENDS)
TITLE:=nmap tool(without ssl support)
endef
define Package/nmap-ssl
$(call Package/nmap/default)
DEPENDS:=$(NMAP_DEPENDS) +libopenssl
VARIANT:=ssl
TITLE:=nmap tool(with openssl support)
endef
define Package/ncat
$(call Package/nmap/default)
DEPENDS:=$(NCAT_DEPENDS)
TITLE:=ncat tool(without ssl support)
endef
define Package/ncat-ssl
$(call Package/nmap/default)
DEPENDS:=$(NCAT_DEPENDS) +libopenssl
VARIANT:=ssl
TITLE:=ncat tool(with openssl support)
endef
define Package/nping
$(call Package/nmap/default)
DEPENDS:=$(NPING_DEPENDS)
TITLE:=nping tool
endef
define Package/ndiff
$(call Package/nmap/default)
DEPENDS:=+python
TITLE:=ndiff tool
endef
define Package/nmap/config
source "$(SOURCE)/Config_nossl.in"
endef
define Package/nmap-ssl/config
source "$(SOURCE)/Config_ssl.in"
endef
CONFIGURE_ARGS += \
--without-openssl \
--without-nmapfe \
--without-liblua \
--with-libdnet=included \
--with-libpcre=included \
--with-libpcap="$(STAGING_DIR)/usr" \
--without-liblua
CONFIGURE_VARS += \
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
LDFLAGS="$$$$LDFLAGS -lm" \
LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S)" \
CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti"
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS += --without-openssl
endif
define Package/nmap/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/nmap
for file in mac-prefixes os-db os-fingerprints protocols rpc service-probes services; do \
$(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$$$file $(1)/usr/share/nmap/ ; \
done
$(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
endef
define Package/nmap-ssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/nmap
$(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
endef
define Package/ncat/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
endef
define Package/ncat-ssl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/ncat
$(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
endef
define Package/ndiff/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
endef
define Package/nping/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/
endef
$(eval $(call BuildPackage,nmap))
$(eval $(call BuildPackage,nmap-ssl))
$(eval $(call BuildPackage,ncat))
$(eval $(call BuildPackage,ncat-ssl))
$(eval $(call BuildPackage,nping))
$(eval $(call BuildPackage,ndiff))

View File

@ -1,11 +0,0 @@
--- a/output.cc
+++ b/output.cc
@@ -2240,7 +2240,7 @@ struct data_file_record {
/* Compares this record to another. First compare the directory names, then
compare the file names. */
- bool operator<(const struct data_file_record &other) {
+ bool operator<(const struct data_file_record &other) const {
int cmp;
cmp = dir.compare(other.dir);

View File

@ -1,11 +0,0 @@
--- a/ncat/Makefile.in
+++ b/ncat/Makefile.in
@@ -136,7 +136,7 @@ $(NSOCKDIR)/libnsock.a: $(NSOCKDIR)/Make
install: $(TARGET)
@echo Installing Ncat;
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(mandir)/man1
- $(INSTALL) -c -m 755 -s ncat $(DESTDIR)$(bindir)/ncat
+ $(INSTALL) -c -m 755 ncat $(DESTDIR)$(bindir)/ncat
if [ -n "$(DATAFILES)" ]; then \
$(INSTALL) -c -m 644 $(DATAFILES) $(DESTDIR)$(pkgdatadir)/; \
fi