3 if [ `dirname $0` != "." ]; then
4 echo "only run this script like ./`basename $0`"
8 if [ -z $WORKSPACE ]; then
12 # make sure that no VirtualBox processes are left running
15 echo "$(date -u) - cleanup in progress..."
16 ps auxww | grep -e VBox -e qemu
17 cd $WORKSPACE/buildserver
22 killall -9 VBoxHeadless
23 echo "$(date -u) - cleanup done."
25 trap cleanup_all INT TERM EXIT
30 # make sure we have the vagrant box image cached
31 test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver
32 cd ~/.cache/fdroidserver
33 wget --tries=1 --timeout=5 --continue https://f-droid.org/jessie64.box || true
34 echo "de3e3c4a9c13e8c015e30edeea0f583b195d1ee8ff9ad4814e933bbfb560200f jessie64.box" > jessie64.box.sha256
35 sha256sum -c jessie64.box.sha256
37 # redirect homes to be in the git repo, so they'll get cleaned and reset
38 export XDG_CONFIG_HOME=$WORKSPACE
39 export VBOX_USER_HOME=$WORKSPACE/VirtualBox
41 if which VBoxManage; then
42 VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
43 VBoxManage setproperty logginglevel debug
45 export VAGRANT_HOME=$WORKSPACE/vagrant.d
49 echo "debian_mirror = 'http://ftp.uk.debian.org/debian/'" > $WORKSPACE/makebuildserver.config.py
50 echo "boot_timeout = 1200" >> $WORKSPACE/makebuildserver.config.py
51 echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
52 ./makebuildserver --verbose --clean
54 # this can be handled in the jenkins job, or here:
55 if [ -e fdroiddata ]; then
61 git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git fdroiddata
65 echo "build_server_always = True" > config.py
66 # if it can't build fdroid, then its really broken
67 ../fdroid build --verbose --stop --latest org.fdroid.fdroid
68 # Gradle, JNI, preassemble
69 ../fdroid build --verbose --stop org.adaway:55
71 ../fdroid build --verbose --stop info.guardianproject.checkey:101
72 # building old versions should still work
73 ../fdroid build --verbose --stop org.fdroid.fdroid:96150
74 # VLC is important, and uses cmake
75 ../fdroid build --verbose --stop org.videolan.vlc:12000604