kivy-ios/tools/build-openssl.sh

33 lines
870 B
Bash
Raw Normal View History

2014-05-02 09:18:41 +02:00
#!/bin/bash
. $(dirname $0)/environment.sh
if [ ! -d $TMPROOT/openssl ] ; then
mkdir $TMPROOT/openssl
fi
2014-05-02 09:42:47 +02:00
# Check we have a cloned repo
2014-05-02 09:18:41 +02:00
if [ ! -d $TMPROOT/openssl/ios-openssl ] ; then
2014-05-02 09:42:47 +02:00
try pushd .
cd $TMPROOT/openssl
2014-05-02 09:18:41 +02:00
try git clone -b master https://github.com/zen-code/ios-openssl
2014-05-02 09:42:47 +02:00
try popd
fi
# Build the required binaries
2014-05-02 23:13:31 +02:00
if [ -d $TMPROOT/openssl/ios-openssl ] ; then
2014-05-02 10:46:15 +02:00
if [ ! $TMPROOT/openssl/ios-openssl/lib/libssl.a ] ; then
2014-05-02 22:59:34 +02:00
try mkdir $TMPROOT/openssl/ios-openssl/lib
2014-05-02 10:46:15 +02:00
try pushd .
cd $TMPROOT/openssl/ios-openssl
sh build.sh
try popd
fi
2014-05-02 09:18:41 +02:00
fi
2014-05-02 10:46:15 +02:00
# Copy the binaries to the appropriate places.
if [ $TMPROOT/openssl/ios-openssl/lib/libssl.a ] ; then
cp $TMPROOT/openssl/ios-openssl/lib/libssl.a $BUILDROOT/lib/libssl.a
cp $TMPROOT/openssl/ios-openssl/lib/libcrypto.a $BUILDROOT/lib/libcrypto.a
fi