summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 212a25ebac40c9275f5e852734d4a293d52a31a3 (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>

pkgname=voltron-git
pkgver=20151109
pkgrel=1
pkgdesc="UI for GDB, LLDB and Vivisect's VDB"
arch=('any')
depends=('python'
         'python-blessed'
         'python-cherrypy'
         'python-flask'
         'python-pygments'
         'python-rl'
         'python-scruffington'
         'readline')
makedepends=('git' 'python-setuptools')
optdepends=('gdb: GDB'
            'lldb: LLDB'
            'vivisect: VDB')
url="https://github.com/snare/voltron"
license=('Beerware')
options=('!emptydirs')
source=(${pkgname%-git}::git+https://github.com/snare/voltron)
sha256sums=('SKIP')
provides=('voltron')
conflicts=('voltron')

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

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

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

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

  msg2 'Installing docs...'
  install -Dm 644 README.md -t "$pkgdir/usr/share/doc/${pkgname%-git}"

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

  msg2 'Fixing placement of dbgentry.py...'
  _pysite=$(python -c \
    'from distutils.sysconfig import get_python_lib; print(get_python_lib())'
  )
  mv "$pkgdir/usr/dbgentry.py" "$pkgdir/$_pysite/voltron"

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