Created
September 12, 2014 18:21
-
-
Save kived/1868d0e12b8384115876 to your computer and use it in GitHub Desktop.
liblinphone recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#VERSION_liblinphone=${VERSION_liblinphone:-0004c83} | |
VERSION_liblinphone=${VERSION_liblinphone:-2.2.1.1-git} | |
DEPS_liblinphone=() | |
RECIPE_liblinphone=$RECIPES_PATH/liblinphone | |
if [[ "$VERSION_liblinphone" == *-git ]]; then | |
VERSION_liblinphone=${VERSION_liblinphone:0:-4} | |
URL_liblinphone= | |
MD5_liblinphone= | |
BUILD_liblinphone=$BUILD_PATH/liblinphone/linphone-android | |
function prebuild_liblinphone() { | |
mkdir -p $BUILD_liblinphone | |
cd $BUILD_liblinphone | |
if [ ! -d .git ]; then | |
cd .. | |
git clone git://git.linphone.org/linphone-android.git --recursive | |
cd $BUILD_liblinphone | |
else | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git clean -xdf | |
git submodule foreach --recursive git clean -xdf | |
git fetch --tags --recurse-submodules=on-demand | |
fi | |
git checkout $VERSION_liblinphone | |
git submodule update --init --recursive | |
try patch -p1 < $RECIPE_liblinphone/makefile.patch | |
#try patch -p1 < $RECIPE_liblinphone/voipkill.patch | |
} | |
else | |
URL_liblinphone=https://dl.dropboxusercontent.com/u/24387801/liblinphone-${VERSION_liblinphone}.tbz2 | |
MD5_liblinphone=d6219ac332ce6ef28cb291ee77f21e13 | |
BUILD_liblinphone=$BUILD_PATH/liblinphone/$(get_directory $URL_liblinphone) | |
function prebuild_liblinphone() { | |
#cd $BUILD_liblinphone | |
#if [ ! -f .patched ]; then | |
# try patch -p1 < $RECIPE_liblinphone/makefile.patch | |
# touch .patched | |
#fi | |
: | |
} | |
fi | |
function shouldbuild_liblinphone() { | |
if [ ! -d "$BUILD_liblinphone/.git" -a -f "$LIBS_PATH/liblinphone-$ARCH.so" ]; then | |
DO_BUILD=0 | |
fi | |
} | |
function build_liblinphone() { | |
cd $BUILD_liblinphone | |
OLDNDK=$ANDROIDNDK | |
: ${LINPHONENDK:=${ANDROIDNDK}-r9} | |
export ANDROIDNDK=$LINPHONENDK | |
push_arm | |
try make update-project | |
try make prepare-sources | |
try make generate-libs | |
try make | |
try make install | |
make generate-sdk | |
make liblinphone-android-sdk | |
#try make BUILD_X264=1 BUILD_OPENH264=0 BUILD_FOR_X86=0 BUILD_SQLITE=0 BUILD_SILK=0 | |
#try make generate-sdk | |
pop_arm | |
try cp -a libs/$ARCH/*.so $LIBS_PATH | |
mkdir -p $BUILD_PATH/jars | |
try cp bin/liblinphone.jar $BUILD_PATH/jars | |
try mkdir -p include/linphone | |
try cp -a submodules/linphone/coreapi/*.h include/linphone/ | |
try cp -ar submodules/linphone/mediastreamer2/include/mediastreamer2 include/ | |
try cp -ar submodules/linphone/oRTP/include/ortp include/ | |
export ANDROIDNDK=$OLDNDK | |
} | |
function postbuild_liblinphone() { | |
true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment