Move Android NDK to /opt
authorXavier Claessens <xavier.claessens@collabora.com>
Thu, 29 Nov 2018 20:01:55 +0000 (15:01 -0500)
committerXavier Claessens <xclaesse@gmail.com>
Thu, 13 Dec 2018 17:08:16 +0000 (17:08 +0000)
It was installed in '/' which doesn't feel right. Installing it in /root
is also not correct because we want to run the build as user instead of
root in the future and cleanup.sh removes everything in /root. /opt
seems the best place because that's also the default location when
installing Android Studio.

.gitlab-ci.yml
docker/android/android-create-toolchain.sh
docker/android/android-download-ndk.sh
docker/android/prepare.sh

index 4d67da0..57c6eab 100644 (file)
@@ -132,7 +132,7 @@ build android 28 local:
     MESON_ARGS: >
       -Dbad=enabled
       -Dbad:androidmedia=enabled
-      --cross-file /android_arm64_28.txt
+      --cross-file /opt/android_arm64_28.txt
   image: "${CI_REGISTRY_IMAGE}/amd64/android_28:latest"
   except:
     refs:
index d15287d..f57711c 100755 (executable)
@@ -23,13 +23,13 @@ set -eu
 
 arch=$1
 api=$2
-toolchain_path=/android-toolchain-$arch-$api
+toolchain_path=/opt/android-toolchain-$arch-$api
 
 # Create standalone toolchains
-/android-ndk/build/tools/make_standalone_toolchain.py --arch $arch --api $api --install-dir $toolchain_path
+/opt/android-ndk/build/tools/make_standalone_toolchain.py --arch $arch --api $api --install-dir $toolchain_path
 
 # Create a cross file that can be passed to meson
-cat > android_${arch}_${api}.txt <<- EOM
+cat > /opt/android_${arch}_${api}.txt <<- EOM
 [host_machine]
 system = 'android'
 cpu_family = 'aarch64'
index 487b583..566543e 100755 (executable)
@@ -28,4 +28,4 @@ wget --quiet https://dl.google.com/android/repository/android-ndk-$ANDROID_NDK_V
 echo "$ANDROID_NDK_SHA512  android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip" | sha512sum -c
 unzip android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip
 rm android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip
-mv android-ndk-$ANDROID_NDK_VERSION /android-ndk
+mv android-ndk-$ANDROID_NDK_VERSION /opt/android-ndk
index cf6a726..5559ede 100644 (file)
@@ -33,8 +33,9 @@ git config --global user.email "gst-build@gstreamer.net"
 git config --global user.name "Gstbuild Runner"
 
 # Setup Android toolchain
-./root/android-download-ndk.sh
-./root/android-create-toolchain.sh arm64 28
+/root/android-download-ndk.sh
+/root/android-create-toolchain.sh arm64 28
+rm -rf /opt/android-ndk
 
 # get gst-build and make all subprojects available
 git clone git://anongit.freedesktop.org/gstreamer/gst-build '/gst-build/'