diff --git a/security/webshag/Makefile b/security/webshag/Makefile index 549131f..8e0a245 100644 --- a/security/webshag/Makefile +++ b/security/webshag/Makefile @@ -10,10 +10,12 @@ MAINTAINER= clutton@zoho.com COMMENT= Multi-threaded, multi-platform web server audit tool LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt -USES= python:2.7 dos2unix -USE_PYTHON=distutils +USES= python:2.7 dos2unix shebangfix +USE_PYTHON= distutils PYSETUP= setup.linux.py +SHEBANG_FILES= webshag_cli.py webshag_gui.py NO_WRKSUBDIR= yes @@ -25,6 +27,7 @@ OPTIONS_SUB= yes .if ${PORT_OPTIONS:MNMAP} BUILD_DEPENDS+= ${LOCALBASE}/bin/nmap:${PORTSDIR}/security/nmap +RUN_DEPENDS+= ${LOCALBASE}/bin/nmap:${PORTSDIR}/security/nmap .endif .if ${PORT_OPTIONS:MWXGTK} @@ -34,10 +37,8 @@ WX_COMPS= python:run post-patch: @${MV} ${WRKSRC}/config ${WRKSRC}/etc - @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!/usr/bin/env python|g' \ - ${WRKSRC}/webshag_cli.py - @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!/usr/bin/env python|g' \ - ${WRKSRC}/webshag_gui.py + @${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" \ + ${WRKSRC}/setup.linux.py do-install: .if ${PORT_OPTIONS:MWXGTK} @@ -46,7 +47,8 @@ do-install: .endif ${INSTALL_SCRIPT} ${WRKSRC}/webshag_cli.py \ ${STAGEDIR}${PREFIX}/bin/webshag_cli - @${INSTALL_DATA} ${WRKSRC}/etc/webshag.conf ${STAGEDIR}${PREFIX}/etc + @${INSTALL_DATA} ${WRKSRC}/etc/webshag.conf \ + ${STAGEDIR}${PREFIX}/etc/webshag.conf.sample (cd ${WRKSRC}/database && ${COPYTREE_SHARE} . \ ${STAGEDIR}${PREFIX}/share/webshag) (cd ${WRKSRC}/webshag && ${COPYTREE_SHARE} . \ diff --git a/security/webshag/files/patch-setup_linux_py b/security/webshag/files/patch-setup_linux_py index 172aa33..7b0a293 100644 --- a/security/webshag/files/patch-setup_linux_py +++ b/security/webshag/files/patch-setup_linux_py @@ -5,14 +5,14 @@ ## ################################################################# ## -path_prefix = os.path.abspath(os.path.curdir) + '/' -+path_prefix = '/usr/local/' ++path_prefix = '%%PREFIX%%' ## ################################################################# ## ## CONSTANTS ## ## ################################################################# ## -NMAP = u'/usr/bin/nmap' -+NMAP = u'/usr/local/bin/nmap' ++NMAP = u'%%PREFIX%%/bin/nmap' CORE_FILE = u'webshag/core/core_file.py' -CFG_FILE = u'config/webshag.conf' -FUZZ_DIRS = path_prefix + u'/database/fuzzer/directory-list-2.3-small.txt' diff --git a/security/webshag/pkg-plist b/security/webshag/pkg-plist index de87b58..ff16d1a 100644 --- a/security/webshag/pkg-plist +++ b/security/webshag/pkg-plist @@ -1,6 +1,6 @@ bin/webshag_cli +@sample etc/webshag.conf.sample %%WXGTK%%bin/webshag_gui -%%ETCDIR%%.conf %%PYTHON_SITELIBDIR%%/webshag/__init__.py %%PYTHON_SITELIBDIR%%/webshag/core/__init__.py %%PYTHON_SITELIBDIR%%/webshag/core/core_error.py