1*60a517b6SEd Maste#!/bin/sh -eux 2*60a517b6SEd Maste 3*60a517b6SEd Maste# Copyright (c) 2022 Yubico AB. All rights reserved. 4*60a517b6SEd Maste# Use of this source code is governed by a BSD-style 5*60a517b6SEd Maste# license that can be found in the LICENSE file. 6*60a517b6SEd Maste# SPDX-License-Identifier: BSD-2-Clause 7*60a517b6SEd Maste 8*60a517b6SEd Maste${CC} --version 9*60a517b6SEd MasteSCAN=scan-build${CC#clang} 10*60a517b6SEd MasteFAKEROOT="$(mktemp -d)" 11*60a517b6SEd Maste 12*60a517b6SEd Maste# Check exports. 13*60a517b6SEd Maste(cd src && ./diff_exports.sh) 14*60a517b6SEd Maste 15*60a517b6SEd Maste# Build and install OpenSSL 3.0.12. 16*60a517b6SEd Mastegit clone --branch openssl-3.0.12 \ 17*60a517b6SEd Maste --depth=1 https://github.com/openssl/openssl 18*60a517b6SEd Mastecd openssl 19*60a517b6SEd Maste./Configure linux-x86_64-clang --prefix="${FAKEROOT}" \ 20*60a517b6SEd Maste --openssldir="${FAKEROOT}/openssl" --libdir=lib 21*60a517b6SEd Mastemake install_sw 22*60a517b6SEd Mastecd .. 23*60a517b6SEd Maste 24*60a517b6SEd Maste# Build, analyze, and install libfido2. 25*60a517b6SEd Mastefor T in Debug Release; do 26*60a517b6SEd Maste mkdir build-$T 27*60a517b6SEd Maste export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig" 28*60a517b6SEd Maste (cd build-$T && ${SCAN} --use-cc="${CC}" \ 29*60a517b6SEd Maste cmake -DCMAKE_BUILD_TYPE=$T ..) 30*60a517b6SEd Maste ${SCAN} --use-cc="${CC}" --status-bugs make -C build-$T 31*60a517b6SEd Maste make -C build-$T regress 32*60a517b6SEd Maste sudo make -C build-$T install 33*60a517b6SEd Mastedone 34