nmap: update to 7.40
[unleashed-userland.git] / components / sysutils / nmap / Makefile
blob871c25f51d74c2f3e64c0ff91756f072edf402db
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2016 Jim Klimov
27 include ../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= nmap
30 COMPONENT_VERSION= 7.40
31 COMPONENT_PROJECT_URL= http://nmap.org/
32 COMPONENT_FMRI= diagnostic/$(COMPONENT_NAME)
33 COMPONENT_CLASSIFICATION= System/Administration and Configuration
34 COMPONENT_SUMMARY= Network exploration tool and security / port scanner
35 COMPONENT_DESCRIPTION= Nmap is useful for inventorying the network, managing \
36 service upgrade schedules, and monitoring host or service uptime
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
38 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
39 COMPONENT_ARCHIVE_HASH= \
40 sha256:9e14665fffd054554d129d62c13ad95a7b5c7a046daa2290501909e65f4d3188
41 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)dist/$(COMPONENT_ARCHIVE)
42 COMPONENT_SIG_URL= $(COMPONENT_PROJECT_URL)dist/sigs/$(COMPONENT_ARCHIVE).asc
43 COMPONENT_BUGDB= utility/nmap
44 COMPONENT_LICENSE= GPLv2,OpenSSL,SSLeay
45 # Note: This license file incorporates nmap COPYING and OpenSSL license text
46 COMPONENT_LICENSE_FILE= nmap.license
48 include $(WS_MAKE_RULES)/prep.mk
49 include $(WS_MAKE_RULES)/configure.mk
50 include $(WS_MAKE_RULES)/ips.mk
52 PKG_OPTIONS += -D COMPONENT_DESCRIPTION="$(COMPONENT_DESCRIPTION)"
53 PKG_OPTIONS += -D PYTHON_VERSION="$(PYTHON_VERSION)"
55 COMPONENT_PREP_ACTION = (cd $(@D)/libdnet-stripped && autoconf)
57 COMPONENT_PRE_CONFIGURE_ACTION = \
58 ($(CLONEY) $(SOURCE_DIR) $(@D))
60 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
61 CONFIGURE_OPTIONS += LIBS="-lsocket -lnsl"
62 CONFIGURE_OPTIONS += PYTHON="$(PYTHON)"
63 CONFIGURE_OPTIONS += --srcdir=$(BUILD_DIR_$(BITS))
64 CONFIGURE_OPTIONS += --localstatedir=/var
65 CONFIGURE_OPTIONS += --without-localdirs
66 CONFIGURE_OPTIONS += --with-zenmap
67 CONFIGURE_OPTIONS += --with-openssl
68 CONFIGURE_OPTIONS += --with-libpcap
69 CONFIGURE_OPTIONS += --with-libpcre
70 # libdnet-stripped fails to build with external lua
71 CONFIGURE_OPTIONS += --with-liblua=included
72 CONFIGURE_OPTIONS += --with-ncat
73 CONFIGURE_OPTIONS += --with-ndiff
75 # pkgdepend doesn't like the first line of a Python script to be:
76 # '#!/usr/bin/env python' so turn it into '#!/usr/bin/python2.7'
77 COMPONENT_POST_INSTALL_ACTION += \
78 $(GSED) -e 's?env python?python$(PYTHON_VERSION)?' \
79 -i $(PROTOUSRBINDIR)/uninstall_zenmap && \
80 $(GSED) -e 's?env python?python$(PYTHON_VERSION)?' \
81 -i $(PROTOUSRBINDIR)/uninstall_ndiff
83 # common targets
84 build: $(BUILD_32)
86 install: $(INSTALL_32)
88 test: $(NO_TESTS)
90 REQUIRED_PACKAGES += SUNWcs
91 REQUIRED_PACKAGES += library/pcre
92 REQUIRED_PACKAGES += library/python/pygobject-27
93 REQUIRED_PACKAGES += library/python/pygtk2-27
94 REQUIRED_PACKAGES += library/security/openssl
95 REQUIRED_PACKAGES += runtime/python-27
96 REQUIRED_PACKAGES += system/library
97 REQUIRED_PACKAGES += system/library/g++-4-runtime
98 REQUIRED_PACKAGES += system/library/gcc-4-runtime
99 REQUIRED_PACKAGES += system/library/libpcap
100 REQUIRED_PACKAGES += system/library/math