1 # Maintainer: nblock <nblock [/at\] archlinux DOT us>
2 # Contributor: Mech <tiago.bmp@gmail.com>
3 # Contributor: Ermak <ermak@email.it>
8 pkgdesc="Web Application Attack and Audit Framework"
10 url="http://w3af.sourceforge.net/"
12 depends=('python2' 'python-fpconst' 'python2-pyopenssl' 'python-lxml' 'python-soappy' 'python-nltk' 'scapy' 'python-pysqlite' 'pysvn-py2' 'python2-pybloomfiltermmap')
14 'graphviz: Needed to run the GTK User Interface'
15 'pygtk: Needed to run the GTK User Interface'
16 'gtk2: Needed to run the GTK User Interface'
17 'pygtksourceview2: Needed to run the GTK User Interface'
19 source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver//_/-}.tar.bz2 w3af.desktop)
20 md5sums=('b67ba4ac19a5bcd7dc1e43cdf59c5688'
21 '68fde1a829b8392fa4db4fa606c1cbe7')
24 #delete some of the stuff from w3af-extlib (stuff that needs to be installed) -> dependencies
25 rm -r ${srcdir}/${pkgname}/extlib/{fpconst-0.7.2,SOAPpy}
28 sed -i -e 's|#!\s*/usr/bin/python[^\d.]*$|#!/usr/bin/python2|' \
29 -e 's|#!\s*/usr/bin/env python[^\d.]*$|#!/usr/bin/env python2|' \
30 $(find ${srcdir} -name '*.py') ${pkgname}/w3af_{console,gui}
32 mkdir -p ${pkgdir}/opt/w3af ${pkgdir}/usr/bin ${pkgdir}/usr/share/applications/
33 cp -r ${srcdir}/${pkgname}/* ${pkgdir}/opt/${pkgname}/
34 cp ${srcdir}/w3af.desktop ${pkgdir}/usr/share/applications/
36 #create startup for w3af_console
37 echo "#!/bin/sh" > ${pkgdir}/usr/bin/w3af_console
38 echo "exec python2 /opt/w3af/w3af_console \$*" >> ${pkgdir}/usr/bin/w3af_console
40 #create startup for w3af_gui
41 echo "#!/bin/sh" > ${pkgdir}/usr/bin/w3af_gui
42 echo "exec python2 /opt/w3af/w3af_gui \$*" >> ${pkgdir}/usr/bin/w3af_gui
44 chmod +x ${pkgdir}/{opt/w3af,usr/bin}/w3af_{console,gui}
47 # vim:set ts=2 sw=2 et: