File: build.sh

package info (click to toggle)
acl2 8.6%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 1,111,420 kB
  • sloc: lisp: 17,818,294; java: 125,359; python: 28,122; javascript: 23,458; cpp: 18,851; ansic: 11,569; perl: 7,678; xml: 5,591; sh: 3,976; makefile: 3,833; ruby: 2,633; yacc: 1,126; ml: 763; awk: 295; csh: 233; lex: 197; php: 178; tcl: 49; asm: 23; haskell: 17
file content (58 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

curdir="$(dirname "$0")"
mkdir "${curdir}/bin"
cd "${curdir}/bin"
bindirabs=`pwd -P` # absolute path to bindir

cd ../src

VERSIONS="$1"
if [ -z "$VERSIONS" ]
then
  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"
fi

BITNESSES="$2"
if [ -z "$BITNESSES" ]
then
  BITNESSES="32 64"
fi

for srcdir in $VERSIONS
do
  cd $srcdir
  for bits in $BITNESSES
  do
    case "${srcdir}" in
        openssl*)
            if [ "$bits" = "32" ]
            then
                extraflags="-m32 -L-m32"
                target="linux-generic32"
            else
                extraflags=""
                target="linux-x86_64"
            fi
            ./Configure "$extraflags" shared --prefix="${bindirabs}/${srcdir}-${bits}bit" --openssldir="${bindirabs}/${srcdir}-${bits}bit" "$target"
            make clean
            ;;
        libressl*)
            if [ "$bits" = "32" ]
            then
                cflags="-m32"
                target="i686-linux-gnu"
            else
                cflags=""
                target="x86_64-linux-gnu"
            fi
            make distclean || true
            env CFLAGS="$cflags" ./configure --prefix="${bindirabs}/${srcdir}-${bits}bit" --host="$target"
            ;;
    esac
    make && make install
  done
  cd ..
done