3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=0713306dda85aee2c95ef31b4b7d2838
10 PKG_SOURCE_URL
:=http
://download.insecure.org
/nmap
/dist
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 IPKG_NMAP
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 IDIR_NMAP
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
18 INFO_NMAP
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
20 $(DL_DIR
)/$(PKG_SOURCE
):
21 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
23 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
24 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
25 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
26 touch
$(PKG_BUILD_DIR
)/.prepared
28 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
29 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
30 $(TARGET_CONFIGURE_OPTS
) \
31 libpcapdir
="$(STAGING_DIR)/usr/lib" \
32 CFLAGS
="$(TARGET_CFLAGS)" \
33 CXXFLAGS
="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -nodefaultlibs " \
34 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
35 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -fno-builtin -nostdinc++ -nodefaultlibs -luClibc++ -lc -lm" \
36 ac_cv_prog_CXX
="$(TARGET_CXX)" \
38 --target
=$(GNU_TARGET_NAME
) \
39 --host
=$(GNU_TARGET_NAME
) \
40 --build
=$(GNU_HOST_NAME
) \
46 --datadir=/usr
/share \
47 --includedir=/usr
/include \
48 --infodir=/usr
/share
/info \
50 --libexecdir
=/usr
/lib \
51 --localstatedir
=/var \
52 --mandir=/usr
/share
/man \
56 --with-libpcap
="$(STAGING_DIR)/usr" \
57 --with-libpcre
="$(STAGING_DIR)/usr" \
59 $(DISABLE_LARGEFILE
) \
61 touch
$(PKG_BUILD_DIR
)/.configured
63 $(PKG_BUILD_DIR
)/$(PKG_NAME
): $(PKG_BUILD_DIR
)/.configured
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 $(TARGET_CONFIGURE_OPTS
) \
66 CCOPT
="-fno-builtin -nostdinc++ -nodefaultlibs $(TARGET_CFLAGS)"
68 $(IPKG_NMAP
): $(PKG_BUILD_DIR
)/$(PKG_NAME
)
69 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_NMAP
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
70 mkdir
-p
$(IDIR_NMAP
)/usr
/share
/nmap
71 for file in mac-prefixes os-fingerprints protocols rpc service-probes services
; do \
72 cp
$(PKG_BUILD_DIR
)/nmap-
$$file $(IDIR_NMAP
)/usr
/share
/nmap
; \
74 mkdir
-p
$(IDIR_NMAP
)/usr
/sbin
75 cp
$(PKG_BUILD_DIR
)/$(PKG_NAME
) $(IDIR_NMAP
)/usr
/sbin
/
76 $(STRIP
) $(IDIR_NMAP
)/usr
/sbin
/*
77 mkdir
-p
$(PACKAGE_DIR
)
78 $(IPKG_BUILD
) $(IDIR_NMAP
) $(PACKAGE_DIR
)
80 $(INFO_NMAP
): $(IPKG_NMAP
)
81 $(IPKG
) install $(IPKG_NMAP
)
83 source
: $(DL_DIR
)/$(PKG_SOURCE
)
84 prepare
: $(PKG_BUILD_DIR
)/.prepared
89 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_NMAP
)