Skip to content

Commit

Permalink
add aspisec (#4294)
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj authored Oct 13, 2024
1 parent d748b8a commit fae52b0
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/aspisec/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d>

pkgname=aspisec
pkgver=0.1.0
pkgrel=2
groups=('blackarch' 'blackarch-misc')
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")
sha512sums=('5c6eef959d19c0ba3aeec53b2fd062bbf627e9bc9aca82784a41575f1d5ed76983b5c6ddfeb5a830628127241db73bc1f3eb6c25890c384e6110618e7decb029')
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/*
}
19 changes: 19 additions & 0 deletions packages/aspisec/aspisec.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
post_install() {
set -e
cd /usr/share/aspisec
#rm -f Gemfile.lock
bundle config build.nokogiri --use-system-libraries
bundle config set --local path 'vendor/bundle'
bundle config set --local without development install test lint docs
bundle install
}

post_upgrade() {
post_install "$@"
}

post_remove() {
rm -r /usr/share/aspisec/{vendor,.bundle}
rmdir /usr/share/aspisec
}

0 comments on commit fae52b0

Please sign in to comment.