summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e6049d018debc07ec514931dc9f0610239a40d94 (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
41
42
43
44
45
46
47
pkgname=princeprocessor-git
pkgver=v0.22.r4.ge4e7d89
pkgrel=1
pkgdesc="Standalone password candidate generator using the PRINCE algorithm."
arch=('i686' 'x86_64')
url="https://github.com/hashcat/princeprocessor"
license=('MIT')
makedepends=('git' 'make')
provides=('princeprocessor')
source=(git+https://github.com/hashcat/princeprocessor.git)
md5sums=('SKIP')

_gitroot='https://github.com/hashcat/princeprocessor.git'
_gitname='princeprocessor'

pkgver() {
    cd "$srcdir/$_gitname"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_gitname/src"

  if [ "$CARCH" == "x86_64" ]
  then
    make pp64.bin
  elif [ "$CARCH" == "i686" ]
  then
    make pp32.bin
  fi
}

package() {
  cd "$srcdir/$_gitname/src"

  install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  mkdir -p "$pkgdir/usr/bin/"

  cp ./*.bin "$pkgdir/usr/bin/"

  cd  "$pkgdir/usr/bin/"
  i=$(ls ".")
  chmod +x $i
  mv $i pp
}

# vim:set ts=2 sw=2 et: