Skip to content

Commit

Permalink
- opus 1.3.1
Browse files Browse the repository at this point in the history
- libzip 1.5.2
- ndk r19c
  • Loading branch information
damaex committed May 26, 2019
1 parent f96b5e5 commit 5dc5689
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.tar.gz
*.a
*.h
*.h.in
*.pc
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: cpp
language: cpp
dist: xenial
sudo: required
addons:
Expand All @@ -7,9 +7,9 @@ addons:
- cmake
- build-essential
before_install:
- wget https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip
- unzip -qq android-ndk-r19-linux-x86_64.zip -d $HOME
- export ANDROID_NDK=$HOME/android-ndk-r19
- wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip
- unzip -qq android-ndk-r19c-linux-x86_64.zip -d $HOME
- export ANDROID_NDK=$HOME/android-ndk-r19c
- "$ANDROID_NDK/ndk-build --version"
script:
- bash build.sh
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# android-lib
# android-lib
[![Build Status](https://travis-ci.org/damaex/android-lib.svg?branch=master)](https://travis-ci.org/damaex/android-lib)

prebuild some libs for android (unix based)

## libraries
- openssl 1.1.1a
- opus-1.3
- libzip (ff55682b2cb85f3bd53813cddc7c6afb94c7572c)
- openssl 1.1.1b
- opus 1.3.1
- libzip 1.5.2

## requirements
- Android NDK (https://developer.android.com/ndk/downloads/)
Expand All @@ -15,6 +15,6 @@ prebuild some libs for android (unix based)

## build
```bash
export ANDROID_NDK="/home/user/android-ndk-r19" #path to android ndk
export ANDROID_NDK="/home/user/android-ndk-r19c" #path to android ndk
./build.sh
```
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env bash
#! /usr/bin/env bash
mkdir -p "build"

cd openssl
Expand Down
2 changes: 1 addition & 1 deletion openssl/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env bash
#! /usr/bin/env bash

ANDROID_API=16
ANDROID_API_64=21
Expand Down
4 changes: 2 additions & 2 deletions opus/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /usr/bin/env bash
#! /usr/bin/env bash

ANDROID_API=16
ANDROID_API_64=21
OPUS_FULL_VERSION="opus-1.3"
OPUS_FULL_VERSION="opus-1.3.1"

#create output dir
OUTPUT_DIR="build"
Expand Down
41 changes: 19 additions & 22 deletions zip/build.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
#! /usr/bin/env bash
#! /usr/bin/env bash

#ZIP_FULL_VERSION="libzip-1.5.1"
ZIP_FULL_VERSION="libzip"
ANDROID_API=16
ANDROID_API_64=21
ZIP_FULL_VERSION="libzip-1.5.2"

#create output dir
OUTPUT_DIR="$(pwd)/build"
rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}

#configure options
#ZIP_CONFIGURE_OPTIONS=""

#Download
#if [ ! -f "${ZIP_FULL_VERSION}.tar.gz" ]; then
# wget https://libzip.org/download/${ZIP_FULL_VERSION}.tar.gz
#fi

#clone git repository
git clone https://github.com/nih-at/libzip.git

cd libzip
git reset --hard ff55682b2cb85f3bd53813cddc7c6afb94c7572c
cd ..
if [ ! -f "${ZIP_FULL_VERSION}.tar.gz" ]; then
wget https://libzip.org/download/${ZIP_FULL_VERSION}.tar.gz
fi

#check Android NDK
if [ ! ${ANDROID_NDK} ]; then
Expand All @@ -30,28 +21,34 @@ if [ ! ${ANDROID_NDK} ]; then
fi

#extract
#tar -xvzf ${ZIP_FULL_VERSION}.tar.gz
#unzip ${ZIP_FULL_VERSION}.zip
tar -xvzf ${ZIP_FULL_VERSION}.tar.gz

#move to zip folder
cd ${ZIP_FULL_VERSION};

for ANDROID_TARGET_PLATFORM in armeabi-v7a arm64-v8a x86 x86_64
do
echo "Building libzip.a for ${ANDROID_TARGET_PLATFORM}"

mkdir -p "build-${ANDROID_TARGET_PLATFORM}"
cd "build-${ANDROID_TARGET_PLATFORM}"

if [ "$ANDROID_TARGET_PLATFORM" == "armeabi-v7a" ] || [ "$ANDROID_TARGET_PLATFORM" == "x86" ] ; then
ANDROID_API_VERSION=${ANDROID_API}
else
ANDROID_API_VERSION=${ANDROID_API_64}
fi

echo "Building libzip.a for ${ANDROID_TARGET_PLATFORM}"
echo "using API-Level ${ANDROID_API_VERSION}"

#run configuration for target platform
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${OUTPUT_DIR}/${ANDROID_TARGET_PLATFORM} \
-DANDROID_ABI=${ANDROID_TARGET_PLATFORM} \
-DANDROID_PLATFORM=${ANDROID_API_VERSION} \
-DENABLE_OPENSSL:BOOL=OFF \
-DENABLE_COMMONCRYPTO:BOOL=OFF \
-DENABLE_GNUTLS:BOOL=OFF \
-DENABLE_MBEDTLS:BOOL=OFF \
-DENABLE_OPENSSL:BOOL=OFF \
-DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
-DBUILD_TOOLS:BOOL=OFF \
-DBUILD_REGRESS:BOOL=OFF \
Expand Down Expand Up @@ -88,4 +85,4 @@ cd ..
rm -rf ${ZIP_FULL_VERSION}

#remove archive
#rm ${ZIP_FULL_VERSION}.tar.gz
rm ${ZIP_FULL_VERSION}.tar.gz

0 comments on commit 5dc5689

Please sign in to comment.