summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1dea960b238b74e21b704f3d54aaaf2f67b09a38 (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
55
56
57
58
59
60
61
62
63
64
# Maintainer: Sebastian Neef <aur AT gehaxelt DOT IN>
pkgbase=theharvester-git
pkgname=theharvester-git
pkgver=3.0.6.r421.g9f7811d
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-yaml'
	'python-requests'
	'python-plotly'
	'python-pytest'
	'python-texttable'
	'python-shodan'
	'python-beautifulsoup4'
	'python-yaml'
	'python-decorator'
	'python-censys'
	'python-gevent'
	'python-grequests'
)
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() {
	reponame=theHarvester
	mkdir -p "$pkgdir/opt/$pkgname/"
	mkdir -p "$pkgdir/usr/bin"
	
	cp -r "$srcdir/$pkgname/$reponame" "$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"	
}

check(){
	cd "${srcdir}"
	pytest
}