blob: c93068e0122a4eaf756d98d24b175ffb041d9fbd [file] [log] [blame]
{
"name": "OpenSSL",
"version": "1.0.1",
"summary": "OpenSSL is an SSL/TLS and Crypto toolkit. Deprecated in Mac OS and gone in iOS, this spec gives your project non-deprecated OpenSSL support.",
"authors": "OpenSSL Project <openssl-dev@openssl.org>",
"homepage": "http://www.openssl.org/",
"license": "BSD-style Open Source",
"source": {
"http": "https://www.openssl.org/source/openssl-1.0.1g.tar.gz"
},
"preserve_paths": [
"file.tgz",
"lib/*",
"include/*",
"include/**/*.h",
"crypto/*.h",
"crypto/**/*.h",
"e_os.h",
"e_os2.h",
"ssl/*.h",
"ssl/**/*.h",
"MacOS/*.h"
],
"prepare_command": "\n VERSION=\"1.0.1g\"\n SDKVERSION=`/usr/bin/xcodebuild -version -sdk 2> /dev/null | grep SDKVersion | tail -n 1 | awk '{ print $2 }'`\n\n CURRENTPATH=`pwd`\n ARCHS=\"i386 x86_64 armv7 armv7s arm64\"\n DEVELOPER=`xcode-select -print-path`\n\n mkdir -p \"${CURRENTPATH}/bin\"\n mkdir -p \"${CURRENTPATH}/lib\"\n mkdir -p \"${CURRENTPATH}/openssl\"\n\n hash=$(cat file.tgz | openssl dgst -sha1 | sed 's/^.* //')\n\n if [ \"$hash\" != \"b28b3bcb1dc3ee7b55024c9f795be60eb3183e3c\" ]; then\n echo \"OpenSSL downloaded doesn't seem valid\"\n exit 1;\n fi\n\n tar -xzf file.tgz\n\n cd openssl-${VERSION}\n\n for ARCH in ${ARCHS}\n do\n\n CONFIGURE_FOR=\"iphoneos-cross\"\n\n if [ \"${ARCH}\" == \"i386\" ] || [ \"${ARCH}\" == \"x86_64\" ] ;\n then\n PLATFORM=\"iPhoneSimulator\"\n if [ \"${ARCH}\" == \"x86_64\" ] ;\n then\n CONFIGURE_FOR=\"darwin64-x86_64-cc\"\n fi\n else\n sed -ie \"s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!\" \"crypto/ui/ui_openssl.c\"\n PLATFORM=\"iPhoneOS\"\n fi\n\n export CROSS_TOP=\"${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer\"\n export CROSS_SDK=\"${PLATFORM}${SDKVERSION}.sdk\"\n\n echo \"Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}\"\n echo \"Please stand by...\"\n\n export CC=\"${DEVELOPER}/usr/bin/gcc -arch ${ARCH} -miphoneos-version-min=${SDKVERSION}\"\n mkdir -p \"${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk\"\n LOG=\"${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log\"\n\n ./Configure ${CONFIGURE_FOR} --openssldir=\"${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk\" > \"${LOG}\" 2>&1\n sed -ie \"s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !\" \"Makefile\"\n\n make >> \"${LOG}\" 2>&1\n make install >> \"${LOG}\" 2>&1\n make clean >> \"${LOG}\" 2>&1\n done\n\n\n echo \"Build library...\"\n lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libssl.a -output ${CURRENTPATH}/lib/libssl.a\n lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libcrypto.a -output ${CURRENTPATH}/lib/libcrypto.a\n\n echo \"Building done.\"\n echo \"Cleaning up...\"\n rm -rf ${CURRENTPATH}/openssl-${VERSION}\n rm -R ${CURRENTPATH}/bin\n rm -rf file.tgz\n echo \"Done.\"\n",
"header_dir": "openssl",
"platforms": {
"ios": null
},
"source_files": "include/openssl/*.h",
"libraries": [
"crypto",
"ssl"
],
"xcconfig": {
"LIBRARY_SEARCH_PATHS": "\"$(PODS_ROOT)/OpenSSL/lib\""
},
"requires_arc": false
}