From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/nmap/Config.in | 30 ++++++++++ package/nmap/Makefile | 50 ++++++++++++++++ package/nmap/ipkg/nmap.control | 4 ++ package/nmap/patches/patch-configure | 99 ++++++++++++++++++++++++++++++++ package/nmap/patches/patch-nmap_dns_h | 13 +++++ package/nmap/patches/patch-output_cc | 12 ++++ package/nmap/patches/patch-traceroute_cc | 16 ++++++ 7 files changed, 224 insertions(+) create mode 100644 package/nmap/Config.in create mode 100644 package/nmap/Makefile create mode 100644 package/nmap/ipkg/nmap.control create mode 100644 package/nmap/patches/patch-configure create mode 100644 package/nmap/patches/patch-nmap_dns_h create mode 100644 package/nmap/patches/patch-output_cc create mode 100644 package/nmap/patches/patch-traceroute_cc (limited to 'package/nmap') diff --git a/package/nmap/Config.in b/package/nmap/Config.in new file mode 100644 index 000000000..f97017eeb --- /dev/null +++ b/package/nmap/Config.in @@ -0,0 +1,30 @@ +config ADK_PACKAGE_NMAP + prompt "nmap.............................. Network exploration and/or security auditing utility" + tristate + default n + depends on ADK_CXX + select ADK_PACKAGE_LIBDNET + select ADK_PACKAGE_LIBPCAP + select ADK_PACKAGE_LIBPCRE + help + A free open source utility for network exploration or security auditing. + + http://www.insecure.org/nmap/ + +choice +prompt "C++ library to use" +depends on ADK_PACKAGE_NMAP +default ADK_COMPILE_NMAP_WITH_STDCXX if ADK_TARGET_LIB_GLIBC +default ADK_COMPILE_NMAP_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC + +config ADK_COMPILE_NMAP_WITH_STDCXX + bool "Standard C++ library" + select ADK_PACKAGE_LIBSTDCXX + help + +config ADK_COMPILE_NMAP_WITH_UCLIBCXX + bool "Embedded uClibc++ library" + select ADK_PACKAGE_UCLIBCXX + help + +endchoice diff --git a/package/nmap/Makefile b/package/nmap/Makefile new file mode 100644 index 000000000..93793716d --- /dev/null +++ b/package/nmap/Makefile @@ -0,0 +1,50 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= nmap +PKG_VERSION:= 4.76 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 278dd2e849cc3dbb947df961a1aaffd0 +MASTER_SITES:= http://download.insecure.org/nmap/dist/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +PKG_DEPEND:= libgcc libdnet libpcap libpcre +ifeq ($(ADK_COMPILE_NMAP_WITH_UCLIBCXX),y) +PKG_DEPEND+= uclibc++ +else +PKG_DEPEND+= libstdcxx +endif + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,NMAP,nmap,${PKG_VERSION}-${PKG_RELEASE},${ARCH},${PKG_DEPEND})) + +TCPPFLAGS+= -DNOLUA +ifeq ($(ADK_COMPILE_NMAP_WITH_UCLIBCXX),y) +CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ \ + -I${STAGING_DIR}/usr/include/uClibc++" \ + LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" +endif +CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --without-openssl \ + --without-zenmap \ + --without-liblua \ + --with-libdnet="${STAGING_DIR}/usr" \ + --with-libpcap="${STAGING_DIR}/usr" \ + --with-libpcre="${STAGING_DIR}/usr" +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_NMAP}/usr/share/nmap + ${INSTALL_DIR} ${IDIR_NMAP}/usr/bin + for file in mac-prefixes os-db protocols rpc service-probes services; do \ + ${CP} ${WRKINST}/usr/share/nmap/nmap-$$file ${IDIR_NMAP}/usr/share/nmap; \ + done + ${INSTALL_BIN} ${WRKINST}/usr/bin/nmap ${IDIR_NMAP}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/nmap/ipkg/nmap.control b/package/nmap/ipkg/nmap.control new file mode 100644 index 000000000..9b9398d0b --- /dev/null +++ b/package/nmap/ipkg/nmap.control @@ -0,0 +1,4 @@ +Package: nmap +Priority: optional +Section: net +Description: Nmap is a free open source utility for network exploration or security auditing. diff --git a/package/nmap/patches/patch-configure b/package/nmap/patches/patch-configure new file mode 100644 index 000000000..378c086e2 --- /dev/null +++ b/package/nmap/patches/patch-configure @@ -0,0 +1,99 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- nmap-4.76.orig/configure 2008-09-09 01:37:03.000000000 +0200 ++++ nmap-4.76/configure 2008-12-14 18:54:23.000000000 +0100 +@@ -4035,7 +4035,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA= + + + if test -n "$GXX"; then +- CXXFLAGS="$CXXFLAGS -Wall " ++ CXXFLAGS="$CXXFLAGS " + fi + + { echo "$as_me:$LINENO: checking whether the compiler is gcc 4 or greater" >&5 +@@ -6656,86 +6656,6 @@ if test $needs_cpp_precomp = yes; then + CXXFLAGS="-no-cpp-precomp $CXXFLAGS" + fi + +-if test $have_libpcap = yes; then +- if test "${LIBPCAP_INC+set}" = "set"; then +- _cflags=$CXXFLAGS +- _ldflags=$LDFLAGS +- +- CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS" +- LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS" +- fi +- +- # link with -lpcap for the purposes of this test +- LIBS_OLD="$LIBS" +- LIBS="$LIBS -lpcap" +- { echo "$as_me:$LINENO: checking if libpcap version is recent enough" >&5 +-echo $ECHO_N "checking if libpcap version is recent enough... $ECHO_C" >&6; } +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-extern char pcap_version[]; +-int main() { +- int major, minor1, minor2; +- sscanf(pcap_version,"%d.%d.%d", &major, &minor1, &minor2); +- if (major > 0) +- exit(0); +- if (minor1 < 9) +- exit(1); +- if (minor2 < 4) +- exit(1); +- exit(0); +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; }; have_libpcap=yes +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-{ echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; }; have_libpcap=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-LIBS="$LIBS_OLD" +-fi +- + LIBPCAP_LIBS="-lpcap" + if test $have_libpcap = yes; then + PCAP_DEPENDS="" diff --git a/package/nmap/patches/patch-nmap_dns_h b/package/nmap/patches/patch-nmap_dns_h new file mode 100644 index 000000000..2868f42ba --- /dev/null +++ b/package/nmap/patches/patch-nmap_dns_h @@ -0,0 +1,13 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- nmap-4.76.orig/nmap_dns.h 2008-08-21 11:24:35.000000000 +0200 ++++ nmap-4.76/nmap_dns.h 2008-12-14 19:40:58.000000000 +0100 +@@ -95,6 +95,9 @@ + * * + ***************************************************************************/ + ++#include ++#include ++ + class Target; + + void nmap_mass_rdns(Target ** targets, int num_targets); diff --git a/package/nmap/patches/patch-output_cc b/package/nmap/patches/patch-output_cc new file mode 100644 index 000000000..cdabf2449 --- /dev/null +++ b/package/nmap/patches/patch-output_cc @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- nmap-4.76.orig/output.cc 2008-09-10 20:32:35.000000000 +0200 ++++ nmap-4.76/output.cc 2008-10-29 13:29:04.000000000 +0100 +@@ -2003,7 +2003,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); diff --git a/package/nmap/patches/patch-traceroute_cc b/package/nmap/patches/patch-traceroute_cc new file mode 100644 index 000000000..79514733b --- /dev/null +++ b/package/nmap/patches/patch-traceroute_cc @@ -0,0 +1,16 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- nmap-4.76.orig/traceroute.cc 2008-09-06 06:12:34.000000000 +0200 ++++ nmap-4.76/traceroute.cc 2008-10-29 13:42:16.000000000 +0100 +@@ -850,9 +850,12 @@ Traceroute::outputTarget (Target * t) { + tg = TraceGroups[t->v4host ().s_addr]; + + /* sort into ttl order */ ++ /* quick hack + for (it = tg->TraceProbes.begin (); it != tg->TraceProbes.end (); ++it) + sortedProbes[it->second->ttl] = it->second; + sortedProbes.swap (tg->TraceProbes); ++ */ ++ + + /* clean up and consolidate traces */ + tg->consolidateHops (); -- cgit v1.2.3