# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgname=certipy pkgver=5.0.4.r3.g890dbf8 pkgrel=1 pkgdesc='Active Directory Certificate Services enumeration and abuse.' arch=('any') groups=('blackarch' 'blackarch-windows' 'blackarch-exploitation') url='https://github.com/ly4k/Certipy' license=('MIT') depends=('python') makedepends=('git' 'python-setuptools' 'python-pip') source=("git+https://github.com/ly4k/$pkgname.git") sha512sums=('SKIP') install="$pkgname.install" pkgver() { cd $pkgname ( set -o pipefail git describe --long --tags --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "%s.%s" "$(git rev-list --count HEAD)" \ "$(git rev-parse --short=7 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/" *.md install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" # README.md is needed in setup.py rm -rf LICENSE .gitignore .github/ *.spec cp -a * "$pkgdir/usr/share/$pkgname/" cat > "$pkgdir/usr/bin/$pkgname" << EOF #!/bin/sh source /usr/share/$pkgname/venv/bin/activate exec python /usr/share/$pkgname/$pkgname/entry.py "\$@" EOF chmod +x "$pkgdir/usr/bin/$pkgname" }