# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgname=theharvester pkgver=4.10.1.r3.g4fa1431 pkgrel=1 epoch=1 groups=('blackarch' 'blackarch-recon') pkgdesc='E-mails, subdomains and names Harvester - OSINT' url='https://github.com/laramies/theHarvester' arch=('any') license=('GPL-2.0-or-later') depends=('python' 'python-requests' 'python-shodan' 'python-texttable' 'python-beautifulsoup4' 'python-plotly' 'python-pytest' 'python-yaml' 'python-censys' 'python-grequests' 'flake8' 'python-dnspython' 'python-mypy_extensions' 'python-netaddr' 'python-aiodns' 'python-retrying' 'python-aiohttp' 'python-aiohttp-socks' 'python-aiosqlite' 'python-uvloop' 'python-gevent' 'python-lxml' 'python-aiomultiprocess' 'python-orjson' 'python-typing_extensions' 'python-zope-event' 'python-starlette' 'python-slowapi' 'python-certifi' 'python-pyppeteer' 'python-fastapi' 'python-aiofiles' 'python-ujson' 'uvicorn' 'python-playwright' 'python-dateutil') makedepends=('git' 'python-build' 'python-pip') source=("$pkgname::git+https://github.com/laramies/theHarvester.git") sha512sums=('SKIP') pkgver() { cd $pkgname ( set -o pipefail git describe --long --tags --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "%s.%s" "$(git rev-list --count HEAD)" \ "$(git rev-parse --short=7 HEAD)" ) } prepare() { cd $pkgname sed -i "s|'api-keys.yaml',|'/usr/share/theharvester/api-keys.yaml',|g" \ theHarvester/lib/core.py } build() { cd $pkgname python -m build --wheel --outdir="$startdir/dist" } package() { cd $pkgname install -dm 755 "$pkgdir/usr/share/$pkgname" pip install \ --verbose \ --disable-pip-version-check \ --no-warn-script-location \ --ignore-installed \ --no-compile \ --no-deps \ --root="$pkgdir" \ --prefix=/usr \ --no-index \ --find-links="file://$startdir/dist" \ $pkgname cp -a theHarvester/data "$pkgdir/usr/share/$pkgname/data" install -Dm 644 theHarvester/data/api-keys.yaml \ "$pkgdir/usr/share/$pkgname/api-keys.yaml" install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md README/*.md install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname" README/COPYING \ README/LICENSES mv "$pkgdir/usr/bin/theHarvester" "$pkgdir/usr/bin/$pkgname" }