From: Nicolas Thill Date: Mon, 30 Oct 2006 13:54:43 +0000 (+0000) Subject: rename and simplify nmap patches, Makefile cleanup X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c397c9e8ca3e6211002c3b51f4a6a6dcea2d9f2b;p=openwrt%2Fsvn-archive%2Farchive.git rename and simplify nmap patches, Makefile cleanup SVN-Revision: 5349 --- diff --git a/net/nmap/Makefile b/net/nmap/Makefile index ce4e607eba..9eacdcbc0f 100644 --- a/net/nmap/Makefile +++ b/net/nmap/Makefile @@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nmap PKG_VERSION:=4.01 PKG_RELEASE:=1 -PKG_MD5SUM:=09c259837b24f6c7385c2c1c49760a7c -PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist +PKG_MD5SUM:=09c259837b24f6c7385c2c1c49760a7c PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist PKG_CAT:=bzcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) @@ -27,40 +27,38 @@ define Package/nmap CATEGORY:=Network DEPENDS:=+libdnet +libpcap +libpcre +uclibcxx TITLE:=Network exploration and/or security auditing utility - DESCRIPTION:=A free open source utility for network exploration or security auditing. + DESCRIPTION:=\ + A free open source utility for network exploration or security auditing. URL:=http://www.insecure.org/nmap/ endef define Build/Configure -$(call Build/Configure/Default,--without-openssl \ - --without-nmapfe \ - --with-libdnet="$(STAGING_DIR)/usr" \ - --with-libpcap="$(STAGING_DIR)/usr" \ - --with-libpcre="$(STAGING_DIR)/usr", libpcapdir="$(STAGING_DIR)/usr/lib" \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm -lgcc" \ - ac_cv_prog_CXX="$(TARGET_CXX)") + $(call Build/Configure/Default, \ + --without-openssl \ + --without-nmapfe \ + --with-libdnet="$(STAGING_DIR)/usr" \ + --with-libpcap="$(STAGING_DIR)/usr" \ + --with-libpcre="$(STAGING_DIR)/usr" \ + , \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" \ + ) endef define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CCOPT="$(TARGET_CFLAGS) -fno-builtin -nostdinc++" \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install endef define Package/nmap/install + install -d -m0755 $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ install -d -m0755 $(1)/usr/share/nmap for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$$$file $(1)/usr/share/nmap; \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$$$file $(1)/usr/share/nmap/ ; \ done - install -d -m0755 $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ endef - $(eval $(call BuildPackage,nmap)) diff --git a/net/nmap/patches/01-cross_compile.patch b/net/nmap/patches/01-cross_compile.patch new file mode 100644 index 0000000000..1a997e8866 --- /dev/null +++ b/net/nmap/patches/01-cross_compile.patch @@ -0,0 +1,30 @@ +# +# Just assume pcap version is recent enough when cross-compiling +# +diff -ruN nmap-4.01-old/configure nmap-4.01-new/configure +--- nmap-4.01-old/configure 2006-02-02 03:18:42.000000000 +0100 ++++ nmap-4.01-new/configure 2006-10-23 22:08:15.000000000 +0200 +@@ -5765,9 +5765,9 @@ + + fi; + +-if test $linux = yes; then +- have_libpcap=no +-fi ++#if test $linux = yes; then ++# have_libpcap=no ++#fi + + if test $needs_cpp_precomp = yes; then + CXXFLAGS="-no-cpp-precomp $CXXFLAGS" +@@ -5788,8 +5788,8 @@ + 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: result: no" >&5 +-echo "${ECHO_T}no" >&6; have_libpcap=no ++ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; have_libpcap=yes + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/net/nmap/patches/02-no_strip.patch b/net/nmap/patches/02-no_strip.patch new file mode 100644 index 0000000000..ffe953e285 --- /dev/null +++ b/net/nmap/patches/02-no_strip.patch @@ -0,0 +1,12 @@ +diff -urN nmap-4.01.old/Makefile.in nmap-4.01.dev/Makefile.in +--- nmap-4.01.old/Makefile.in 2006-02-09 19:22:27.000000000 -0700 ++++ nmap-4.01.dev/Makefile.in 2006-03-29 23:14:12.000000000 -0700 +@@ -144,7 +135,7 @@ + + install-nmap: $(TARGET) + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(nmapdatadir) +- $(INSTALL) -c -m 755 -s nmap $(DESTDIR)$(bindir)/nmap ++ $(INSTALL) -c -m 755 nmap $(DESTDIR)$(bindir)/nmap + $(INSTALL) -c -m 644 docs/$(TARGET).1 $(DESTDIR)$(mandir)/man1/$(TARGET).1 + $(INSTALL) -c -m 644 docs/nmap.xsl $(DESTDIR)$(nmapdatadir)/ + $(INSTALL) -c -m 644 docs/nmap.dtd $(DESTDIR)$(nmapdatadir)/ diff --git a/net/nmap/patches/cross-compile.patch b/net/nmap/patches/cross-compile.patch deleted file mode 100644 index 5c3785c4b3..0000000000 --- a/net/nmap/patches/cross-compile.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -urN nmap-4.01.old/configure nmap-4.01.dev/configure ---- nmap-4.01.old/configure 2006-02-01 19:18:42.000000000 -0700 -+++ nmap-4.01.dev/configure 2006-03-29 23:14:28.000000000 -0700 -@@ -1341,12 +1341,6 @@ - fi - fi - --libpcapdir=libpcap -- -- --pcredir=libpcre -- -- - ac_config_headers="$ac_config_headers config.h" - - -diff -urN nmap-4.01.old/Makefile.in nmap-4.01.dev/Makefile.in ---- nmap-4.01.old/Makefile.in 2006-02-09 19:22:27.000000000 -0700 -+++ nmap-4.01.dev/Makefile.in 2006-03-29 23:14:12.000000000 -0700 -@@ -29,7 +29,7 @@ - # CFLAGS = $(DEFS) $(INCLS) - STATIC = - LDFLAGS = @LDFLAGS@ $(STATIC) --LIBS = @LIBNBASE_LIBS@ @LIBNSOCK_LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ @OPENSSL_LIBS@ @LIBDNET_LIBS@ @LIBS@ -+LIBS = @LIBNBASE_LIBS@ @LIBNSOCK_LIBS@ -lpcre -lpcap @OPENSSL_LIBS@ -ldnet @LIBS@ - # LIBS = -lefence @LIBS@ - # LIBS = -lrmalloc @LIBS@ - SHTOOL = ./shtool -@@ -68,15 +68,6 @@ - # all of the prerequisites (e.g. recursive makes and such) - FORCE: - --$(LIBPCREDIR)/libpcre.a: $(LIBPCREDIR)/Makefile FORCE -- @echo Compiling libpcre; cd $(LIBPCREDIR) && $(MAKE) -- --$(LIBDNETDIR)/src/.libs/libdnet.a: $(LIBDNETDIR)/Makefile FORCE -- @echo Compiling libdnet; cd $(LIBDNETDIR) && $(MAKE) -- --$(LIBPCAPDIR)/libpcap.a: $(LIBPCAPDIR)/Makefile FORCE -- @echo Compiling libpcap; cd $(LIBPCAPDIR) && $(MAKE) -- - $(NBASEDIR)/libnbase.a: $(NBASEDIR)/Makefile FORCE - @echo Compiling libnbase; - cd $(NBASEDIR) && $(MAKE) diff --git a/net/nmap/patches/no_strip.patch b/net/nmap/patches/no_strip.patch deleted file mode 100644 index ffe953e285..0000000000 --- a/net/nmap/patches/no_strip.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN nmap-4.01.old/Makefile.in nmap-4.01.dev/Makefile.in ---- nmap-4.01.old/Makefile.in 2006-02-09 19:22:27.000000000 -0700 -+++ nmap-4.01.dev/Makefile.in 2006-03-29 23:14:12.000000000 -0700 -@@ -144,7 +135,7 @@ - - install-nmap: $(TARGET) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(nmapdatadir) -- $(INSTALL) -c -m 755 -s nmap $(DESTDIR)$(bindir)/nmap -+ $(INSTALL) -c -m 755 nmap $(DESTDIR)$(bindir)/nmap - $(INSTALL) -c -m 644 docs/$(TARGET).1 $(DESTDIR)$(mandir)/man1/$(TARGET).1 - $(INSTALL) -c -m 644 docs/nmap.xsl $(DESTDIR)$(nmapdatadir)/ - $(INSTALL) -c -m 644 docs/nmap.dtd $(DESTDIR)$(nmapdatadir)/