summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e20626466306b6effe802b96391169f6cf03d0dc (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
48
49
50
51
52
53
54
# Maintainer: Sebastian Neef <aur AT gehaxelt DOT IN>
pkgbase=theharvester-git
pkgname=theharvester-git
pkgver=3.0.6.r220.gefe73e2
pkgrel=1
pkgdesc="A tool for gathering e-mail accounts, subdomain names, virtual hosts, open ports/ banners, and employee names from different public sources (search engines, pgp key servers)."
arch=('any')
url="https://github.com/laramies/theHarvester"
license=('GPL2')
depends=(
		'bash'
		'python'
		'python-requests'
		'python-plotly'
		'python-pytest'
		'python-texttable'
		'python-shodan'
		'python-beautifulsoup4'
		'python-yaml')
makedepends=('git' 'bash')
provides=("${pkgname}")
conflicts=("${pkgname}")
install="theHarvester.install"
source=("$pkgname::git+https://github.com/laramies/theHarvester.git")
md5sums=('SKIP')

pkgver() {
	cd "$pkgname"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'	
}

prepare() {
	cd "$srcdir/$pkgname"
	cat <<__EOF__ > run.sh
#!/bin/bash
PYTHONPATH="\$PYTHONPATH:/opt/$pkgname/" /usr/bin/env python /opt/$pkgname/theHarvester.py "\$@"
__EOF__
}

package() {
	mkdir -p "$pkgdir/opt/$pkgname/"
	mkdir -p "$pkgdir/usr/bin"
	
	cp -r "$srcdir/$pkgname/discovery" "$pkgdir/opt/$pkgname/"
	cp -r "$srcdir/$pkgname/lib" "$pkgdir/opt/$pkgname/"
	cp -r "$srcdir/$pkgname/parsers" "$pkgdir/opt/$pkgname/"
	cp -r "$srcdir/$pkgname/tests" "$pkgdir/opt/$pkgname/"
	cp -r "$srcdir/$pkgname/wordlists" "$pkgdir/opt/$pkgname/"
	install "$srcdir/$pkgname/api-keys.yaml" "$pkgdir/opt/$pkgname/"
	install "$srcdir/$pkgname/theHarvester.py" "$pkgdir/opt/$pkgname/"
	install "$srcdir/$pkgname/run.sh" "$pkgdir/opt/$pkgname/"

	ln -s "/opt/$pkgname/run.sh" "$pkgdir/usr/bin/theharvester"	
}