Skip to content

Commit

Permalink
ad-miner: release
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj committed Oct 6, 2023
1 parent 69f6cca commit fce6161
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
46 changes: 46 additions & 0 deletions packages/ad-miner/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ad-miner
_pkgname_dir=AD_Miner
_pkgname_cmd=AD-miner
_pyver=3.11
pkgver=v0.2.1.r7.g585ad72
pkgrel=1
groups=('blackarch' 'blackarch-recon' 'blackarch-windows')
pkgdesc='TODO'
arch=('any')
url='https://github.com/Mazars-Tech/AD_Miner'
license=('GPL3')
depends=('python' 'python-poetry')
makedepends=('git')
source=("$pkgname::git+https://github.com/Mazars-Tech/$_pkgname_dir.git")
sha512sums=('SKIP')
install="$pkgname.install"

pkgver() {
cd $pkgname

git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
cd $pkgname

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

rm -rf LICENSE .github .git* CONTRIBUTING.md

cp -a * "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
poetry config cache-dir "/usr/share/$pkgname"
poetry env use /usr/share/$pkgname/.venv/bin/python$_pyver \\
--directory /usr/share/$pkgname
poetry run --directory "/usr/share/$pkgname" $_pkgname_cmd "\$@"
EOF

chmod +x "$pkgdir/usr/bin/$pkgname"
}
10 changes: 10 additions & 0 deletions packages/ad-miner/ad-miner.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
post_install() {
set -e
cd /usr/share/ad-miner
poetry config cache-dir /usr/share/ad-miner
poetry install --no-cache
}

post_upgrade() {
post_install "$@"
}

0 comments on commit fce6161

Please sign in to comment.