1 # Contributor: Jan Lieven jan [at] das [minus] labor [dot] org
2 # Contributor: fnord0 < fnord0 AT riseup DOT net >
4 pkgname=volatility-linux-svn
7 pkgdesc="An advanced memory forensics framework [linux-support svn branch]"
9 url="http://code.google.com/p/volatility/"
12 makedepends=('subversion')
13 options=('!emptydirs')
14 _svnmod="volatility-linux"
15 _svntrunk="http://volatility.googlecode.com/svn/branches/linux-support/"
16 provides=('volatility-linux')
19 # fetch latest svn build
20 if [ -d ${srcdir}/.svn ]; then
21 msg 'Updating volatility [linux-support branch] svn...'
22 svn up ${srcdir} || return 1
24 msg 'Checking out volatility [linux-support branch] SVN...'
25 svn co ${_svntrunk} ${srcdir} || return 1
27 msg "volatility [linux-support branch] checkout complete, or the server timed out"
29 mkdir -p ${pkgdir}/usr/{bin,src} || return 1
31 svn export ${srcdir} ${pkgdir}/usr/src/${_svnmod} || return 1
34 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
35 -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
36 $(find ${pkgdir}/usr/src/${_svnmod} -name '*.py') || return 1
37 grep -rl vol.py ${pkgdir}/usr/src/${_svnmod} | xargs sed -i 's|vol.py|volatility.py|g' || return 1
40 echo "#!/bin/sh" > ${pkgdir}/usr/bin/vollinux || return 1
41 echo "cd /usr/src/volatility-linux" >> ${pkgdir}/usr/bin/vollinux || return 1
42 echo "python2 ./volatility.py \"\$@\"" >> ${pkgdir}/usr/bin/vollinux || return 1
43 echo "cd -" >> ${pkgdir}/usr/bin/vollinux || return 1
44 chmod +x ${pkgdir}/usr/bin/vollinux || return 1
48 echo -e "\e[1;31m[\e[0m\e[1;34m*\e[0m\e[1;31m]\e[0m \e[1;31mrun '\e[0m\e[1;34m/usr/bin/vollinux -h\e[0m\e[1;31m' for an explanation of Volatility [linux-support branch] startup options\e[0m"
49 echo -e "\e[1;34m>>>\e[0m \e[1;31mVolatility project homepage @ \e[0m\e[1;32mhttps://www.volatilesystems.com/default/volatility\e[0m"
50 echo -e "\e[1;34m>>>\e[0m \e[1;31mVolatility framework goolgecode @ \e[0m\e[1;32mhttp://code.google.com/p/volatility/\e[0m"