2012-08-21 13:52:05 +03:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
include $(module_directory)/../solenv/gbuild/partial_build.mk
|
|
|
|
|
2015-01-21 15:05:34 +01:00
|
|
|
.PHONY: sign
|
|
|
|
|
2015-05-21 17:55:28 +01:00
|
|
|
SIGNED_APK := $(BUILDDIR)/android/source/bin/LibreOfficeViewer.apk
|
2015-01-22 08:57:23 +01:00
|
|
|
RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> exampleDocument=</absolute/path/example.odt> key=<key_name> release-apk"
|
2015-01-21 15:05:34 +01:00
|
|
|
|
2015-01-22 08:35:40 +01:00
|
|
|
release-apk: build
|
2017-05-04 10:34:36 +02:00
|
|
|
# versionCode and key are mandatory, exampleDocument is not
|
2015-01-22 08:35:40 +01:00
|
|
|
@if test -z "$(versionCode)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
|
|
|
|
@if test -z "$(key)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
|
2015-01-22 08:57:23 +01:00
|
|
|
|
2015-01-21 15:05:34 +01:00
|
|
|
rm -f $(SIGNED_APK)
|
2015-01-22 08:57:23 +01:00
|
|
|
|
|
|
|
# the actual signing
|
2015-10-11 01:53:29 +02:00
|
|
|
jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(key)
|
|
|
|
$(ANDROID_SDK_HOME)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(SIGNED_APK)
|
2015-01-22 08:57:23 +01:00
|
|
|
|
2015-01-21 15:05:34 +01:00
|
|
|
@echo
|
|
|
|
@echo "Resulting signed apk: $(SIGNED_APK)"
|
|
|
|
|
2012-08-21 13:52:05 +03:00
|
|
|
# vim: set noet sw=4 ts=4:
|