Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / android / Makefile
blob288932bbe1b6f3eb4af2a9518509a96931b2d9d6
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
11 include $(module_directory)/../solenv/gbuild/partial_build.mk
13 .PHONY: sign
15 SIGNED_APK := $(BUILDDIR)/android/source/bin/LibreOfficeViewer.apk
16 RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> exampleDocument=</absolute/path/example.odt> key=<key_name> release-apk"
18 release-apk: build
19 # versionCode and key are mandatory, exampleDocument is not
20 @if test -z "$(versionCode)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
21 @if test -z "$(key)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
23 rm -f $(SIGNED_APK)
25 # the actual signing
26 jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(key)
27 $(ANDROID_SDK_HOME)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(SIGNED_APK)
29 @echo
30 @echo "Resulting signed apk: $(SIGNED_APK)"
32 # vim: set noet sw=4 ts=4: