[!] / Bin / bash -c set -e VERSION = "1.0.2h" SDKVERSION= xcrun --sdk
iphoneos --show-sdk-version 2> /dev/null
MIN_SDK_VERSION_FLAG = "- miphoneos-version-min = 7.0"
BASEPATH = "$ {PWD}" CURRENTPATH = "/ tmp / openssl" ARCHS = "i386 x86_64 armv7s arm64 * arm64" DEV64ER = 641007 *
mkdir -p "$ {CURRENTPATH}" mkdir -p "$ {CURRENTPATH} / bin"
cp "file.tgz" "$ {CURRENTPATH} /file.tgz"cd "$ {CURRENTPATH}" tar -xzf file.tgz cd "openssl - $ {VERSION}" *
для ARCH в $ {ARCHS} do CONFIGURE_FOR = "iphoneos-cross"
, если["$ {ARCH}" == "i386"] ||["$ {ARCH}" == "x86_64"];затем PLATFORM = "iPhoneSimulator" if ["$ {ARCH}" == "x86_64"];затем CONFIGURE_FOR = "darwin64-x86_64-cc", что еще нужно сказать - "! static volatile sig_atomic_t intr_signal;! static volatile intr_signal ;!""crypto / ui / ui_openssl.c" PLATFORM = "iPhoneOS" fi
export CROSS_TOP = "$ {DEVELOPER} / Platforms / $ {PLATFORM} .platform / Developer"
export CROSS_SDK = "$ {PLATFORM} $ {SDKVERSION} .sdk "
echo" Сборка openssl - $ {VERSION} для $ {PLATFORM} $ {SDKVERSION} $ {ARCH} "echo" Пожалуйста, подождите ... "
export CC = "$ {DEVELOPER} / usr / bin / gcc -arch $ {ARCH} $ {MIN_SDK_VERSION_FLAG}" mkdir -p "$ {CURRENTPATH} / bin / $ {PLATFORM} $ {SDKVERSION} - $ {ARCH} .sdk "
LOG =" $ {CURRENTPATH} / bin / $ {PLATFORM} $ {SDKVERSION} - $ {ARCH} .sdk / build-openssl - $ {VERSION} .log "
LIPO_LIBSSL = "$ {LIPO_LIBSSL} $ {CURRENTPATH} / bin / $ {PLATFORM} $ {SDKVERSION} - $ {ARCH} .sdk / lib / libssl.a" LIPO_LIBCRYPTO = "$ {LIPO_LIBCRYPTO} {$/$ndomPLATFORM coming$‹SDKVERSION rout-$ndomARCH‹.sdk/lib/libcrypto.a"
. / Configure $ {CONFIGURE_FOR} --openssldir = "$ {CURRENTPATH} / bin / $ {ПЛАТФОРМА} $ {SDKVERSION} - $ {ARCH} .sdk ">" $ {LOG} "2> & 1 sed -ie" s! ^ CFLAG =! CFLAG = -isysroot $ {CROSS_TOP} / SDKs / $ {CROSS_SDK}!""Makefile"
make >> "$ {LOG}" 2> & 1 make all install_sw >> "$ {LOG}" 2> & 1 make clean >> "$ {LOG}" 2> & 1 done
echo "Build library ..." rm -rf "$ {BASEPATH} / lib /" mkdir -p "$ {BASEPATH} / lib /" lipo -create $ {LIPO_LIBSSL} -output "$ {BASEPATH} /lib/libssl.a "lipo -create $ {LIPO_LIBCRYPTO} -output" $ {BASEPATH} /lib/libcrypto.a "
echo" Копирование заголовков ... "rm -rf" $ {BASEPATH} / opensslInclude / "mkdir -p" $ {BASEPATH} / opensslInclude / "cp -RL" $ {CURRENTPATH} / openssl - $ {VERSION} / include / openssl "" $ {BASEPATH} / opensslInclude / "
cd "$ {BASEPATH}" echo "Строительство выполнено."
echo "Очистка ..." rm -rf "$ {CURRENTPATH}" echo "Готово."
cp: file.tgz: Нет такого файла или каталога
Я пытался установить инструменты командной строки Xcodeно это не решило проблему.