blob: 46b4c75af2d0d079f0ac988a8e006dcd138163d4 [file] [log] [blame]
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
export DEBIAN_FRONTEND=noninteractive
sudo apt-mark hold grub-pc
sudo apt -q -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" update
sudo apt -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
sudo apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" build-essential git openjdk-8-jdk unzip ruby ruby-rugged
sudo apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" lib32stdc++6 lib32z1 lib32z1-dev
mkdir android-sdk-linux
cd android-sdk-linux
wget -q https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip sdk-tools-linux-3859397.zip
rm sdk-tools-linux-3859397.zip
export ANDROID_HOME=`pwd`
export PATH=${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
echo "y" | sdkmanager "platform-tools"
sdkmanager "platforms;android-28" "ndk-bundle"
cd ndk-bundle
git clone https://github.com/named-data-mobile/android-crew-staging.git crew.dir
CREW_OWNER=named-data-mobile crew.dir/crew install target/sqlite target/openssl target/boost
CREW_OWNER=named-data-mobile crew.dir/crew install target/ndn_cxx target/nfd
cd ../..
echo sdk.dir=`pwd`/android-sdk-linux > local.properties
echo ndk.dir=`pwd`/android-sdk-linux/ndk-bundle >> local.properties
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "puphpet/ubuntu1604-x64"
config.vm.provision "shell", privileged: false, inline: $script
config.vm.provider "virtualbox" do |vb|
vb.memory = 4048
vb.cpus = 4
end
end