kivy-ios/tools/build-openssl.sh

35 lines
994 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-05 22:06:42 +02:00
echo "ios-openssl repo not found. Pulling latest..."
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
echo "ios-openssl repo found. Building now..."
if [ ! -d $TMPROOT/openssl/ios-openssl/lib ] ; then
try mkdir $TMPROOT/openssl/ios-openssl/lib
2014-05-02 10:46:15 +02:00
fi
try pushd .
cd $TMPROOT/openssl/ios-openssl
# Please refer to the script below for details of the OpenSSL build
sh build.sh
try popd
2014-05-02 09:18:41 +02:00
fi
echo "Copying built OpenSSL binaries..."
cp $TMPROOT/openssl/ios-openssl/lib/libssl.a $BUILDROOT/lib/libssl.a
cp $TMPROOT/openssl/ios-openssl/lib/libcrypto.a $BUILDROOT/lib/libcrypto.a
2014-05-13 16:11:03 +02:00
sh $KIVYIOSROOT/tools/build-ssllink.sh