mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Update OpenSSL, add unbound for android build scripts
This commit is contained in:
parent
a064e7864a
commit
8919fdc4d2
4 changed files with 71 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. ./config.sh
|
. ./config.sh
|
||||||
MONERO_BRANCH=release-v0.17.3.2-android
|
MONERO_BRANCH=release-v0.18.0.0-android
|
||||||
MONERO_SRC_DIR=${WORKDIR}/monero
|
MONERO_SRC_DIR=${WORKDIR}/monero
|
||||||
|
|
||||||
git clone https://github.com/cake-tech/monero.git ${MONERO_SRC_DIR} --branch ${MONERO_BRANCH}
|
git clone https://github.com/cake-tech/monero.git ${MONERO_SRC_DIR} --branch ${MONERO_BRANCH}
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
./build_boost.sh
|
./build_boost.sh
|
||||||
./build_openssl.sh
|
./build_openssl.sh
|
||||||
./build_sodium.sh
|
./build_sodium.sh
|
||||||
|
./build_unbound.sh
|
||||||
./build_zmq.sh
|
./build_zmq.sh
|
||||||
./build_monero.sh
|
./build_monero.sh
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. ./config.sh
|
. ./config.sh
|
||||||
OPENSSL_FILENAME=openssl-1.1.1k.tar.gz
|
OPENSSL_FILENAME=openssl-1.1.1q.tar.gz
|
||||||
OPENSSL_FILE_PATH=$WORKDIR/$OPENSSL_FILENAME
|
OPENSSL_FILE_PATH=$WORKDIR/$OPENSSL_FILENAME
|
||||||
OPENSSL_SRC_DIR=$WORKDIR/openssl-1.1.1k
|
OPENSSL_SRC_DIR=$WORKDIR/openssl-1.1.1q
|
||||||
OPENSSL_SHA256="892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5"
|
OPENSSL_SHA256="d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca"
|
||||||
ZLIB_DIR=$WORKDIR/zlib
|
ZLIB_DIR=$WORKDIR/zlib
|
||||||
ZLIB_TAG=v1.2.11
|
ZLIB_TAG=v1.2.11
|
||||||
ZLIB_COMMIT_HASH="cacf7f1d4e3d44d871b605da3b647f07d718623f"
|
ZLIB_COMMIT_HASH="cacf7f1d4e3d44d871b605da3b647f07d718623f"
|
||||||
|
@ -40,10 +40,9 @@ rm -rf $OPENSSL_SRC_DIR
|
||||||
tar -xzf $OPENSSL_FILE_PATH -C $WORKDIR
|
tar -xzf $OPENSSL_FILE_PATH -C $WORKDIR
|
||||||
cd $OPENSSL_SRC_DIR
|
cd $OPENSSL_SRC_DIR
|
||||||
|
|
||||||
sed -i -e "s/mandroid/target\ ${TARGET}\-linux\-android/" Configure
|
|
||||||
CC=clang ANDROID_NDK=$TOOLCHAIN \
|
CC=clang ANDROID_NDK=$TOOLCHAIN \
|
||||||
./Configure ${X_ARCH} \
|
./Configure ${X_ARCH} \
|
||||||
no-asm no-shared \
|
no-shared no-tests \
|
||||||
--with-zlib-include=${PREFIX}/include \
|
--with-zlib-include=${PREFIX}/include \
|
||||||
--with-zlib-lib=${PREFIX}/lib \
|
--with-zlib-lib=${PREFIX}/lib \
|
||||||
--prefix=${PREFIX} \
|
--prefix=${PREFIX} \
|
||||||
|
|
65
scripts/android/build_unbound.sh
Executable file
65
scripts/android/build_unbound.sh
Executable file
|
@ -0,0 +1,65 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
EXPAT_VERSION=R_2_4_8
|
||||||
|
EXPAT_HASH="3bab6c09bbe8bf42d84b81563ddbcf4cca4be838"
|
||||||
|
EXPAT_SRC_DIR=$WORKDIR/libexpat
|
||||||
|
|
||||||
|
for arch in "aarch" "aarch64" "i686" "x86_64"
|
||||||
|
do
|
||||||
|
PREFIX=$WORKDIR/prefix_${arch}
|
||||||
|
TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
|
PATH="${TOOLCHAIN_BASE_DIR}_${arch}/bin:${ORIGINAL_PATH}"
|
||||||
|
|
||||||
|
cd $WORKDIR
|
||||||
|
rm -rf $EXPAT_SRC_DIR
|
||||||
|
git clone https://github.com/libexpat/libexpat.git -b ${EXPAT_VERSION} ${EXPAT_SRC_DIR}
|
||||||
|
cd $EXPAT_SRC_DIR
|
||||||
|
test `git rev-parse HEAD` = ${EXPAT_HASH} || exit 1
|
||||||
|
cd $EXPAT_SRC_DIR/expat
|
||||||
|
|
||||||
|
case $arch in
|
||||||
|
"aarch") HOST="arm-linux-androideabi";;
|
||||||
|
"i686") HOST="x86-linux-android";;
|
||||||
|
*) HOST="${arch}-linux-android";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
./buildconf.sh
|
||||||
|
CC=clang CXX=clang++ ./configure --enable-static --disable-shared --prefix=${PREFIX} --host=${HOST}
|
||||||
|
make -j$THREADS
|
||||||
|
make -j$THREADS install
|
||||||
|
done
|
||||||
|
|
||||||
|
UNBOUND_VERSION=release-1.16.2
|
||||||
|
UNBOUND_HASH="cbed768b8ff9bfcf11089a5f1699b7e5707f1ea5"
|
||||||
|
UNBOUND_SRC_DIR=$WORKDIR/unbound-1.16.2
|
||||||
|
|
||||||
|
for arch in "aarch" "aarch64" "i686" "x86_64"
|
||||||
|
do
|
||||||
|
PREFIX=$WORKDIR/prefix_${arch}
|
||||||
|
TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
|
|
||||||
|
case $arch in
|
||||||
|
"aarch") TOOLCHAIN_BIN_PATH=${TOOLCHAIN_BASE_DIR}_${arch}/arm-linux-androideabi/bin;;
|
||||||
|
*) TOOLCHAIN_BIN_PATH=${TOOLCHAIN_BASE_DIR}_${arch}/${arch}-linux-android/bin;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
PATH="${TOOLCHAIN_BIN_PATH}:${TOOLCHAIN_BASE_DIR}_${arch}/bin:${ORIGINAL_PATH}"
|
||||||
|
echo $PATH
|
||||||
|
cd $WORKDIR
|
||||||
|
rm -rf $UNBOUND_SRC_DIR
|
||||||
|
git clone https://github.com/NLnetLabs/unbound.git -b ${UNBOUND_VERSION} ${UNBOUND_SRC_DIR}
|
||||||
|
cd $UNBOUND_SRC_DIR
|
||||||
|
test `git rev-parse HEAD` = ${UNBOUND_HASH} || exit 1
|
||||||
|
|
||||||
|
case $arch in
|
||||||
|
"aarch") HOST="arm-linux-androideabi";;
|
||||||
|
"i686") HOST="x86-linux-android";;
|
||||||
|
*) HOST="${arch}-linux-android";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared --disable-flto --with-ssl=${PREFIX} --with-libexpat=${PREFIX}
|
||||||
|
make -j$THREADS
|
||||||
|
make -j$THREADS install
|
||||||
|
done
|
Loading…
Reference in a new issue