Commit fd92e4ee authored by Martin Straka's avatar Martin Straka

Updated ios openssl build script

parent cb305489
......@@ -21,11 +21,13 @@
###########################################################################
# Change values here #
# #
VERSION="1.0.2l" #
VERSION="1.0.2q" #
IOS_SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version` #
TVOS_SDKVERSION=`xcrun -sdk appletvos --show-sdk-version` #
CONFIG_OPTIONS="" #
CURL_OPTIONS="" #
CURL_OPTIONS="" #
#ARCHS="i386 x86_64 armv7 armv7s arm64 tv_x86_64 tv_arm64" #
ARCHS="arm64 armv7 x86_64"
# To set "enable-ec_nistp_64_gcc_128" configuration for x64 archs set next variable to "true"
ENABLE_EC_NISTP_64_GCC_128="" #
......@@ -51,8 +53,6 @@ spinner()
}
CURRENTPATH=`pwd`
#ARCHS="i386 x86_64 armv7 armv7s arm64 tv_x86_64 tv_arm64"
ARCHS="armv7 arm64"
DEVELOPER=`xcode-select -print-path`
IOS_MIN_SDK_VERSION="7.0"
TVOS_MIN_SDK_VERSION="9.0"
......@@ -81,7 +81,7 @@ case $CURRENTPATH in
esac
set -e
OPENSSL_ARCHIVE_BASE_NAME=OpenSSL_${VERSION//./_}
OPENSSL_ARCHIVE_BASE_NAME=openssl-${VERSION}
OPENSSL_ARCHIVE_FILE_NAME=${OPENSSL_ARCHIVE_BASE_NAME}.tar.gz
if [ ! -e ${OPENSSL_ARCHIVE_FILE_NAME} ]; then
echo "Downloading ${OPENSSL_ARCHIVE_FILE_NAME}"
......@@ -143,7 +143,7 @@ do
src_work_dir="${CURRENTPATH}/src/${PLATFORM}-${ARCH}"
mkdir -p "$src_work_dir"
tar zxf "${CURRENTPATH}/${OPENSSL_ARCHIVE_FILE_NAME}" -C "$src_work_dir"
cd "${src_work_dir}/openssl-${OPENSSL_ARCHIVE_BASE_NAME}"
cd "${src_work_dir}/${OPENSSL_ARCHIVE_BASE_NAME}"
chmod u+x ./Configure
if [[ "${PLATFORM}" == "AppleTVSimulator" || "${PLATFORM}" == "AppleTVOS" ]]; then
......@@ -220,12 +220,14 @@ done
echo "Build library for iOS..."
lipo -create \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-armv7.sdk/lib/libssl.a \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-arm64.sdk/lib/libssl.a \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-armv7.sdk/lib/libssl.a \
${CURRENTPATH}/bin/iPhoneSimulator${IOS_SDKVERSION}-x86_64.sdk/lib/libssl.a \
-output ${CURRENTPATH}/lib/libssl.a
lipo -create \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-armv7.sdk/lib/libcrypto.a \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-arm64.sdk/lib/libcrypto.a \
${CURRENTPATH}/bin/iPhoneOS${IOS_SDKVERSION}-armv7.sdk/lib/libcrypto.a \
${CURRENTPATH}/bin/iPhoneSimulator${IOS_SDKVERSION}-x86_64.sdk/lib/libcrypto.a \
-output ${CURRENTPATH}/lib/libcrypto.a
mkdir -p ${CURRENTPATH}/include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment