summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7eddfc12253685d80295e9dbe5e554cd92baedd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: kpcyrd <git@rxv.cc>

pkgname=recon-ng
pkgver=4.9.6
pkgrel=1
pkgdesc='A full-featured Web Reconnaissance framework written in Python'
url='https://bitbucket.org/LaNMaSteR53/recon-ng'
license=('GPL3')
arch=('any')
depends=('python2' 'python2-dicttoxml' 'python2-dnspython'
         'python2-jsonrpclib-pelix'
         'python2-lxml' 'python2-mechanize' 'python2-slowaes'
         'python2-xlsxwriter' 'python2-olefile' 'python2-pypdf2'
         'python2-flask' 'python2-unicodecsv')
source=(${pkgname}-${pkgver}.tar.gz::https://bitbucket.org/LaNMaSteR53/recon-ng/get/v${pkgver}.tar.gz
        opt-in-analytics.patch)
sha256sums=('0192a9882bb9800f2177fcdb31cda8031bbc3895db9fe4a0966ebdd771b66915'
            '3208e111fb44e0799272429b6d87544a2a54a6f48ef640524a19a8c0a37d3d00')

prepare() {
  rm -rf "recon-ng-${pkgver}"
  mv LaNMaSteR53-recon-ng-* "recon-ng-${pkgver}"
  cd "${pkgname}-${pkgver}"
  # change analytics from opt-out to opt-in
  patch -Np1 -i ../opt-in-analytics.patch
}

package() {
  cd "${pkgname}-${pkgver}"

  install -d "${pkgdir}/opt/${pkgname}"
  cp -ra --no-preserve=owner . "${pkgdir}/opt/${pkgname}"

  install -d "${pkgdir}/usr/bin"
  for bin in recon-ng recon-cli recon-rpc recon-web; do
    cat > "${pkgdir}/usr/bin/${bin}" << EOF
#!/bin/sh
cd /opt/recon-ng
exec python2 ${bin} "\$@"
EOF
    chmod +x "${pkgdir}/usr/bin/${bin}"
  done

  install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et: