summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-25 12:49:28 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-27 11:52:48 -0700
commit1dfac4cb74d883dda56d39be407e823be82ed96c (patch)
tree2f0c03be6e2b01ebf479936d0c6460028f0caadb /packaging
parent901991afbe1e9c2cf5f3cb0cb7dfccaf84ebc7dc (diff)
downloadsubsurface-1dfac4cb74d883dda56d39be407e823be82ed96c.tar.gz
Android: rebuild libdivecomputer if SHA changes
Just like we already do for iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/android/build.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index cf42d9c57..45ba7738f 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -365,7 +365,15 @@ if [ -e "$PREFIX/lib/libftdi1.so" ] ; then
rm "$PREFIX"/lib/libftdi1.so*
fi
-if [ ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ] ; then
+if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
+ echo "" > libdivecomputer-${ARCH}.SHA
+fi
+pushd subsurface
+git submodule update --recursive
+popd
+CURRENT_SHA=$(cd subsurface/libdivecomputer ; git describe)
+PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
+if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" || ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ] ; then
mkdir -p libdivecomputer-build-"$ARCH"
pushd libdivecomputer-build-"$ARCH"
"$SUBSURFACE_SOURCE"/libdivecomputer/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no