summaryrefslogtreecommitdiff
path: root/libs/tdlib/td/example/ios/build-openssl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libs/tdlib/td/example/ios/build-openssl.sh')
-rw-r--r--libs/tdlib/td/example/ios/build-openssl.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/tdlib/td/example/ios/build-openssl.sh b/libs/tdlib/td/example/ios/build-openssl.sh
new file mode 100644
index 0000000000..2ad9dbcfee
--- /dev/null
+++ b/libs/tdlib/td/example/ios/build-openssl.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+git clone https://github.com/pybee/Python-Apple-support
+cd Python-Apple-support
+git checkout 2.7
+cd ..
+
+#TODO: change openssl version
+platforms="macOS iOS watchOS tvOS"
+for platform in $platforms;
+do
+ echo $platform
+ cd Python-Apple-support
+ #NB: -j will fail
+ make OpenSSL-$platform
+ cd ..
+ rm -rf third_party/openssl/$platform
+ mkdir -p third_party/openssl/$platform/lib
+ cp ./Python-Apple-support/build/$platform/libcrypto.a third_party/openssl/$platform/lib/
+ cp ./Python-Apple-support/build/$platform/libssl.a third_party/openssl/$platform/lib/
+ cp -r ./Python-Apple-support/build/$platform/Support/OpenSSL/Headers/ third_party/openssl/$platform/include
+done