Moved android -> build-android. Updated .hgignore.
authorEdouard Tisserant
Thu, 20 Aug 2015 11:58:05 +0200
changeset 337ea7d347eaf6c
parent 336 e0ef820caa40
child 338 962f6656d2c8
Moved android -> build-android. Updated .hgignore.
.hgignore
android/build.sh
android/jni/Android.mk
build-android/build.sh
build-android/jni/Android.mk
     1.1 --- a/.hgignore	Sat Aug 15 19:18:09 2015 +0200
     1.2 +++ b/.hgignore	Thu Aug 20 11:58:05 2015 +0200
     1.3 @@ -13,4 +13,5 @@
     1.4  Release
     1.5  *.lib
     1.6  *.obj
     1.7 +build-android/pEpEngine-android-1.zip
     1.8  
     2.1 --- a/android/build.sh	Sat Aug 15 19:18:09 2015 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,53 +0,0 @@
     2.4 -#!/bin/sh
     2.5 -
     2.6 -build_version=1
     2.7 -ANDROID_PLATFORM=android-21
     2.8 -openssl_build_version=1
     2.9 -cyrus_sasl_build_version=1
    2.10 -libetpan_build_version=1
    2.11 -archs="armeabi armeabi-v7a x86 x86_64"
    2.12 -package_name=pEpEngine-android
    2.13 -
    2.14 -current_dir="`pwd`"
    2.15 -libetpan_dir="$current_dir/../../libetpan/build-android"
    2.16 -
    2.17 -if test "x$ANDROID_NDK" = x ; then
    2.18 -  echo should set ANDROID_NDK before running this script.
    2.19 -  exit 1
    2.20 -fi
    2.21 -
    2.22 -function build {
    2.23 -  rm -rf "$current_dir/obj"
    2.24 -  
    2.25 -  cd "$current_dir/jni"
    2.26 -  $ANDROID_NDK/ndk-build V=1 TARGET_PLATFORM=$ANDROID_PLATFORM TARGET_ARCH_ABI=$TARGET_ARCH_ABI \
    2.27 -    OPENSSL_PATH="$current_dir/third-party/openssl-android-$openssl_build_version" \
    2.28 -    CYRUS_SASL_PATH="$current_dir/third-party/cyrus-sasl-android-$cyrus_sasl_build_version" \
    2.29 -    LIBETPAN_PATH="$current_dir/third-party/libetpan-android-$libetpan_build_version"
    2.30 -
    2.31 -  mkdir -p "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
    2.32 -  cp "$current_dir/obj/local/$TARGET_ARCH_ABI/libpEpEngine.a" "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
    2.33 -  rm -rf "$current_dir/obj"
    2.34 -}
    2.35 -
    2.36 -mkdir -p "$current_dir/third-party"
    2.37 -cd "$current_dir/third-party"
    2.38 -unzip -qo "$libetpan_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip"
    2.39 -unzip -qo "$libetpan_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip"
    2.40 -unzip -qo "$libetpan_dir/libetpan-android-$libetpan_build_version.zip"
    2.41 -
    2.42 -# Copy public headers to include
    2.43 -mkdir -p "$current_dir/$package_name-$build_version/include/pEp"
    2.44 -cd "$current_dir/../src"
    2.45 -cp *.h "$current_dir/$package_name-$build_version/include/pEp"
    2.46 -
    2.47 -# Start building.
    2.48 -for arch in $archs ; do
    2.49 -  TARGET_ARCH_ABI=$arch
    2.50 -  build
    2.51 -done
    2.52 -
    2.53 -rm -rf "$current_dir/third-party"
    2.54 -cd "$current_dir"
    2.55 -zip -qry "$package_name-$build_version.zip" "$package_name-$build_version"
    2.56 -rm -rf "$package_name-$build_version"
     3.1 --- a/android/jni/Android.mk	Sat Aug 15 19:18:09 2015 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,46 +0,0 @@
     3.4 -# Copyright (C) 2015 pEp
     3.5 -#
     3.6 -LOCAL_PATH := $(call my-dir)
     3.7 -
     3.8 -include $(CLEAR_VARS)
     3.9 -
    3.10 -ifeq ($(OPENSSL_PATH),)
    3.11 -$(error OPENSSL_PATH must be set)
    3.12 -endif
    3.13 -
    3.14 -ifeq ($(CYRUS_SASL_PATH),)
    3.15 -$(error CYRUS_SASL_PATH must be set)
    3.16 -endif
    3.17 -
    3.18 -ifeq ($(LIBETPAN_PATH),)
    3.19 -$(error LIBETPAN_PATH must be set)
    3.20 -endif
    3.21 -
    3.22 -LOCAL_MODULE    := pEpEngine
    3.23 -LOCAL_CFLAGS    += -std=c99
    3.24 -LOCAL_SRC_FILES := ../../src/bloblist.c \
    3.25 -                   ../../src/cryptotech.c \
    3.26 -                   ../../src/email.c \
    3.27 -                   ../../src/etpan_mime.c \
    3.28 -                   ../../src/identity_list.c \
    3.29 -                   ../../src/keymanagement.c \
    3.30 -                   ../../src/message_api.c \
    3.31 -                   ../../src/message.c \
    3.32 -                   ../../src/mime.c \
    3.33 -                   ../../src/pEpEngine.c \
    3.34 -                   ../../src/pgp_gpg.c \
    3.35 -                   ../../src/platform_unix.c \
    3.36 -                   ../../src/sqlite3.c \
    3.37 -                   ../../src/stringlist.c \
    3.38 -                   ../../src/stringpair.c \
    3.39 -                   ../../src/timestamp.c \
    3.40 -                   ../../src/trans_auto.c \
    3.41 -                   ../../src/transport.c
    3.42 -
    3.43 -LOCAL_C_INCLUDES := ../../src \
    3.44 -                    ../../../gnupg-for-android/external/data/data/info.guardianproject.gpg/app_opt/include \
    3.45 -                    $(OPENSSL_PATH)/include \
    3.46 -                    $(CYRUS_SASL_PATH)/include \
    3.47 -                    $(LIBETPAN_PATH)/include
    3.48 -
    3.49 -include $(BUILD_STATIC_LIBRARY)
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/build-android/build.sh	Thu Aug 20 11:58:05 2015 +0200
     4.3 @@ -0,0 +1,53 @@
     4.4 +#!/bin/sh
     4.5 +
     4.6 +build_version=1
     4.7 +ANDROID_PLATFORM=android-21
     4.8 +openssl_build_version=1
     4.9 +cyrus_sasl_build_version=1
    4.10 +libetpan_build_version=1
    4.11 +archs="armeabi armeabi-v7a x86 x86_64"
    4.12 +package_name=pEpEngine-android
    4.13 +
    4.14 +current_dir="`pwd`"
    4.15 +libetpan_dir="$current_dir/../../libetpan/build-android"
    4.16 +
    4.17 +if test "x$ANDROID_NDK" = x ; then
    4.18 +  echo should set ANDROID_NDK before running this script.
    4.19 +  exit 1
    4.20 +fi
    4.21 +
    4.22 +function build {
    4.23 +  rm -rf "$current_dir/obj"
    4.24 +  
    4.25 +  cd "$current_dir/jni"
    4.26 +  $ANDROID_NDK/ndk-build V=1 TARGET_PLATFORM=$ANDROID_PLATFORM TARGET_ARCH_ABI=$TARGET_ARCH_ABI \
    4.27 +    OPENSSL_PATH="$current_dir/third-party/openssl-android-$openssl_build_version" \
    4.28 +    CYRUS_SASL_PATH="$current_dir/third-party/cyrus-sasl-android-$cyrus_sasl_build_version" \
    4.29 +    LIBETPAN_PATH="$current_dir/third-party/libetpan-android-$libetpan_build_version"
    4.30 +
    4.31 +  mkdir -p "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
    4.32 +  cp "$current_dir/obj/local/$TARGET_ARCH_ABI/libpEpEngine.a" "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
    4.33 +  rm -rf "$current_dir/obj"
    4.34 +}
    4.35 +
    4.36 +mkdir -p "$current_dir/third-party"
    4.37 +cd "$current_dir/third-party"
    4.38 +unzip -qo "$libetpan_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip"
    4.39 +unzip -qo "$libetpan_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip"
    4.40 +unzip -qo "$libetpan_dir/libetpan-android-$libetpan_build_version.zip"
    4.41 +
    4.42 +# Copy public headers to include
    4.43 +mkdir -p "$current_dir/$package_name-$build_version/include/pEp"
    4.44 +cd "$current_dir/../src"
    4.45 +cp *.h "$current_dir/$package_name-$build_version/include/pEp"
    4.46 +
    4.47 +# Start building.
    4.48 +for arch in $archs ; do
    4.49 +  TARGET_ARCH_ABI=$arch
    4.50 +  build
    4.51 +done
    4.52 +
    4.53 +rm -rf "$current_dir/third-party"
    4.54 +cd "$current_dir"
    4.55 +zip -qry "$package_name-$build_version.zip" "$package_name-$build_version"
    4.56 +rm -rf "$package_name-$build_version"
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/build-android/jni/Android.mk	Thu Aug 20 11:58:05 2015 +0200
     5.3 @@ -0,0 +1,46 @@
     5.4 +# Copyright (C) 2015 pEp
     5.5 +#
     5.6 +LOCAL_PATH := $(call my-dir)
     5.7 +
     5.8 +include $(CLEAR_VARS)
     5.9 +
    5.10 +ifeq ($(OPENSSL_PATH),)
    5.11 +$(error OPENSSL_PATH must be set)
    5.12 +endif
    5.13 +
    5.14 +ifeq ($(CYRUS_SASL_PATH),)
    5.15 +$(error CYRUS_SASL_PATH must be set)
    5.16 +endif
    5.17 +
    5.18 +ifeq ($(LIBETPAN_PATH),)
    5.19 +$(error LIBETPAN_PATH must be set)
    5.20 +endif
    5.21 +
    5.22 +LOCAL_MODULE    := pEpEngine
    5.23 +LOCAL_CFLAGS    += -std=c99
    5.24 +LOCAL_SRC_FILES := ../../src/bloblist.c \
    5.25 +                   ../../src/cryptotech.c \
    5.26 +                   ../../src/email.c \
    5.27 +                   ../../src/etpan_mime.c \
    5.28 +                   ../../src/identity_list.c \
    5.29 +                   ../../src/keymanagement.c \
    5.30 +                   ../../src/message_api.c \
    5.31 +                   ../../src/message.c \
    5.32 +                   ../../src/mime.c \
    5.33 +                   ../../src/pEpEngine.c \
    5.34 +                   ../../src/pgp_gpg.c \
    5.35 +                   ../../src/platform_unix.c \
    5.36 +                   ../../src/sqlite3.c \
    5.37 +                   ../../src/stringlist.c \
    5.38 +                   ../../src/stringpair.c \
    5.39 +                   ../../src/timestamp.c \
    5.40 +                   ../../src/trans_auto.c \
    5.41 +                   ../../src/transport.c
    5.42 +
    5.43 +LOCAL_C_INCLUDES := ../../src \
    5.44 +                    ../../../gnupg-for-android/external/data/data/info.guardianproject.gpg/app_opt/include \
    5.45 +                    $(OPENSSL_PATH)/include \
    5.46 +                    $(CYRUS_SASL_PATH)/include \
    5.47 +                    $(LIBETPAN_PATH)/include
    5.48 +
    5.49 +include $(BUILD_STATIC_LIBRARY)