summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7ac4c355f956f29a34d7033fd80bdb3e012c071 (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
67
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Max Roder <maxroder@web.de>
# Contributor: Lex Rivera <x-demon@x-demon.org>

pkgname=airoscript-ng
pkgver=1.2rc3
_pkgver=1.2
_pkgverrc=3
pkgrel=7
pkgdesc='A gui mainly for aircrack-ng. Automates cracking of WEP and WPA'
url='https://code.google.com/p/airoscript/'
arch=('any')
license=('GPL2')
depends=('aircrack-ng' 'macchanger')
optdepends=(
  'mdk3: bruteforce and deauth support'
  'sslstrip: HTTPS MITM plugin support'
  'dsniff: sniffing and spoofing support'
  'zenity: additional graphical dialog support'
  'john: fast password cracking support'
)
backup=(
  'etc/airoscript-ng/airoscript-ng.conf'
  'etc/airoscript-ng/airoscript-ng_advanced.conf'
  'etc/airoscript-ng/screenrc.airoscript'
)
options=('!makeflags' '!emptydirs')
source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/airoscript/airoscript-ng-${_pkgver}-${_pkgverrc}.tar.gz)
sha512sums=('77056023e1671ae8ad719495cfef7189882e0ee3ed5db965e4798e13b75835afe700828be99efb8d3c6b95e11658aad768df0c7357f5e43f12ac13918ef49fd1')

prepare() {
  cd ${pkgname}-${_pkgver}

  # remove unwanted install parts
  sed -i '/install-locale \\/ d' Makefile-Linux
  sed -i '/install-desktop \\/ d' Makefile-Linux
  sed -i '/for i in doc/ d' Makefile-Linux

  # install binary to bin instead of sbin
  sed -i 's|/sbin/|/bin/|g' Makefile-Linux
  sed -i 's|/sbin/|/bin/|g' src/airoscript-ng_advanced.conf

  # replace usr/local by usr
  sed -i 's|usr/local|usr|g' src/airoscript-ng_advanced.conf

  # replace config file location
  sed -i 's|etc/|etc/airoscript-ng/|g' src/${pkgname}

  # remove .swp file from src dir
  rm src/functions/attacks/.wpa.swp
}

package() {
  cd ${pkgname}-${_pkgver}

  make DESTDIR="${pkgdir}" \
    prefix=usr \
    picdir="${pkgdir}/usr/share/pixmaps/" \
    appdir="${pkgdir}/usr/share/applications/" \
    etcdir="${pkgdir}/etc/${pkgname}"

  # only distribute the .rst doc files rather then html
  rm -rf "${pkgdir}"/usr/share/doc/airoscript-ng/*
  cp doc/html/*.rst "${pkgdir}/usr/share/doc/airoscript-ng/"
}

# vim: ts=2 sw=2 et: