summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66925a3b0e3071b21e036a9e138de73fd77d8101 (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
# Maintainer: Sebastian Neef <aur AT gehaxelt DOT IN>
pkgbase=theharvester-git
pkgname=theharvester-git
pkgver=r38.d375a26
pkgrel=1
pkgdesc="Tool to print different useragents. Useful for curl or wget."
arch=('any')
url="https://github.com/laramies/theHarvester"
license=('GPL2')
depends=('bash' 'python2' 'python2-requests')
makedepends=('git' 'bash')
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("$pkgname::git+https://github.com/laramies/theHarvester.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  ( set -o pipefail
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
	cd "$srcdir/$pkgname"
	cat <<__EOF__ > run.sh
#!/bin/bash
PYTHONPATH="\$PYTHONPATH:/opt/$pkgname/" /usr/bin/env python2 /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/"
	install "$srcdir/$pkgname/myparser.py" "$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"
}