summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1a0e5f3bd420e96413d2ee21d2e8f6be78b8d6ed (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
# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d>

pkgname=aspisec
pkgver=0.2.0
pkgrel=1
pkgdesc='Removes the traces left by offensive security tools.'
arch=('any')
url='https://noraj.github.io/aspisec/'
license=('MIT')
depends=('ruby' 'ruby-bundler')
source=("https://github.com/noraj/$pkgname/archive/refs/tags/$pkgver.tar.gz")
b2sums=('4a06f5fd39b498d608be5667c18f6f3b4582e6104eeee5c4a274f99364a40d3237bcc393b7f19d64818c5d01e420f2b387a433798aa59045cb5030aa10fd455e')
install="$pkgname.install"

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
  cp -rT --no-preserve=ownership --preserve=all --no-dereference docs/ "$pkgdir/usr/share/doc/$pkgname"

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm -rf docs/ docs-tools/ *.md LICENSE .*

  cp --no-preserve=ownership -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
bundle exec ruby bin-ruby/$pkgname "\$@"
EOF

  chmod +x "$pkgdir"/usr/bin/*
}