forked from annatisch/azure-uamqp-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_openssl_osx.sh
29 lines (26 loc) · 1 KB
/
build_openssl_osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
export OPENSSL_VERSION="1.1.0g"
export MACOSX_DEPLOYMENT_TARGET=10.6
# Modified from https://gist.github.com/tmiz/1441111
curl -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386_src
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64_src
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl
cd openssl_i386_src
./Configure darwin-i386-cc shared --openssldir=/private/etc/ssl --prefix=/tmp/openssl_i386
make
make install
cd ../
cd openssl_x86_64_src
./Configure darwin64-x86_64-cc shared --openssldir=/private/etc/ssl --prefix=/tmp/openssl_x86_64
make
make install
cd ../
mkdir openssl
cp -a ./openssl_x86_64/. ./openssl/
lipo -create openssl_i386/lib/libcrypto.a openssl_x86_64/lib/libcrypto.a -output openssl/lib/libcrypto.a
lipo -create openssl_i386/lib/libssl.a openssl_x86_64/lib/libssl.a -output openssl/lib/libssl.a
rm openssl-$OPENSSL_VERSION.tar.gz