mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 16:34:33 +00:00
28 lines
689 B
Bash
Executable File
28 lines
689 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -x
|
|
|
|
TMPDIR=${TMPDIR:-/tmp}
|
|
|
|
if [ -z "$SKIP_APT" ]; then
|
|
apt-get update
|
|
apt-get -y install build-essential pkg-config clang cmake openssl libssl-dev libssh2-1-dev libcurl4-gnutls-dev openssh-server
|
|
fi
|
|
|
|
mkdir -p /var/run/sshd
|
|
|
|
if [ "$MBEDTLS" ]; then
|
|
MBEDTLS_DIR=${MBEDTLS_DIR:-$(mktemp -d ${TMPDIR}/mbedtls.XXXXXXXX)}
|
|
|
|
git clone --depth 10 --single-branch --branch mbedtls-2.6.1 https://github.com/ARMmbed/mbedtls.git ${MBEDTLS_DIR}
|
|
cd ${MBEDTLS_DIR}
|
|
|
|
CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON .
|
|
cmake --build .
|
|
|
|
if [ -z "$SKIP_MBEDTLS_INSTALL" ]; then
|
|
make install
|
|
fi
|
|
fi
|