Add gw6c and make it link against uclibcxx (#2125)
[openwrt/svn-archive/archive.git] / net / nmap / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=nmap
12 PKG_VERSION:=4.20
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
17 PKG_MD5SUM:=ea50419f99472200c4184a304e3831ea
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/nmap
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+libdnet +libpcap +libpcre +uclibcxx
25 TITLE:=Network exploration and/or security auditing utility
26 URL:=http://www.insecure.org/nmap/
27 endef
28
29 define Package/nmap/description
30 A free open source utility for network exploration or security auditing.
31 endef
32
33 CONFIGURE_ARGS += \
34 --without-openssl \
35 --without-nmapfe \
36 --with-libdnet="$(STAGING_DIR)/usr" \
37 --with-libpcap="$(STAGING_DIR)/usr" \
38 --with-libpcre="$(STAGING_DIR)/usr" \
39
40 CONFIGURE_VARS += \
41 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
42 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
43 LIBS="-nodefaultlibs -luClibc++ -lgcc" \
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install
49 endef
50
51 define Package/nmap/install
52 $(INSTALL_DIR) $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
54 $(INSTALL_DIR) $(1)/usr/share/nmap
55 for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \
56 $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$$$file $(1)/usr/share/nmap/ ; \
57 done
58 endef
59
60 $(eval $(call BuildPackage,nmap))