# Maintainer: a821 # Contributor: Levente Polyak # Contributor: Evan Teitelman # Contributor: fxbru pkgname=sqlmap-git pkgver=1.7.5.r5.g48c967c01 pkgrel=1 pkgdesc='Automatic SQL injection and database takeover tool' url='http://sqlmap.org' arch=('any') license=('GPL2') depends=('python' 'sh') makedepends=('git') provides=('sqlmap') conflicts=('sqlmap') backup=('etc/sqlmap.conf') source=(${pkgname}::git+https://github.com/sqlmapproject/sqlmap.git) sha512sums=('SKIP') pkgver() { cd ${pkgname} git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd ${pkgname} python -m compileall . python -O -m compileall . } package() { cd ${pkgname} install -d "${pkgdir}/etc" install -d "${pkgdir}/usr/bin" install -d "${pkgdir}/opt/${pkgname}" install -d "${pkgdir}/usr/share/doc" mv doc "${pkgdir}/usr/share/doc/${pkgname}" mv sqlmap.conf "${pkgdir}/etc/sqlmap.conf" ln -sf /etc/sqlmap.conf "${pkgdir}/opt/${pkgname}/sqlmap.conf" cp -a --no-preserve=ownership * "${pkgdir}/opt/${pkgname}" cat > "${pkgdir}/usr/bin/sqlmap" << EOF #!/bin/sh cd /opt/${pkgname} exec python sqlmap.py "\$@" EOF cat > "${pkgdir}/usr/bin/sqlmapapi" << EOF #!/bin/sh cd /opt/${pkgname} exec python sqlmapapi.py "\$@" EOF chmod 755 "${pkgdir}/usr/bin/sqlmap" chmod 755 "${pkgdir}/usr/bin/sqlmapapi" } # vim: ts=2 sw=2 et: