nuke $Id$ in /packages as well
[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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nmap
11 PKG_VERSION:=4.20
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
16 PKG_MD5SUM:=ea50419f99472200c4184a304e3831ea
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nmap
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libdnet +libpcap +libpcre +uclibcxx
24 TITLE:=Network exploration and/or security auditing utility
25 URL:=http://www.insecure.org/nmap/
26 endef
27
28 define Package/nmap/description
29 A free open source utility for network exploration or security auditing.
30 endef
31
32 CONFIGURE_ARGS += \
33 --without-openssl \
34 --without-nmapfe \
35 --with-libdnet="$(STAGING_DIR)/usr" \
36 --with-libpcap="$(STAGING_DIR)/usr" \
37 --with-libpcre="$(STAGING_DIR)/usr" \
38
39 CONFIGURE_VARS += \
40 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
41 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
42 LIBS="-nodefaultlibs -luClibc++ -lgcc" \
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Package/nmap/install
51 $(INSTALL_DIR) $(1)/usr/bin
52 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
53 $(INSTALL_DIR) $(1)/usr/share/nmap
54 for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \
55 $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$$$file $(1)/usr/share/nmap/ ; \
56 done
57 endef
58
59 $(eval $(call BuildPackage,nmap))