-
-
Notifications
You must be signed in to change notification settings - Fork 582
/
Copy pathPKGBUILD
53 lines (40 loc) · 1.22 KB
/
PKGBUILD
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
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
pkgname=maltrail
pkgver=115306.10c127fbee
pkgrel=1
pkgdesc='Malicious traffic detection system.'
groups=('blackarch' 'blackarch-defensive' 'blackarch-networking'
'blackarch-sniffer')
arch=('any')
url='https://github.com/stamparm/maltrail'
license=('MIT')
depends=('python' 'python-pcapy' 'python-pysqlite3')
makedepends=('git')
source=("git+https://github.com/stamparm/$pkgname.git")
sha512sums=('SKIP')
pkgver() {
cd $pkgname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
package() {
cd $pkgname
install -dm 755 "$pkgdir/usr/bin"
install -dm 755 "$pkgdir/usr/share/$pkgname"
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
rm README.md LICENSE
cp -a * "$pkgdir/usr/share/$pkgname/"
cat > "$pkgdir/usr/bin/maltrail-sensor" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python sensor.py "\$@"
EOF
chmod +x "$pkgdir/usr/bin/maltrail-sensor"
cat > "$pkgdir/usr/bin/maltrail-server" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python server.py "\$@"
EOF
chmod +x "$pkgdir/usr/bin/maltrail-server"
}