summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/Bootstrap/Makefile.shared2
-rw-r--r--android/Makefile7
2 files changed, 7 insertions, 2 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index 64efa932ba66..716ced5acba4 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -130,7 +130,7 @@ copy-stuff:
for F in program/services/services program/services; do \
sed -e 's!uri="vnd.sun.star.expand:$$LO_LIB_DIR/!uri="file://$$APP_DATA_DIR/lib/!g' <$(INSTDIR)/$$F.rdb >assets/$$F.rdb; \
done
- cp $(SRC_ROOT)/android/default-document/example.odt assets/example.odt
+ cp $(if $(exampleDocument),$(exampleDocument),$(SRC_ROOT)/android/default-document/example.odt) assets/example.odt
cp $(SRC_ROOT)/readlicense_oo/license/LICENSE assets/license.txt
cp $(SRC_ROOT)/readlicense_oo/license/NOTICE assets/notice.txt
cp $(WORKDIR)/ComponentTarget/i18npool/util/i18npool.component assets/ComponentTarget/i18npool/util
diff --git a/android/Makefile b/android/Makefile
index 644d0e6e1638..152b1a77e848 100644
--- a/android/Makefile
+++ b/android/Makefile
@@ -13,14 +13,19 @@ 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=<version_num+1> key=<key_name> release-apk"
+RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> exampleDocument=</absolute/path/example.odt> key=<key_name> release-apk"
release-apk: build
+ # versionCode and key are mandatory, examplDocument is not
@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)
+
+ # the actual signing
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)
+
@echo
@echo "Resulting signed apk: $(SIGNED_APK)"