summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a459e725ecaa970cf07779391bb849cb983a8462 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Cyberfee <deltax.fluxion@gmail.com>

_pkgname=fluxion
pkgname=$_pkgname
pkgver=r24.75353f7
pkgrel=1
pkgdesc='Fluxion is a security auditing and social-engineering research tool'
url='https://github.com/FluxionNetwork/fluxion'
license=('GPL3')
source=('git://github.com/FluxionNetwork/fluxion.git#branch=master')

depends=(
  'aircrack-ng' 'bash>=4.2' 'coreutils'
  'awk' 'iw' 'unzip'
  'curl' 'bc' 'xterm'
)

makedepends=('binutils' 'coreutils' 'git')
conflicts=('fluxion')
provides=('fluxion')
sha256sums=('SKIP')
arch=('any')

prepare() {
  if [ -d "$srcdir/$pkgname" ]; then
    rm -rf "$srcdir/$pkgname"
  fi

  mkdir -p "$srcdir/$pkgname"
  cd "$srcdir/$pkgname"
}

pkgver() {
  cd "$srcdir/$_pkgname"

  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "$srcdir/$_pkgname"
}

package() {
  cd "$srcdir/$_pkgname"

  mkdir -p "$pkgdir/usr/bin"
  mkdir -p "$pkgdir/usr/share/fluxion"

  install -Dm644 -t "$pkgdir/usr/share/doc/fluxion/" README.md
  install -Dm644 -t "$pkgdir/usr/local/man/man1/" docs/man/fluxion.1

  rm -rf *.md .git* *.yml .project .editorconfig 

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/fluxion"

  cat > "$pkgdir/usr/bin/fluxion" << EOF
#!/bin/sh
cd /usr/share/fluxion
exec bash fluxion.sh "\${@}"
EOF

  chmod a+x "$pkgdir/usr/bin/fluxion"
}