summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6279f6d5d122192d2cd466a2833743b41c2fadf7 (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
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
# Maintainer: potatoe

pkgname=voltron-git
pkgver=20170212
pkgrel=2
pkgdesc="UI for GDB, LLDB and Vivisect's VDB"
arch=('any')
depends=('python'
         'python-blessed'
         'python-flask'
         'python-flask-restful'
         'python-pygments'
         'python-pysigset'
         'python-requests'
         'python-requests-unixsocket'
         'python-scruffington'
         'python-six')
makedepends=('git' 'python-setuptools')
optdepends=('gdb: GDB'
            'lldb: LLDB'
            'vivisect: VDB')
url="https://github.com/snare/voltron"
license=('Beerware')
options=('!emptydirs')
source=(git+https://github.com/snare/voltron
        git+https://github.com/snare/voltron.wiki)
sha256sums=('SKIP' 'SKIP')
provides=('voltron')
conflicts=('python-ptrace' 'voltron')

pkgver() {
  cd ${pkgname%-git}
  git log -1 --format="%cd" --date=short --no-show-signature | sed "s|-||g"
}

build() {
  cd ${pkgname%-git}

  msg2 'Building...'
  python setup.py build
}

package() {
  cd ${pkgname%-git}

  msg2 'Installing documentation...'
  install -Dm 644 README.md -t "$pkgdir/usr/share/doc/${pkgname%-git}"
  cp -dpr --no-preserve=ownership "$srcdir/voltron.wiki" \
    "$pkgdir/usr/share/doc/${pkgname%-git}/wiki"

  msg2 'Installing...'
  python setup.py install --root="$pkgdir" --optimize=1

  msg2 'Cleaning up pkgdir...'
  find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}