source: scripts/blfs-scripts/blfs-openssl.sh@ b7c9d93

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b7c9d93 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 3.8 KB
Line 
1#!/bin/bash
2
3### OPENSSL ###
4# deps
5# zlib
6# krb5 (optional)
7# TODO: for krb5 support some hackery is required
8
9cd ${SRC}
10LOG=openssl-blfs.log
11SELF=`basename ${0}`
12set_buildenv
13set_libdirname
14setup_multiarch
15
16unpack_tarball openssl-${OPENSSL_VER} &&
17cd ${PKGDIR}
18
19# patching...
20# TODO: check 0.9.7e to see which patches apply
21case ${OPENSSL_VER} in
22 0.9.7d )
23 # Adds a Configure target for linux-x86_64-32
24 apply_patch openssl-0.9.7d-32bit_x86_64
25 # Adds a make option ( LIBDIR ) for setting ${libdirname}
26 apply_patch openssl-0.9.7d-allow_lib64
27 # Fix for brokenness in kssl.h
28 # ( applies to 0.9.7f. For mit krb5 1.3.5, test for 1.4 )
29 apply_patch openssl-0.9.7d-mit_krb5
30 ;;
31 0.9.7f )
32 # Adds a Configure target for linux-x86_64-32
33 apply_patch openssl-0.9.7f-32bit_x86_64
34 # Adds a make option ( LIBDIR ) for setting ${libdirname}
35 apply_patch openssl-0.9.7f-allow_lib64
36 # Fix for brokenness in kssl.h
37 # ( applies to 0.9.7f. For mit krb5 1.3.5, test for 1.4 )
38 apply_patch openssl-0.9.7d-mit_krb5
39 ;;
40 0.9.7g )
41 # Adds a Configure target for linux-x86_64-32
42 apply_patch openssl-0.9.7f-32bit_x86_64
43 # Adds a make option ( LIBDIR ) for setting ${libdirname}
44 apply_patch openssl-0.9.7f-allow_lib64
45 ;;
46esac
47
48# TODO: *** MORE WILL NEED TO GO HERE ###
49# Only known to work with x86_64 so far... further edits to Configure
50# may be required to hardcode ARCH_CFLAGS in (depending on arch)
51CONFIG="config"
52if [ "Y" = "${MULTIARCH}" ]; then
53 case ${BUILDENV} in
54 64 )
55 # set arch specific 64 bit compilation flags
56 case ${TGT_ARCH} in
57 x86_64 )
58 CONFIG_TARGET="linux-x86_64"
59 CONFIG="Configure"
60 ;;
61 sparc* )
62 CONFIG_TARGET="linux64-sparcv9"
63 CONFIG="Configure"
64 ;;
65 powerpc* | ppc* )
66 ;;
67 s390* )
68 CONFIG_TARGET="linux-s390x"
69 CONFIG="Configure"
70 ;;
71 esac
72 ;;
73 32 )
74 case ${TGT_ARCH} in
75 x86_64 | x86-64 )
76 CONFIG_TARGET="linux-x86_64-32"
77 CONFIG="Configure"
78 ;;
79 sparc* )
80 # ultrasparc specific here ...
81 CONFIG_TARGET="linux-sparcv9"
82 CONFIG="Configure"
83 ;;
84 powerpc* | ppc* )
85 ;;
86 esac
87 ;;
88 31 )
89 case ${TGT_ARCH} in
90 s390* )
91 CONFIG_TARGET="linux-s390"
92 CONFIG="Configure"
93 ;;
94 esac
95 ;;
96 esac
97fi
98
99# Dont clobber existing docs
100sed 's/^passwd/openssl-passwd/' doc/apps/passwd.pod \
101 > doc/apps/openssl-passwd.pod &&
102rm doc/apps/passwd.pod &&
103mv doc/crypto/{,openssl_}threads.pod &&
104
105#TODO: use -mtune or -march?
106# also need to cater for non-x86
107sed -i -e 's/-m486/-mtune=i486/' \
108 -e 's/-mcpu=/-mtune=/' Configure
109
110# HACK: hack Configure to find krb libraries under ${libdirname}...
111#if [ ! "${libdirname}" = "lib" ]; then
112# sed -i -e "s@/lib\( \|\"\)@/${libdirname}\1@g" Configure
113#fi
114
115max_log_init OpenSSL ${OPENSSL_VER} "native (shared)" ${CONFLOGS} ${LOG}
116./${CONFIG} ${CONFIG_TARGET} \
117 --prefix=/usr \
118 --openssldir=/etc/ssl \
119 --with-krb5-dir=/usr \
120 --with-krb5-flavor=MIT \
121 threads zlib-dynamic shared \
122 >> ${LOGFILE} 2>&1 &&
123echo " o Configure OK" &&
124
125min_log_init ${BUILDLOGS} &&
126make ${PMFLAGS} LIBDIR=${libdirname} MANPATH=/usr/share/man \
127 >> ${LOGFILE} 2>&1 &&
128echo " o Build OK" &&
129
130min_log_init ${TESTLOGS} &&
131make LIBDIR=${libdirname} test \
132 >> ${LOGFILE} 2>&1 &&
133echo " o Test OK" &&
134
135min_log_init ${INSTLOGS} &&
136make MANDIR=/usr/share/man LIBDIR=${libdirname} install \
137 >> ${LOGFILE} 2>&1 &&
138echo " o ALL OK" || barf
139
Note: See TracBrowser for help on using the repository browser.