-
-
Notifications
You must be signed in to change notification settings - Fork 590
/
Copy pathPKGBUILD
49 lines (38 loc) · 1.17 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
# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.
pkgname='whitewidow'
pkgver=581.dba6cc3
pkgrel=2
pkgdesc='SQL Vulnerability Scanner.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp')
arch=('any')
url='https://github.com/Ekultek/whitewidow'
license=('GPL3' 'custom:unknown')
depends=('ruby2.3' 'ruby2.3-bundler')
makedepends=('git')
source=('git+https://github.com/Ekultek/whitewidow.git')
install='whitewidow.install'
sha1sums=('SKIP')
pkgver() {
cd "$srcdir/whitewidow"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
prepare() {
cd "$srcdir/whitewidow"
echo -e "\ngem 'test-unit'" >> Gemfile
}
package() {
cd "$srcdir/whitewidow"
mkdir -p "$pkgdir/usr/bin"
mkdir -p "$pkgdir/usr/share/whitewidow"
install -Dm644 -t "$pkgdir/usr/share/licenses/whitewidow/" docs/legal/*
install -Dm644 -t "$pkgdir/usr/share/doc/whitewidow/" README.md \
docs/CHANGELOG.md docs/{misc/*,self_help/*}
cp -a * "$pkgdir/usr/share/whitewidow/"
cat > "$pkgdir/usr/bin/whitewidow" << EOF
#!/bin/sh
cd /usr/share/whitewidow
exec ruby-2.3 whitewidow.rb "\${@}"
EOF
chmod a+x "$pkgdir/usr/bin/whitewidow"
}