1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/security/sqlmap/Makefile
Ruslan Makhmatkhanov e791395a82 - fix runtime when devel/subversion and/or devel/pysvn is installed [1]
- bump PORTREVISION

As side effect, I completely disabled --update feature. It was done for number
of reasons:
- subversion relationship starts not only if --update feature is requested by
  user, but when pysvn or svn is available
- we do not installing repository metadata from the source tarball (exactly this
  breaks the --update option, but it is broken anyway, see below)
- aforementioned repository metadata is not compatible with svn 1.7, that is in
  ports now
- development repository moved to github from subversion hosting anyway

This is accomplished with replacing the call of getRevisionNumber() with static
const, that represents the svn last revision from tarball.

while here:
- trim Makefile header
- remove indefinite article from COMMENT
- convert to optionsng

Reported by:	Fausto Marzi <fausto.marzi at gmail dot com> (by mail) [1]
2012-10-03 20:01:09 +00:00

64 lines
1.7 KiB
Makefile

# Created by: Tomoyuki Sakurai <cherry@trombik.org>
# $FreeBSD$
PORTNAME= sqlmap
PORTVERSION= 0.9
PORTREVISION= 1
CATEGORIES= security python
MASTER_SITES= https://github.com/sqlmapproject/sqlmap/downloads/ \
SF
MAINTAINER= rm@FreeBSD.org
COMMENT= Automatic SQL injection tool
LICENSE= GPLv2
FETCH_ARGS= -pRr
USE_PYTHON= -2.7
WRKSRC= ${WRKDIR}/${PORTNAME}
SUB_FILES= ${PORTNAME}.sh
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
PATH=${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}
OPTIONS_DEFINE= MSF
MSF_DESC= Enable Metasploit Framework integration
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMSF}
RUN_DEPENDS+= ${LOCALBASE}/bin/msfcli:${PORTSDIR}/security/metasploit
.endif
post-patch:
(cd ${WRKSRC} && ${RM} -rf `${FIND} . -type d -name .svn`)
@${RM} -f ${WRKSRC}/lib/core/settings.py.orig
@${GREP} -lr '/usr/bin/env python' ${WRKSRC} | \
${XARGS} ${REINPLACE_CMD} -i "" \
-e "s!/usr/bin/env python!${PYTHON_CMD}!"
do-build:
@${PYTHON_CMD} -m compileall ${WRKSRC}
@${PYTHON_CMD} -O -m compileall ${WRKSRC}
${MKDIR} ${WRKDIR}/build/extra/
${MV} ${WRKSRC}/doc/ ${WRKDIR}/build/
.for F in msfauxmod runcmd udfhack
${MV} ${WRKSRC}/extra/${F} ${WRKDIR}/build/extra/${F}
.endfor
do-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
.for F in AUTHORS ChangeLog README.html README.pdf THANKS
${INSTALL_DATA} ${WRKDIR}/build/doc/${F} ${DOCSDIR}/
.endfor
.endif
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/extra
( cd ${WRKDIR}/build/extra/ && ${COPYTREE_SHARE} . ${DATADIR} )
( cd ${WRKSRC} && ${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME} )
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf-dist
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>