Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 86 lines (67 sloc) 2.944 kB
7437903 @st3fan Initial import
st3fan authored
1 #!/bin/sh
2
3 # Yay shell scripting! This script builds a static version of
ca43b28 @st3fan New build without the experimental JPAKE code.
st3fan authored
4 # OpenSSL 1.0.0a for iOS 4.2 that contains code for armv6, armv7 and i386.
7437903 @st3fan Initial import
st3fan authored
5
6 set -x
7
ca43b28 @st3fan New build without the experimental JPAKE code.
st3fan authored
8 OPENSSL_CONFIGURE_OPTIONS=
7437903 @st3fan Initial import
st3fan authored
9
10 rm -rf include lib *.log
11
12 rm -rf /tmp/openssl-1.0.0a-*
13 rm -rf /tmp/openssl-1.0.0a-*.log
14
15 # ARMv6
16
17 rm -rf openssl-1.0.0a
18 tar xfz openssl-1.0.0a.tar.gz
19 pushd .
20 cd openssl-1.0.0a
21 ./configure BSD-generic32 --openssldir=/tmp/openssl-1.0.0a-armv6 $OPENSSL_CONFIGURE_OPTIONS &> /tmp/openssl-1.0.0a-armv6.log
22 perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
23 perl -i -pe 's|^CC= gcc|CC= /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6|g' Makefile
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
24 perl -i -pe 's|^CFLAG= (.*)|CFLAG= -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk $1|g' Makefile
7437903 @st3fan Initial import
st3fan authored
25 make &> /tmp/openssl-1.0.0a-armv6.log
26 make install &> /tmp/openssl-1.0.0a-armv6.log
27 popd
28 rm -rf openssl-1.0.0a
29
30 # ARMv7
31
32 rm -rf openssl-1.0.0a
33 tar xfz openssl-1.0.0a.tar.gz
34 pushd .
35 cd openssl-1.0.0a
36 ./configure BSD-generic32 --openssldir=/tmp/openssl-1.0.0a-armv7 $OPENSSL_CONFIGURE_OPTIONS >> /tmp/openssl-1.0.0a-armv7.log
37 perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
38 perl -i -pe 's|^CC= gcc|CC= /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7|g' Makefile
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
39 perl -i -pe 's|^CFLAG= (.*)|CFLAG= -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk $1|g' Makefile
7437903 @st3fan Initial import
st3fan authored
40 make &> /tmp/openssl-1.0.0a-armv7.log
41 make install &> /tmp/openssl-1.0.0a-armv7.log
42 popd
43 rm -rf openssl-1.0.0a
44
45 # i386
46
47 rm -rf openssl-1.0.0a
48 tar xfz openssl-1.0.0a.tar.gz
49 pushd .
50 cd openssl-1.0.0a
51 ./configure BSD-generic32 --openssldir=/tmp/openssl-1.0.0a-i386 $OPENSSL_CONFIGURE_OPTIONS >> /tmp/openssl-1.0.0a-i386.log
52 perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
53 perl -i -pe 's|^CC= gcc|CC= /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -arch i386|g' Makefile
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
54 perl -i -pe 's|^CFLAG= (.*)|CFLAG= -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk $1|g' Makefile
7437903 @st3fan Initial import
st3fan authored
55 make &> /tmp/openssl-1.0.0a-i386.log
56 make install &> /tmp/openssl-1.0.0a-i386.log
57 popd
58 rm -rf openssl-1.0.0a
59
60 #
61
62 mkdir include
2490958 @st3fan Better if header files are in their top-level openssl directory
st3fan authored
63 cp -r /tmp/openssl-1.0.0a-i386/include/openssl include/
7437903 @st3fan Initial import
st3fan authored
64
65 mkdir lib
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
66
7437903 @st3fan Initial import
st3fan authored
67 lipo \
68 /tmp/openssl-1.0.0a-armv6/lib/libcrypto.a \
69 /tmp/openssl-1.0.0a-armv7/lib/libcrypto.a \
aecbf2c @ironwolf Normalized platform names in archive names.
ironwolf authored
70 -create -output lib/libcrypto-iphoneos.a
7437903 @st3fan Initial import
st3fan authored
71 lipo \
72 /tmp/openssl-1.0.0a-armv6/lib/libssl.a \
73 /tmp/openssl-1.0.0a-armv7/lib/libssl.a \
aecbf2c @ironwolf Normalized platform names in archive names.
ironwolf authored
74 -create -output lib/libssl-iphoneos.a
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
75
76 lipo \
77 /tmp/openssl-1.0.0a-i386/lib/libcrypto.a \
aecbf2c @ironwolf Normalized platform names in archive names.
ironwolf authored
78 -create -output lib/libcrypto-iphonesimulator.a
4d96132 @ironwolf Now building for SDK 4.3 and into separate archives for device and si…
ironwolf authored
79 lipo \
7437903 @st3fan Initial import
st3fan authored
80 /tmp/openssl-1.0.0a-i386/lib/libssl.a \
aecbf2c @ironwolf Normalized platform names in archive names.
ironwolf authored
81 -create -output lib/libssl-iphonesimulator.a
7437903 @st3fan Initial import
st3fan authored
82
83 #rm -rf /tmp/openssl-1.0.0a-*
84 #rm -rf /tmp/openssl-1.0.0a-*.log
85
Something went wrong with that request. Please try again.