Install keystone/unicorn from pypi instead of from source

fixes #122
This commit is contained in:
Michael Rodler 2017-04-05 12:38:37 +02:00
parent 5a22a7107d
commit 80f422f593
7 changed files with 10 additions and 63 deletions

View file

@ -1,27 +1,5 @@
#!/bin/bash -ex
set -e -o pipefail
git clone --depth 1 https://github.com/keystone-engine/keystone.git
source ctf-tools-venv-activate
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p keystone/build/
pushd keystone/build/
cmake -DCMAKE_INSTALL_PREFIX="$DIR" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_TARGETS_TO_BUILD="all" \
-G "Unix Makefiles" ..
make -j$(getconf _NPROCESSORS_ONLN) install
popd
pushd keystone/bindings/python
pip install -U -e .
# create a symlink that the python bindings can find the keystone lib
ln -s $(readlink -f ../../../lib/libkeystone.so.0) keystone/libkeystone.so
popd
# kstool doesn't find the lib. so let's rm it
rm -r bin/
ctf-tools-pip install -U keystone
# seems to be broken?
#ctf-tools-pip3 install -U keystone

View file

@ -1,4 +0,0 @@
#!/bin/bash -ex
set -eu -o pipefail
pacman -Syu --needed --noconfirm cmake

View file

@ -1,4 +0,0 @@
#!/bin/bash -ex
set -eu -o pipefail
apt-get -y install build-essential cmake

View file

@ -4,10 +4,7 @@ set -e -o pipefail
source ctf-tools-venv-activate
pip uninstall -y keystone-engine || true
#!/bin/bash -ex
if [[ -d keystone && -d keystone/build ]]; then
export PREFIX="$PWD"
pushd keystone/build
make uninstall
popd
fi
ctf-tools-pip uninstall -y keystone || true
ctf-tools-pip3 uninstall -y keystone || true

View file

@ -1,18 +1,4 @@
#!/bin/bash -ex
set -e -o pipefail
git clone --depth 1 https://github.com/unicorn-engine/unicorn.git
source ctf-tools-venv-activate
pushd unicorn
echo "compiling unicorn"
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh
echo "installing unicorn to $VIRTUAL_ENV"
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh install
pushd bindings/python
#pip install -U .
make DEST_DIR="$VIRTUAL_ENV" install
popd
popd
ctf-tools-pip install -U unicorn
ctf-tools-pip3 install -U unicorn

View file

@ -1,4 +1,3 @@
#!/bin/bash -ex
set -eu -o pipefail
apt-get -y install libglib2.0-dev

View file

@ -1,9 +1,4 @@
#!/bin/bash -ex
ctf-tools-venv-activate
pip uninstall -y unicorn
pushd unicorn
PREFIX="$VIRTUAL_ENV" ./make.sh uninstall
popd
ctf-tools-pip uninstall -y unicorn || true
ctf-tools-pip3 uninstall -y unicorn || true