summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrey Christoforo2016-11-20 13:57:36 +0000
committerGrey Christoforo2016-11-20 13:57:36 +0000
commitc11e3d8c1287fe654127d4f3479c9a1091ff16b4 (patch)
treeed4a3e6beaf995b4fe4c1b054fe32f6f93548823
downloadaur-c11e3d8c1287fe654127d4f3479c9a1091ff16b4.tar.gz
initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD75
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0ca2ba9dbd53
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+# Generated by mksrcinfo v8
+# Sun Nov 20 13:56:05 UTC 2016
+pkgbase = panda-qemu-git
+ pkgdesc = An open-source Platform for Architecture-Neutral Dynamic Analysis
+ pkgver = r1715.f758bee
+ pkgrel = 1
+ url = https://github.com/moyix/panda
+ arch = x86_64
+ license = GPLv2
+ makedepends = git
+ depends = libdwarf
+ depends = nasm
+ depends = openssl
+ depends = libpcap
+ depends = wget
+ depends = protobuf-c
+ depends = python2-pycparser
+ depends = libelf
+ depends = wireshark-cli
+ depends = distorm
+ source = git+git://github.com/moyix/panda.git#branch=master
+ source = https://archive.archlinux.org/packages/l/llvm/llvm-3.3-1-x86_64.pkg.tar.xz
+ source = https://archive.archlinux.org/packages/l/llvm/llvm-3.3-1-x86_64.pkg.tar.xz.sig
+ md5sums = SKIP
+ md5sums = 4031a3ad28f9ecdb2d531f8cd5d6685e
+ md5sums = SKIP
+
+pkgname = panda-qemu-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5abe79caf9e5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.tar.gz
+*.tar.xz
+*.pkg.tar
+*.sig
+pkg/
+src/
+panda/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2a46c6507c2c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Grey Christoforo <first name [at] last name [dot] net>
+
+pkgname=panda-qemu-git
+pkgver=r1715.f758bee
+pkgrel=1
+pkgdesc="An open-source Platform for Architecture-Neutral Dynamic Analysis"
+url="https://github.com/moyix/panda"
+arch=('x86_64')
+license=('GPLv2')
+
+makedepends=('git')
+depends=('libdwarf' 'nasm' 'openssl' 'libpcap' 'wget' 'protobuf-c' 'python2-pycparser' 'libelf' 'wireshark-cli' 'distorm')
+source=("git+git://github.com/moyix/panda.git#branch=master"
+"https://archive.archlinux.org/packages/l/llvm/llvm-3.3-1-x86_64.pkg.tar.xz"{,.sig})
+validpgpkeys=('86CFFCA918CF3AF47147588051E8B148A9999C34') # Evangelos Foutras
+md5sums=('SKIP'
+ '4031a3ad28f9ecdb2d531f8cd5d6685e'
+ 'SKIP')
+
+pkgver() {
+ cd "${srcdir}/panda"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "panda/qemu"
+
+ # specify python2 explicitly
+ sed -i 's,#!/usr/bin/python,#!/usr/bin/python2,g' $(find "${srcdir}/panda" -name "*.py")
+
+ # prog_point.h can not be included inside extern "C"
+ sed -i 's,#include "../common/prog_point.h",}\n#include "../common/prog_point.h"\nextern "C" {,g' "${srcdir}/panda/qemu/panda_plugins/bufmon/bufmon.cpp"
+ sed -i 's,#include "../common/prog_point.h",}\n#include "../common/prog_point.h"\nextern "C" {,g' "${srcdir}/panda/qemu/panda_plugins/printstack/printstack.cpp"
+
+ # asidstory.cpp needs vector and cmath
+ sed -i 's,#include <iomanip>,#include <iomanip>\n#include <vector>\n#include <cmath>,g' "${srcdir}/panda/qemu/panda_plugins/asidstory/asidstory.cpp"
+
+ # pri_taint.cpp needs vector
+ sed -i 's,#include <algorithm>,#include <algorithm>\n#include <vector>,g' "${srcdir}/panda/qemu/panda_plugins/pri_taint/pri_taint.cpp"
+ #include <string.h>
+
+ # fix some perl syntax
+ sed -i 's,\$column =~ s\/\^\\@strong{(\.\*)}\$\/\$1\/;,$column =~ s/^\\@strong\\{(.*)}$/$1/;,g' "${srcdir}/panda/qemu/scripts/texi2pod.pl"
+
+ #TODO: get LLVM3.3 in here
+
+ python2 ../scripts/apigen.py
+ sh ./pp.sh
+ ./configure \
+ --python=python2 \
+ --target-list=x86_64-softmmu,i386-softmmu,arm-softmmu\
+ --prefix="${pkgdir}/opt/${pkgname}" \
+ --disable-pie \
+ --disable-xen \
+ --disable-libiscsi \
+ --extra-cflags="-O2 -I/usr/local/include -I/usr/include/libdwarf" \
+ --extra-cxxflags="-O2" \
+ --extra-ldflags="-L/usr/local/lib -L/usr/local/lib64 -lprotobuf-c -lprotobuf -lpthread"
+}
+
+build() {
+ cd "panda/qemu"
+
+ make -j ${PANDA_NPROC:-$(nproc)}
+}
+
+package() {
+ cd panda/qemu
+ make install
+
+ install -m644 -D "${srcdir}/panda/qemu/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 -D "${srcdir}/panda/qemu/COPYING" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim:set ts=2 sw=2 et: