forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openssl.sh
66 lines (58 loc) · 1.51 KB
/
openssl.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package: OpenSSL
version: v0.9.8zf
tag: "v0.9.8_1.2.4"
source: https://github.com/alisw/alice-openssl.git
prefer_system: (?!slc5|slc6)
prefer_system_check: |
if [ `uname` == Darwin ]; then test -d `brew --prefix openssl || echo /dev/nope` || exit 1; echo '#include <openssl/bio.h>' | c++ -x c++ - -I`brew --prefix openssl`/include -c -o /dev/null || exit 1; else exit 0; fi
build_requires:
- zlib
- "GCC-Toolchain:(?!osx)"
---
#!/bin/bash -e
case $ARCHITECTURE in
osx*)
cat << \EOF
MacOSX builds require system installation of OpenSSL.
Please install it using homebrew:
brew install openssl
or a similar system.
EOF
exit 1
;;
esac
rsync -av --delete --exclude="**/.git" $SOURCEDIR/ .
pushd openssl-fips
./config --openssldir=$INSTALLROOT/fips \
fipscanisterbuild \
no-asm
# Does not build in multicore!
make
make install
popd
pushd openssl
./config --openssldir="$INSTALLROOT" \
--with-fipslibdir="$INSTALLROOT/fips/lib" \
fips \
zlib \
no-idea \
no-mdc2 \
no-rc5 \
no-ec \
no-ecdh \
no-ecdsa \
no-asm \
no-krb5 \
shared \
-fno-strict-aliasing \
-L"${INSTALLROOT}/lib" \
-Wa,--noexecstack \
-DOPENSSL_USE_NEW_FUNCTIONS
# Does not build in multicore!
make
make install
popd
rm -rf $INSTALLROOT/pkgconfig \
$INSTALLROOT/fips/pkgconfig \
$INSTALLROOT/lib/*.a \
$INSTALLROOT/fips/lib/*.a