security/zenmap: Update to 7.25 BETA2 and use security/nmap as MASTERDIR

security/nmap:
- Ensure MAINTAINER and COMMENT do not clobber those of slave port
- Add .if !defined(MASTERDIR) to prevent inclusion in slave port
- Do not include bsd.port.options.mk, as none of the features are used

security/zenmap:
- Convert to slave of security/nmap to ensure they are updated in lockstep
- Inherently update to 7.25 BETA2 (current version of security/nmap)
- Take maintainership
- Remove redundant port header variables included from MASTERDIR
- PKGNAME of zenmap achieved using PKGNAMEPREFIX=ze and PORTNAME=nmap
- Inherit LICENSE_FILE, as zenmap/COPYING states it is the same as nmap
- Set directory variables so they are not inhereted from MASTERDIR
- Convert post-extract to post-patch, as it is modifying WRKSRC files
- Fix REINPLACE command, as it was leaving the line with nothing but a
  single ',' and causing the build to fail
- Do not download external zenmap icon, as one is included in distfile

Approved by:	ohauer (security/nmap maintainer), mat (mentor)
Differential Revision:	https://reviews.freebsd.org/D7880
This commit is contained in:
Ben Woods 2016-09-17 00:13:38 +00:00
parent 6efcbda657
commit e50b5c5e8d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=422291
3 changed files with 21 additions and 34 deletions

View File

@ -7,8 +7,8 @@ CATEGORIES= security ipv6
MASTER_SITES= http://nmap.org/dist/ \
LOCAL/ohauer
MAINTAINER= ohauer@FreeBSD.org
COMMENT= Port scanning utility for large networks
MAINTAINER?= ohauer@FreeBSD.org
COMMENT?= Port scanning utility for large networks
# nmap-6.47 => svn.nmap.org/nmap-releases/nmap-6.47 (r33605)
# http://nmap.org/book/man-legal.html
@ -17,6 +17,8 @@ COMMENT= Port scanning utility for large networks
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
.if !defined(MASTERDIR)
LIB_DEPENDS= libpcre.so:devel/pcre
USES= tar:bzip2 gmake cpe
@ -33,8 +35,6 @@ SSL_CONFIGURE_OFF= --without-openssl
SSL_CFLAGS= -I${OPENSSLINC}
SSL_VARS= STRIP_FILES=ncat
.include <bsd.port.options.mk>
DOCS= CHANGELOG HACKING
STRIP_FILES+= nmap nping
@ -62,4 +62,6 @@ post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,27 +1,20 @@
# Created by: Daniel Roethlisberger <daniel@roe.ch>
# $FreeBSD$
PORTNAME= zenmap
PORTVERSION= 6.47
PORTREVISION= 1
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}
PKGNAMEPREFIX= ze
MAINTAINER= ports@FreeBSD.org
MAINTAINER= woodsb02@FreeBSD.org
COMMENT= GUI frontend for the Nmap scanning utility
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= nmap:security/nmap \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3
WRKSRC_SUBDIR= ${PORTNAME}
MASTERDIR= ${.CURDIR}/../nmap
PATCHDIR= ${.CURDIR}/files
FILESDIR= ${.CURDIR}/files
DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
PKGDIR= ${.CURDIR}
WRKSRC_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME}
USES= dos2unix python tar:bzip2
DOS2UNIX_GLOB= *.xml
@ -37,11 +30,9 @@ NLS_USES= gettext
SUB_FILES= zenmap-root
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:
@${RM} ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh
@${CP} -a ${FILESDIR}/pc-su ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh
@${FIND} ${WRKSRC} -name '*.py' -or -name '*.pyw' | ${XARGS} \
${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|'
@${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|' \
@ -60,8 +51,8 @@ post-patch:
s|self.saved_prefix, pixmaps_dir, ||' \
${WRKSRC}/setup.py
@${REINPLACE_CMD} \
-e 's|share/man/man1|man/man1|; \
s|"install": checked_install||' \
-e 's|share/man/man1|man/man1|' \
-e '/"install": checked_install/d' \
${WRKSRC}/../ndiff/setup.py
@${FIND} ${WRKSRC} -name "*.bak" -delete
@${FIND} ${WRKSRC}/../ndiff -name "*.bak" -delete
@ -71,7 +62,7 @@ post-patch-NLS-off:
post-install:
${INSTALL_SCRIPT} ${WRKDIR}/zenmap-root ${STAGEDIR}${PREFIX}/bin/
@(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 754 su-to-zenmap.sh)
@${CHMOD} 754 ${STAGEDIR}${DATADIR}/su-to-zenmap.sh
${INSTALL_MAN} ${WRKSRC}/../docs/zenmap.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1/
@(cd ${WRKSRC}/../ndiff \
@ -79,8 +70,6 @@ post-install:
@(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 .)
@(cd ${STAGEDIR}${PREFIX}/share/pixmaps && ${LN} -sf ../zenmap/pixmaps/zenmap.png zenmap.png)
${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
.include <bsd.port.mk>
.include "${MASTERDIR}/Makefile"

View File

@ -1,4 +0,0 @@
SHA256 (nmap-6.47.tar.bz2) = 8fa11e9e203ce2d81a207db5ca4f110a525f6c01c1dd0018325a7112a51aa591
SIZE (nmap-6.47.tar.bz2) = 7878122
SHA256 (zenmap.png) = 55c232603d0cf02ee2e7cc0c0ba02101d18a33555644a6348fb533329c4cfce1
SIZE (zenmap.png) = 2832