Print this page
Other packages up to gcc51 runtime
| Split |
Close |
| Expand all |
| Collapse all |
--- old/build/openssl/build.sh
+++ new/build/openssl/build.sh
1 1 #!/usr/bin/bash
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License, Version 1.0 only
7 7 # (the "License"). You may not use this file except in compliance
8 8 # with the License.
9 9 #
10 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 11 # or http://www.opensolaris.org/os/licensing.
12 12 # See the License for the specific language governing permissions
13 13 # and limitations under the License.
14 14 #
15 15 # When distributing Covered Code, include this CDDL HEADER in each
16 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 17 # If applicable, add the following below this CDDL HEADER, with the
18 18 # fields enclosed by brackets "[]" replaced with your own identifying
19 19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 20 #
21 21 # CDDL HEADER END
22 22 #
23 23 #
24 24 # Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
|
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
27 27 # Load support functions
28 28 . ../../lib/functions.sh
29 29
30 30 PROG=openssl
31 31 VER=1.0.2c
32 32 VERHUMAN=$VER
33 33 PKG=library/security/openssl # Package name (without prefix)
34 34 SUMMARY="$PROG - A toolkit for Secure Sockets Layer (SSL v2/v3) and Transport Layer (TLS v1) protocols and general purpose cryptographic library"
35 35 DESC="$SUMMARY"
36 36
37 -DEPENDS_IPS="SUNWcs system/library system/library/gcc-4-runtime library/zlib@1.2.8"
37 +DEPENDS_IPS="SUNWcs system/library system/library/gcc-5-runtime library/zlib@1.2.8"
38 38 BUILD_DEPENDS_IPS="$DEPENDS_IPS developer/sunstudio12.1"
39 39
40 40 NO_PARALLEL_MAKE=1
41 41
42 42 make_prog() {
43 43 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
44 44 logmsg "--- make"
45 45 # This will setup the internal runpath of libssl and libcrypto
46 46 logcmd $MAKE $MAKE_JOBS SHARED_LDFLAGS="$SHARED_LDFLAGS" || \
47 47 logerr "--- Make failed"
48 48 logmsg "--- make test"
49 49 logcmd $MAKE test || \
50 50 logerr "--- make test failed"
51 51 }
52 52
53 53 configure32() {
54 54 if [ -n "`isalist | grep sparc`" ]; then
55 55 SSLPLAT=solaris-sparcv8-cc
56 56 else
57 57 SSLPLAT=solaris-x86-gcc
58 58 fi
59 59 logmsg "--- Configure (32-bit) $SSLPLAT"
60 60 logcmd ./Configure $SSLPLAT --pk11-libname=/usr/lib/libpkcs11.so.1 shared threads zlib enable-md2 --prefix=$PREFIX ||
61 61 logerr "Failed to run configure"
62 62 SHARED_LDFLAGS="-shared -Wl,-z,text"
63 63 }
64 64 configure64() {
65 65 if [ -n "`isalist | grep sparc`" ]; then
66 66 SSLPLAT=solaris64-sparcv9-cc
67 67 else
68 68 SSLPLAT=solaris64-x86_64-gcc
69 69 fi
70 70 logmsg "--- Configure (64-bit) $SSLPLAT"
71 71 logcmd ./Configure $SSLPLAT --pk11-libname=/usr/lib/64/libpkcs11.so.1 shared threads zlib enable-md2 \
72 72 --prefix=$PREFIX ||
73 73 logerr "Failed ot run configure"
74 74 SHARED_LDFLAGS="-m64 -shared -Wl,-z,text"
75 75 }
76 76
77 77 make_install() {
78 78 logmsg "--- make install"
79 79 logcmd make INSTALL_PREFIX=$DESTDIR install ||
80 80 logerr "Failed to make install"
81 81 }
82 82
83 83 # Move installed libs from /usr/lib to /lib and make symlinks to match upstream package
84 84 move_libs() {
85 85 logmsg "link up certs"
86 86 logcmd rmdir $DESTDIR/usr/ssl/certs ||
87 87 logerr "Failed to remove /usr/ssl/certs"
88 88 logcmd ln -s /etc/ssl/certs $DESTDIR/usr/ssl/certs ||
89 89 logerr "Failed to link up /usr/ssl/certs -> /etc/ssl/certs"
90 90 logmsg "Relocating libs from usr/lib to lib"
91 91 logcmd mv $DESTDIR/usr/lib/64 $DESTDIR/usr/lib/amd64
92 92 logcmd mkdir -p $DESTDIR/lib/amd64
93 93 logcmd mv $DESTDIR/usr/lib/lib* $DESTDIR/lib/ ||
94 94 logerr "Failed to move libs (32-bit)"
95 95 logcmd mv $DESTDIR/usr/lib/amd64/lib* $DESTDIR/lib/amd64/ ||
96 96 logerr "Failed to move libs (64-bit)"
97 97 logmsg "--- Making usr/lib symlinks"
98 98 pushd $DESTDIR/usr/lib > /dev/null
99 99 logcmd ln -s /lib/libssl.so.1.0.0 libssl.so
100 100 logcmd ln -s /lib/libssl.so.1.0.0 libssl.so.1.0.0
101 101 logcmd ln -s /lib/libcrypto.so.1.0.0 libcrypto.so
102 102 logcmd ln -s /lib/libcrypto.so.1.0.0 libcrypto.so.1.0.0
103 103 popd > /dev/null
104 104 pushd $DESTDIR/usr/lib/amd64 > /dev/null
105 105 logcmd ln -s /lib/amd64/libssl.so.1.0.0 libssl.so
106 106 logcmd ln -s /lib/amd64/libssl.so.1.0.0 libssl.so.1.0.0
107 107 logcmd ln -s /lib/amd64/libcrypto.so.1.0.0 libcrypto.so
108 108 logcmd ln -s /lib/amd64/libcrypto.so.1.0.0 libcrypto.so.1.0.0
109 109 popd > /dev/null
110 110 }
111 111
112 112
113 113 # Turn the letter component of the version into a number for IPS versioning
114 114 ord26() {
115 115 local ASCII=$(printf '%d' "'$1")
116 116 ASCII=$((ASCII - 64))
117 117 [[ $ASCII -gt 32 ]] && ASCII=$((ASCII - 32))
118 118 echo $ASCII
119 119 }
120 120 save_function make_package make_package_orig
121 121 make_package() {
122 122 if [[ -n "`echo $VER | grep [a-z]`" ]]; then
123 123 NUMVER=${VER::$((${#VER} -1))}
124 124 ALPHAVER=${VER:$((${#VER} -1))}
125 125 VER=${NUMVER}.$(ord26 ${ALPHAVER})
126 126 fi
127 127
128 128 make_package_orig
129 129 }
130 130
131 131 init
132 132 download_source $PROG $PROG $VER
133 133 patch_source
134 134 prep_build
135 135 build
136 136 move_libs
137 137 make_lintlibs crypto /lib /usr/include "openssl/!(ssl*|*tls*).h"
138 138 make_lintlibs ssl /lib /usr/include "openssl/{ssl,*tls}*.h"
139 139 make_isa_stub
140 140 make_package
141 141 clean_up
|
↓ open down ↓ |
94 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX