| 1 |
#!/bin/bash |
| 2 |
set -eo pipefail |
| 3 |
|
| 4 |
./buildconf |
| 5 |
|
| 6 |
if [ "$NGTCP2" = yes ]; then |
| 7 |
cd $HOME |
| 8 |
git clone --depth 1 -b openssl-quic-draft-23 https://github.com/tatsuhiro-t/openssl possl |
| 9 |
cd possl |
| 10 |
./config enable-tls1_3 --prefix=$HOME/ngbuild |
| 11 |
make |
| 12 |
make install_sw |
| 13 |
|
| 14 |
cd $HOME |
| 15 |
git clone --depth 1 https://github.com/ngtcp2/nghttp3 |
| 16 |
cd nghttp3 |
| 17 |
autoreconf -i |
| 18 |
./configure --prefix=$HOME/ngbuild --enable-lib-only |
| 19 |
make |
| 20 |
make install |
| 21 |
|
| 22 |
cd $HOME |
| 23 |
git clone --depth 1 https://github.com/ngtcp2/ngtcp2 |
| 24 |
cd ngtcp2 |
| 25 |
autoreconf -i |
| 26 |
./configure PKG_CONFIG_PATH=$HOME/ngbuild/lib/pkgconfig LDFLAGS="-Wl,-rpath,$HOME/ngbuild/lib" --prefix=$HOME/ngbuild --enable-lib-only |
| 27 |
make |
| 28 |
make install |
| 29 |
fi |
| 30 |
|
| 31 |
if [ "$TRAVIS_OS_NAME" = linux -a "$BORINGSSL" ]; then |
| 32 |
cd $HOME |
| 33 |
git clone --depth=1 https://boringssl.googlesource.com/boringssl |
| 34 |
cd boringssl |
| 35 |
mkdir build |
| 36 |
cd build |
| 37 |
CXX="g++" CC="gcc" cmake -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=1 .. |
| 38 |
make |
| 39 |
cd .. |
| 40 |
mkdir lib |
| 41 |
cd lib |
| 42 |
cp ../build/crypto/libcrypto.so . |
| 43 |
cp ../build/ssl/libssl.so . |
| 44 |
echo "BoringSSL lib dir: "`pwd` |
| 45 |
cd ../build |
| 46 |
make clean |
| 47 |
rm -f CMakeCache.txt |
| 48 |
CXX="g++" CC="gcc" cmake -DCMAKE_POSITION_INDEPENDENT_CODE=on .. |
| 49 |
make |
| 50 |
export LIBS=-lpthread |
| 51 |
fi |
| 52 |
|
| 53 |
if [ "$TRAVIS_OS_NAME" = linux -a "$QUICHE" ]; then |
| 54 |
cd $HOME |
| 55 |
git clone --depth=1 https://github.com/cloudflare/quiche.git |
| 56 |
curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 57 |
source $HOME/.cargo/env |
| 58 |
cd $HOME/quiche |
| 59 |
QUICHE_BSSL_PATH=$HOME/boringssl cargo build -v --release --features pkg-config-meta |
| 60 |
fi |
| 61 |
|
| 62 |
# Install common libraries. |
| 63 |
# The library build directories are set to be cached by .travis.yml. If you are |
| 64 |
# changing a build directory name below (eg a version change) then you must |
| 65 |
# change it in .travis.yml `cache: directories:` as well. |
| 66 |
if [ $TRAVIS_OS_NAME = linux ]; then |
| 67 |
if [ ! -e $HOME/wolfssl-4.0.0-stable/Makefile ]; then |
| 68 |
cd $HOME |
| 69 |
curl -LO https://github.com/wolfSSL/wolfssl/archive/v4.0.0-stable.tar.gz |
| 70 |
tar -xzf v4.0.0-stable.tar.gz |
| 71 |
cd wolfssl-4.0.0-stable |
| 72 |
./autogen.sh |
| 73 |
./configure --enable-tls13 --enable-all |
| 74 |
touch wolfssl/wolfcrypt/fips.h |
| 75 |
make |
| 76 |
fi |
| 77 |
|
| 78 |
cd $HOME/wolfssl-4.0.0-stable |
| 79 |
sudo make install |
| 80 |
|
| 81 |
if [ ! -e $HOME/mesalink-1.0.0/Makefile ]; then |
| 82 |
cd $HOME |
| 83 |
curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 84 |
source $HOME/.cargo/env |
| 85 |
curl -LO https://github.com/mesalock-linux/mesalink/archive/v1.0.0.tar.gz |
| 86 |
tar -xzf v1.0.0.tar.gz |
| 87 |
cd mesalink-1.0.0 |
| 88 |
./autogen.sh |
| 89 |
./configure --enable-tls13 |
| 90 |
make |
| 91 |
fi |
| 92 |
|
| 93 |
cd $HOME/mesalink-1.0.0 |
| 94 |
sudo make install |
| 95 |
|
| 96 |
if [ ! -e $HOME/nghttp2-1.39.2/Makefile ]; then |
| 97 |
cd $HOME |
| 98 |
curl -LO https://github.com/nghttp2/nghttp2/releases/download/v1.39.2/nghttp2-1.39.2.tar.gz |
| 99 |
tar -xzf nghttp2-1.39.2.tar.gz |
| 100 |
cd nghttp2-1.39.2 |
| 101 |
CXX="g++-8" CC="gcc-8" CFLAGS="" LDFLAGS="" LIBS="" ./configure --disable-threads --enable-app |
| 102 |
make |
| 103 |
fi |
| 104 |
|
| 105 |
cd $HOME/nghttp2-1.39.2 |
| 106 |
sudo make install |
| 107 |
fi |