Home | History | Annotate | Download | only in third_party
      1 #!/bin/bash
      2 # Copyright 2016 The Weave Authors. All rights reserved.
      3 # Use of this source code is governed by a BSD-style license that can be
      4 # found in the LICENSE file.
      5 
      6 # Make libevhtp.
      7 # Example uses libevhtp to implement HTTPS server. This step could be
      8 # replaced with apt-get in future (Debian jessie, Ubuntu vivid).
      9 cd $(dirname "$0")
     10 THIRD_PARTY=$(pwd)
     11 
     12 LIBEVHTP_VERSION=1.2.11n
     13 
     14 mkdir -p include lib
     15 
     16 rm -rf $THIRD_PARTY/libevhtp
     17 curl -L https://github.com/ellzey/libevhtp/archive/$LIBEVHTP_VERSION.tar.gz | tar xz || exit 1
     18 mv libevhtp-$LIBEVHTP_VERSION $THIRD_PARTY/libevhtp || exit 1
     19 cd $THIRD_PARTY/libevhtp || exit 1
     20 
     21 cmake -D EVHTP_DISABLE_REGEX:BOOL=ON . || exit 1
     22 make evhtp || exit 1
     23 
     24 cp -rf *.h $THIRD_PARTY/include/ || exit 1
     25 cp -f libevhtp.a $THIRD_PARTY/lib/ || exit 1
     26 
     27 rm -rf $THIRD_PARTY/libevhtp
     28