Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 1.46 KB
# Maintainer: ArchStrike <team@archstrike.org>
buildarch=1
pkgname=theharvester-git
_pkgname=theHarvester
pkgver=20190114.r470
pkgrel=1
groups=('archstrike' 'archstrike-recon')
pkgdesc="Python tool for gathering e-mail accounts and subdomain names from different public sources (search engines, pgp key servers)"
url='https://github.com/laramies/theHarvester'
arch=('any')
license=('GPL2')
depends=('python-requests' 'python-beautifulsoup4' 'python-plotly' 'python-shodan' 'python-texttable' 'python-pytest')
replaces=('theharvester')
provides=('theharvester')
makedepends=('git')
source=("$_pkgname::git+https://github.com/laramies/theHarvester.git")
sha512sums=('SKIP')
pkgver() {
cd $_pkgname
printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)"
}
package() {
cd ${_pkgname}
# Make base directories.
install -dm755 $pkgdir/usr/bin
install -dm755 $pkgdir/usr/share/${pkgname}
install -dm755 $pkgdir/usr/share/doc/${pkgname}
install -dm755 $pkgdir/usr/share/licenses/${pkgname}
# Install docs.
install -Dm644 README.md ${pkgdir}/usr/share/doc/${pkgname}/README.md
install -Dm644 LICENSES ${pkgdir}/usr/share/licenses/${pkgname}/LICENSES
# Install sharable.
cp --no-preserve=ownership -a * "${pkgdir}/usr/share/${pkgname}"
# Link to bin.
cat > ${pkgdir}/usr/bin/theharvester << EOF
#!/usr/bin/env bash
cd /usr/share/${pkgname}
python ${_pkgname}.py "\$@"
EOF
chmod 755 "${pkgdir}/usr/bin/theharvester"
}