blob: ec62c5a9605d3c2ef14c4db548a67380aae758b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# New ports collection makefile for: sqlmap
# Date created: 2008-05-21
# Whom: Tomoyuki Sakurai <cherry@trombik.org>
#
# $FreeBSD$
#
PORTNAME= sqlmap
PORTVERSION= 0.5
CATEGORIES= security python
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= An automatic SQL injection tool
USE_PYTHON= yes
NO_BUILD= yes
# XXX report to upstream
WRKSRC= ${WRKDIR}/${PORTNAME}
SQLMAP_TXT_FILES= fuzz_vectors.txt user-agents.txt
SQLMAP_DOC_FILES= AUTHORS ChangeLog README.html THANKS TODO
post-patch:
# XXX report to upstream
${REINPLACE_CMD} -e 's|%%PYTHON_SITELIBDIR%%|${PYTHON_SITELIBDIR}|g' \
-e 's|%%PORTNAME%%|${PORTNAME}|g' ${WRKSRC}/sqlmap.py
${REINPLACE_CMD} -e 's|from lib\.|from ${PORTNAME}.|' \
-e 's|from plugins\.|from ${PORTNAME}.plugins.|' ${WRKSRC}/lib/*
${REINPLACE_CMD} -e 's|from lib\.|from ${PORTNAME}.|' \
-e 's|from plugins\.|from ${PORTNAME}.plugins.|' ${WRKSRC}/plugins/*
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/sqlmap.py ${PREFIX}/bin/sqlmap
${RM} -rf ${WRKSRC}/lib/.svn
${RM} -rf ${WRKSRC}/lib/*.bak
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/sqlmap
( cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/sqlmap )
${RM} -rf ${WRKSRC}/plugins/.svn
${RM} -rf ${WRKSRC}/plugins/*.bak
${MKDIR} ${PYTHONPREFIX_SITELIBDIR:}/sqlmap/plugins
( cd ${WRKSRC}/plugins && ${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/sqlmap/plugins )
.if !defined(NOPORTDATA)
${MKDIR} ${DATADIR}/txt
.for F in ${SQLMAP_TXT_FILES}
${INSTALL_DATA} ${WRKSRC}/txt/${F} ${DATADIR}/txt/
.endfor
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for F in ${SQLMAP_DOC_FILES}
${INSTALL_DATA} ${WRKSRC}/doc/${F} ${DOCSDIR}/
.endfor
.endif
.include <bsd.port.mk>
|