updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / w3af / PKGBUILD
blobacffd626a263e7943f5eed6460604e74b1e04b77
1 # Maintainer: nblock <nblock [/at\] archlinux DOT us>
2 # Contributor: Mech <tiago.bmp@gmail.com>
3 # Contributor: Ermak <ermak@email.it>
5 pkgname=w3af
6 pkgver=1.1
7 pkgrel=1
8 pkgdesc="Web Application Attack and Audit Framework"
9 arch=('i686' 'x86_64')
10 url="http://w3af.sourceforge.net/"
11 license=('GPL')
12 depends=('python2' 'python-fpconst' 'python2-pyopenssl' 'python-lxml' 'python-soappy' 'python-nltk' 'scapy' 'python-pysqlite' 'pysvn-py2' 'python2-pybloomfiltermmap')
13 optdepends=(
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')
23 build() {
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}
27   #enforce python2
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/
35   
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
39   
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
43   
44   chmod +x ${pkgdir}/{opt/w3af,usr/bin}/w3af_{console,gui}
47 # vim:set ts=2 sw=2 et: