Skip to content

Instantly share code, notes, and snippets.

@shin1x1
Created February 23, 2018 16:13
Show Gist options
  • Save shin1x1/6718b8c708c9b921b32e33084d52a75c to your computer and use it in GitHub Desktop.
Save shin1x1/6718b8c708c9b921b32e33084d52a75c to your computer and use it in GitHub Desktop.

Revisions

  1. shin1x1 created this gist Feb 23, 2018.
    29 changes: 29 additions & 0 deletions build_curl.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    #!/bin/sh
    set -eux

    VERSION=7.58.0
    OUTPUT=/opt/build

    rm -rf ${OUTPUT}
    mkdir ${OUTPUT}

    yum install -y openssl-devel gcc bzip2 make

    curl -O https://curl.haxx.se/download/curl-${VERSION}.tar.bz2
    tar xvf curl-${VERSION}.tar.bz2
    cd curl-${VERSION}
    ./configure --prefix=${OUTPUT} \
    --with-ssl \
    --enable-libcurl-option \
    --enable-static=no \
    --disable-manual
    make
    make install-strip

    cd ../
    rm -rf curl-${VERSION}*
    rm -rf ${OUTPUT}/bin/curl-config
    rm -rf ${OUTPUT}/include
    rm ${OUTPUT}/lib/libcurl.la
    rm -rf ${OUTPUT}/lib/pkgconfig
    rm -rf ${OUTPUT}/share