android: Rename 'make sign' to 'make release-apk'.

Desktop / LibreOffice - Jan Holesovsky [collabora.com] - 26 January 2015 03:27 UTC

This now also allows to specify the version number; now you want to use:

cd android/ make versionCode= key= release-apk

###

diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index fd48132..64efa93 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -182,7 +182,11 @@ copy-stuff:
echo 'BuildVersion=' >> assets/program/versionrc
echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' >> assets/program/versionrc
echo 'ReferenceOOoMajorMinor=4.1' >> assets/program/versionrc
- sed -i 's|android:versionName=".*"|android:versionName="$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%H)/$(OOO_VENDOR)"|' AndroidManifest.xml
+ sed -e 's|@ANDROID_DEBUGGABLE@|$(if $(ENABLE_DEBUG),android:debuggable="true",)|' \
+ -e 's|@ANDROID_INSTALL_LOCATION@|$(if $(ENABLE_DEBUG),internalOnly,preferExternal)|' \
+ -e 's|@ANDROID_VERSION_NAME@|$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%h)/$(OOO_VENDOR)|' \
+ -e 's|@ANDROID_VERSION_NUMBER@|$(if $(versionCode),$(versionCode),1)|' \
+ < AndroidManifest.xml.in > AndroidManifest.xml
#
# .res files
mkdir -p assets/program/resource
diff --git a/android/Makefile b/android/Makefile
index 8a2bdbd..644d0e6 100644
--- a/android/Makefile
+++ b/android/Makefile
@@ -13,8 +13,11 @@ include $(module_directory)/../solenv/gbuild/partial_build.mk
.PHONY: sign

SIGNED_APK := $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer.apk
+RELEASE_APK_USAGE := echo; echo "Usage: make versionCode= key= release-apk"

-sign: build
+release-apk: build
+ @if test -z "$(versionCode)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
+ @if test -z "$(key)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
rm -f $(SIGNED_APK)
jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(key)
$(ANDROID_SDK_HOME)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(SIGNED_APK)
diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index ac2c8af..3a17f62 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -1,9 +1,9 @@

package="org.libreoffice"
- @ANDROID_INSTALL_LOCATION@
- android:versionCode="1"
- android:versionName="@ANDROID_VERSION@">
+ android:installLocation="@ANDROID_INSTALL_LOCATION@"
+ android:versionCode="@ANDROID_VERSION_NUMBER@"
+ android:versionName="@ANDROID_VERSION_NAME@">



diff --git a/configure.ac b/configure.ac
index 8ae2852..484de13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3789,8 +3789,6 @@ fi

if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" \) ; then
ENABLE_DEBUG="TRUE"
- ANDROID_DEBUGGABLE='android:debuggable="true"'
- ANDROID_INSTALL_LOCATION='android:installLocation="internalOnly"'
if test -n "$ENABLE_DBGUTIL" ; then
AC_MSG_RESULT([yes (dbgutil)])
else
@@ -3798,13 +3796,9 @@ if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no"
fi
else
ENABLE_DEBUG=""
- ANDROID_DEBUGGABLE=""
- ANDROID_INSTALL_LOCATION='android:installLocation="preferExternal"'
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_DEBUG)
-AC_SUBST(ANDROID_DEBUGGABLE)
-AC_SUBST(ANDROID_INSTALL_LOCATION)

if test "$enable_sal_log" = yes; then
ENABLE_SAL_LOG=TRUE
@@ -4420,7 +4414,6 @@ if test "$cross_compiling" = "yes"; then
bin/get_config_variables \
solenv/bin/getcompver.awk \
solenv/inc/langlist.mk \
- android/experimental/LOAndroid3/AndroidManifest.xml.in \
config_host.mk.in \
Makefile.in \
lo.xcent.in \
@@ -12795,8 +12788,7 @@ if test -f config_host.mk; then
config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
fi

-AC_CONFIG_FILES([android/experimental/LOAndroid3/AndroidManifest.xml
- config_host.mk
+AC_CONFIG_FILES([config_host.mk
Makefile
lo.xcent
instsetoo_native/util/openoffice.lst

ae924ed android: Rename 'make sign' to 'make release-apk'.
android/Bootstrap/Makefile.shared | 6 +++++-
android/Makefile | 5 ++++-
.../experimental/LOAndroid3/AndroidManifest.xml.in | 6 +++---
configure.ac | 10 +---------
4 files changed, 13 insertions(+), 14 deletions(-)

Upstream: cgit.freedesktop.org


  • Share