1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00
freebsd-ports/security/zenmap/Makefile
Rusmir Dusko 130dd48892 - Update to 6.46, Announce message:
Fixed a bug which caused this crash message:
     IOError: [Errno socket error] [Errno 10060] A connection attempt failed
     because the connected party did not properly respond after a period of
     time, or established connection failed because connected host has
     failed to respond
  The bug was caused by us adding a DOCTYPE definition to Nmap's XML
  output which caused Python's XML parser to try and fetch the DTD
  every time it parses an XML file. We now override that DTD-fetching
  behavior. [Daniel Miller]
2014-04-29 08:45:30 +00:00

89 lines
2.8 KiB
Makefile

# Created by: Daniel Roethlisberger <daniel@roe.ch>
# $FreeBSD$
PORTNAME= zenmap
PORTVERSION= 6.46
CATEGORIES= security ipv6
MASTER_SITES= http://nmap.org/dist/ \
SF/nemysisfreebsdp/security/:icons
DISTNAME= nmap-${PORTVERSION}
DISTFILES= nmap-${PORTVERSION}${EXTRACT_SUFX} \
${PORTNAME}.png:icons
EXTRACT_ONLY= nmap-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= nemysis@FreeBSD.org
COMMENT= GUI frontend for the Nmap scanning utility
LICENSE= GPLv2
RUN_DEPENDS= nmap:${PORTSDIR}/security/nmap \
${PYTHON_PACKAGENAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3
WRKSRC= ${WRKDIR}/${DISTNAME}/${PORTNAME}
USES= dos2unix tar:bzip2
DOS2UNIX_GLOB= *.xml
USE_GNOME= pygtk2
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext
SUB_FILES= zenmap-root
.include <bsd.port.options.mk>
post-extract:
@${RM} -f ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh
@${CP} -a ${FILESDIR}/pc-su ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh
post-patch:
@${FIND} ${WRKSRC} -name '*.py' -or -name '*.pyw' | ${XARGS} \
${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|'
@${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|' \
${WRKSRC}/zenmap
@${FIND} ${WRKSRC}/../ndiff -name '*.py' | ${XARGS} \
${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|'
@${REINPLACE_CMD} -e 's|su-to-zenmap.sh|zenmap-root|; \
s| %F||' \
${WRKSRC}/install_scripts/unix/zenmap-root.desktop
@${REINPLACE_CMD} -e 's|Security;|Security;System;|' \
${WRKSRC}/install_scripts/unix/zenmap-root.desktop \
${WRKSRC}/install_scripts/unix/zenmap.desktop
@${REINPLACE_CMD} \
-e '/self.create_uninstaller/s|^|#|; \
s|distutils\.command\.install |setuptools\.command\.install |; \
s|self.saved_prefix, pixmaps_dir, ||' \
${WRKSRC}/setup.py
@${REINPLACE_CMD} \
-e 's|share/man/man1|man/man1|; \
s|"install": checked_install||' \
${WRKSRC}/../ndiff/setup.py
@${FIND} ${WRKSRC} -name "*.bak" -delete
@${FIND} ${WRKSRC}/../ndiff -name "*.bak" -delete
.if ! ${PORT_OPTIONS:MNLS}
@${REINPLACE_CMD} -i '' '/locale_dir, mo_find, /d' ${WRKSRC}/setup.py
.endif
post-install:
${INSTALL_SCRIPT} ${WRKDIR}/zenmap-root ${STAGEDIR}${PREFIX}/bin/
@(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 754 su-to-zenmap.sh)
${INSTALL_MAN} ${WRKSRC}/../docs/zenmap.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1/
@(cd ${WRKSRC}/../ndiff \
&& ${PYTHON_CMD} setup.py install --prefix=${STAGEDIR}${PREFIX})
@(cd ${STAGEDIR}${PYTHON}${PYTHON_SITELIBDIR} && ${RM} ndiff.pyc)
@(cd ${STAGEDIR}${PYTHON}${PYTHON_SITELIBDIR} && ${PYTHON_CMD} -m compileall .)
@(cd ${STAGEDIR}${PYTHON}${PYTHON_SITELIBDIR} && ${PYTHON_CMD} -O -m compileall .)
${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
.include <bsd.port.mk>