summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcfb9a28f71fc6b45e1df7127e80383bf991fa40 (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
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=volatility-git
_gitname=volatility
pkgver=2.5.2461.5d89bdf
pkgrel=1
pkgdesc="Advanced memory forensics framework"
url="https://github.com/volatilityfoundation/volatility/wiki"
arch=('any')
license=('GPL2')
depends=('python2-distorm' 'python2-crypto' 'python2-ujson')
optdepends=(
  'python2-yara: classify malware support'
  'python2-pillow: screenshots plugin support'
  'python2-pytz: timezone conversion support'
  'ipython2: enhanced volshell support'
  'python2-libforensic1394: firewire live analysis support'
  'libraw1394: alternative firewire live analysis support'
  'python2-openpyxl: Excel xlsx/xlsm files support'
)
makedepends=('git' 'python2-setuptools')
provides=('volatility')
conflicts=('volatility')
source=(${pkgname}::git+https://github.com/volatilityfoundation/${_gitname})
sha512sums=('SKIP')

pkgver() {
  cd ${pkgname}
  printf "%s.%s.%s" "$(git describe --tags --abbrev=0)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${pkgname}
  sed -e 's/env python$/env python2/g' -i tools/vtype_diff.py
}

package() {
  cd ${pkgname}

  python2 setup.py install -O1 --prefix=/usr --root="${pkgdir}"
  ln -s /usr/bin/vol.py "${pkgdir}/usr/bin/${_gitname}"

  install -d "${pkgdir}/usr/share/${_gitname}"
  mv "${pkgdir}/usr/tools" "${pkgdir}/usr/share/${_gitname}"
  mv "${pkgdir}/usr/contrib" "${pkgdir}/usr/share/${_gitname}"
  install -Dm 644 README.txt "${pkgdir}/usr/share/doc/${pkgname}/README"
}

# vim: ts=2 sw=2 et: