anbox/scripts/clean-build.sh
Shengjing Zhu 3a1345c532 Fix build dir after cmake build
Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
2017-06-27 11:15:52 +08:00

67 lines
1.2 KiB
Bash
Executable file

#!/bin/sh
set -ex
apt-get update -qq
apt-get install -qq -y \
build-essential \
cmake \
cmake-data \
cmake-extras \
debhelper \
dbus \
git \
google-mock \
libboost-dev \
libboost-filesystem-dev \
libboost-log-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libcap-dev \
libdbus-1-dev \
libdbus-cpp-dev \
libegl1-mesa-dev \
libgles2-mesa-dev \
libglib2.0-dev \
libglm-dev \
libgtest-dev \
liblxc1 \
libproperties-cpp-dev \
libprotobuf-dev \
libsdl2-dev \
libsdl2-image-dev \
lxc-dev \
pkg-config \
protobuf-compiler
apt-get clean
cd /anbox
cleanup() {
# In cases where anbox comes directly from a checked out Android
# build environment we miss some symlinks which are present on
# the host and don't have a valid git repository in that case.
if [ -d .git ] ; then
git clean -fdx .
git reset --hard
fi
}
cleanup
mkdir build || rm -rf build/*
cd build
cmake ..
make -j10
make test
cd ..
cleanup
apt-get install -y build-essential curl devscripts gdebi-core dkms dh-systemd
apt-get install -y $(gdebi --quiet --apt-line ./debian/control)
debuild -us -uc