[packages] prosody: update to 0.6.2, add an init script, enable the posix module...
[openwrt/svn-archive/archive.git] / net / nmap / Makefile
index ce4e607ebab06949771b62f5fa876ef9e927178d..e27e46de1f1a7b96d10e37c1e1698565237e3b54 100644 (file)
@@ -1,24 +1,21 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nmap
-PKG_VERSION:=4.01
-PKG_RELEASE:=1
-PKG_MD5SUM:=09c259837b24f6c7385c2c1c49760a7c
+PKG_VERSION:=4.20
+PKG_RELEASE:=2
 
-PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_CAT:=bzcat
+PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
+PKG_MD5SUM:=ea50419f99472200c4184a304e3831ea
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -27,40 +24,32 @@ 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.
-  URL:=http://www.insecure.org/nmap/
+  URL:=http://nmap.org/
 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)")
+define Package/nmap/description
+ A free open source utility for network exploration or security auditing.
 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/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; \
+CONFIGURE_ARGS += \
+       --without-openssl \
+       --without-nmapfe \
+       --with-libdnet="$(STAGING_DIR)/usr" \
+       --with-libpcap="$(STAGING_DIR)/usr" \
+       --with-libpcre="$(STAGING_DIR)/usr" \
+
+CONFIGURE_VARS += \
+       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
+       CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
+       LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S)" \
+
+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
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
 endef
 
-
 $(eval $(call BuildPackage,nmap))