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 MasteFAKEROOT="$(mktemp -d)" 10*60a517b6SEd Maste 11*60a517b6SEd Maste# Build and install OpenSSL 3.0.12. 12*60a517b6SEd Mastegit clone --branch openssl-3.0.12 \ 13*60a517b6SEd Maste --depth=1 https://github.com/openssl/openssl 14*60a517b6SEd Mastecd openssl 15*60a517b6SEd Maste./Configure linux-x86_64 --prefix="${FAKEROOT}" \ 16*60a517b6SEd Maste --openssldir="${FAKEROOT}/openssl" --libdir=lib 17*60a517b6SEd Mastemake install_sw 18*60a517b6SEd Mastecd .. 19*60a517b6SEd Maste 20*60a517b6SEd Maste# Build and install libfido2. 21*60a517b6SEd Mastefor T in Debug Release; do 22*60a517b6SEd Maste mkdir build-$T 23*60a517b6SEd Maste export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig" 24*60a517b6SEd Maste (cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..) 25*60a517b6SEd Maste make -j"$(nproc)" -C build-$T 26*60a517b6SEd Maste make -C build-$T regress 27*60a517b6SEd Maste sudo make -C build-$T install 28*60a517b6SEd Mastedone 29