Debian Codegraph @

test/run-on-many-lisps-and-openssls/openssl-releases/build.sh

raw
1 #!/bin/sh
2
3 curdir="$(dirname "$0")"
4 mkdir "${curdir}/bin"
5 cd "${curdir}/bin"
6 bindirabs=`pwd -P` # absolute path to bindir
7
8 cd ../src
9
10 VERSIONS="$1"
11 if [ -z "$VERSIONS" ]
12 then
13 VERSIONS="openssl-0.9.8zh openssl-1.0.0s openssl-1.0.2q openssl-1.1.0j openssl-1.1.1p openssl-3.0.4 libressl-2.2.7 libressl-2.5.5 libressl-2.6.5 libressl-2.8.3 libressl-3.0.1 libressl-3.5.3"
14 fi
15
16 BITNESSES="$2"
17 if [ -z "$BITNESSES" ]
18 then
19 BITNESSES="32 64"
20 fi
21
22 for srcdir in $VERSIONS
23 do
24 cd $srcdir
25 for bits in $BITNESSES
26 do
27 case "${srcdir}" in
28 openssl*)
29 if [ "$bits" = "32" ]
30 then
31 extraflags="-m32 -L-m32"
32 target="linux-generic32"
33 else
34 extraflags=""
35 target="linux-x86_64"
36 fi
37 ./Configure "$extraflags" shared --prefix="${bindirabs}/${srcdir}-${bits}bit" --openssldir="${bindirabs}/${srcdir}-${bits}bit" "$target"
38 make clean
39 ;;
40 libressl*)
41 if [ "$bits" = "32" ]
42 then
43 cflags="-m32"
44 target="i686-linux-gnu"
45 else
46 cflags=""
47 target="x86_64-linux-gnu"
48 fi
49 make distclean || true
50 env CFLAGS="$cflags" ./configure --prefix="${bindirabs}/${srcdir}-${bits}bit" --host="$target"
51 ;;
52 esac
53 make && make install
54 done
55 cd ..
56 done
57
58