updated on Sun Jan 15 20:01:04 UTC 2012
[aur-mirror.git] / sqlmap / PKGBUILD
bloba72d8cacd66d8efc01678fa1feac13abf8facaf8
1     # Contributor: Miguel Paolino <mpaolino@gmail.com>
2     # Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
3     # Maintainer: Roel Blaauwgeers <roel at theworldstate.nl>
4     pkgname=sqlmap
5     pkgver=0.9
6     pkgrel=1
7     pkgdesc='An automatic SQL injection tool developed in Python'
8     url='http://sqlmap.sourceforge.net'
9     license=('GPL')
10     arch=('i686' 'x86_64')
11     depends=('python2')
12     source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
13     md5sums=('608d5773e0925e96e618171829d679b9')
14     build() {
15             mkdir -p "${pkgdir}"/opt/$pkgname
16             cp -ax "${srcdir}"/$pkgname/* "${pkgdir}"/opt/$pkgname
17      
18         ARCH=`uname -m`
19         if [ "$ARCH" == "i686" ]; then
20             rm "${pkgdir}"/opt/$pkgname/udf/mysql/linux/64/lib_mysqludf_sys.so
21             rm "${pkgdir}"/opt/$pkgname/udf/postgresql/linux/64/8.2/lib_postgresqludf_sys.so
22             rm "${pkgdir}"/opt/$pkgname/udf/postgresql/linux/64/8.3/lib_postgresqludf_sys.so
23             rm "${pkgdir}"/opt/$pkgname/udf/postgresql/linux/64/8.4/lib_postgresqludf_sys.so
24         fi
25      
26             mkdir -p "${pkgdir}"/usr/bin
27             cat > "${pkgdir}"/usr/bin/sqlmap << EOF
28 #!/bin/bash
29 cd /opt/sqlmap
30 python2 ./sqlmap.py \$@
31 cd \$OLDPWD
32 EOF
33             chmod 755 "${pkgdir}"/usr/bin/sqlmap
34     }