summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0eee8c555de4e8be9266ae8701692e60e03411d (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
38
39
40
# Maintainer: shyam (shyamganesh01@gmail.com)

_base=PEASS-ng
pkgname=peass-ng
pkgver=3398870e
_pkgver=20230903
pkgrel=1
pkgdesc="Privilege Escalation Awesome Scripts SUITE new generation"
arch=(any)
url="https://github.com/carlospolop/PEASS-ng"
license=(MIT)
source=("LICENSE::https://raw.githubusercontent.com/carlospolop/PEASS-ng/master/LICENSE")
makedepends=('git' 'github-cli')
sha512sums=('4b7e5df3047455f4ecd4e81af40f12f243f80ef66d460dd15c8ed41be0929d344113d0ce2862b6fd51ae096a2e4da11af2797da4b1acbf9f4308653bc4211da4')
conflicts=('peass')
provides=('peass-ng')

pkgver() {
  GH_HOST=randomdomain gh release view -R github.com/carlospolop/PEASS-ng --json tagName --jq '.tagName' -q '.[]' | sort -V | tail -n 1 | cut -d '-' -f 2
}

prepare() {
 GH_HOST=randomdomain gh release download --pattern '*' -D release -R ${url} --clobber 
}

package() {

  cd release

  # Install to /usr/share/peass-ng 

  ## Linux
  find . -name "lin*" -printf "%f\n" -exec install -Dm644 {} "${pkgdir}/usr/share/${pkgname}/linux/{}" \;

  ## Windows
  find . -name "win*" -printf "%f\n" -exec install -Dm644 {} "${pkgdir}/usr/share/${pkgname}/windows/{}" \;

  install -Dm 644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}