Skip to content

Instantly share code, notes, and snippets.

@skygunner
Forked from Belphemur/build_nginx.sh
Created July 5, 2016 19:13
Show Gist options
  • Save skygunner/7ccf83daa0aa50c49d225ca1aa3a331c to your computer and use it in GitHub Desktop.
Save skygunner/7ccf83daa0aa50c49d225ca1aa3a331c to your computer and use it in GitHub Desktop.

Revisions

  1. @Belphemur Belphemur revised this gist Jun 10, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ export VERSION_NGINX=nginx-$NGINX_VERSION
    export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
    #export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
    #export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/

    # clean out any files from previous runs of this script
    @@ -89,8 +89,8 @@ mkdir -p $BPATH/nginx
    --with-http_auth_request_module \
    --with-http_addition_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module \
    --add-module=$BPATH/rtmp
    --with-http_gzip_static_module
    # --add-module=$BPATH/rtmp
    #--add-module=$BPATH/ngx_pagespeed-${NPS_VERSION}-beta

    touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
  2. @Belphemur Belphemur revised this gist Jun 10, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.10.1
    export NGINX_VERSION=1.11.1
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.4.0
    export VERSION_LIBRESSL=libressl-2.4.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  3. @Belphemur Belphemur revised this gist Jun 5, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.10.0
    export NGINX_VERSION=1.10.1
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.4
    export VERSION_LIBRESSL=libressl-2.4.0
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  4. @Belphemur Belphemur revised this gist May 3, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.14
    export NGINX_VERSION=1.10.0
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.3
    export VERSION_LIBRESSL=libressl-2.3.4
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
    export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
  5. @Belphemur Belphemur revised this gist Apr 15, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.12
    export NGINX_VERSION=1.9.14
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.2
    export VERSION_LIBRESSL=libressl-2.3.3
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  6. @Belphemur Belphemur revised this gist Mar 1, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.10
    export NGINX_VERSION=1.9.12
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_LIBRESSL=libressl-2.3.2
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  7. @Belphemur Belphemur revised this gist Jan 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.9
    export NGINX_VERSION=1.9.10
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
  8. @Belphemur Belphemur revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # names of latest versions of each package
    export NGINX_VERSION=1.9.9
    export VERSION_PCRE=pcre-8.37
    export VERSION_PCRE=pcre-8.38
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    #export NPS_VERSION=1.9.32.10
  9. @Belphemur Belphemur revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.6
    export NGINX_VERSION=1.9.9
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
  10. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -40,8 +40,8 @@ cd build
    tar xzf $VERSION_NGINX.tar.gz
    tar xzf $VERSION_LIBRESSL.tar.gz
    tar xzf $VERSION_PCRE.tar.gz
    tar xzf $VERSION_PAGESPEED.tar.gz
    tar xzf ${NPS_VERSION}.tar.gz -C ngx_pagespeed-${NPS_VERSION}-beta
    #tar xzf $VERSION_PAGESPEED.tar.gz
    #tar xzf ${NPS_VERSION}.tar.gz -C ngx_pagespeed-${NPS_VERSION}-beta
    cd ../
    # set where LibreSSL and nginx will be built
    export BPATH=$(pwd)/build
  11. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -3,17 +3,17 @@
    # names of latest versions of each package
    export NGINX_VERSION=1.9.6
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.2.4
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.10
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta
    #export NPS_VERSION=1.9.32.10
    #export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
    export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
    export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/
    #export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/

    # clean out any files from previous runs of this script
    rm -rf build
    @@ -30,8 +30,8 @@ echo "Download sources"
    wget -P ./build $SOURCE_PCRE$VERSION_PCRE.tar.gz
    wget -P ./build $SOURCE_LIBRESSL$VERSION_LIBRESSL.tar.gz
    wget -P ./build $SOURCE_NGINX$VERSION_NGINX.tar.gz
    wget -P ./build $SOURCE_PAGESPEED$VERSION_PAGESPEED.tar.gz
    wget -P ./build https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
    #wget -P ./build $SOURCE_PAGESPEED$VERSION_PAGESPEED.tar.gz
    #wget -P ./build https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
    git clone $SOURCE_RTMP ./build/rtmp

    # expand the source files
    @@ -90,8 +90,8 @@ mkdir -p $BPATH/nginx
    --with-http_addition_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module \
    --add-module=$BPATH/rtmp \
    --add-module=$BPATH/ngx_pagespeed-${NPS_VERSION}-beta
    --add-module=$BPATH/rtmp
    #--add-module=$BPATH/ngx_pagespeed-${NPS_VERSION}-beta

    touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
    make -j $NB_PROC && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
  12. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,9 @@ export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/
    # clean out any files from previous runs of this script
    rm -rf build
    mkdir build

    # proc for building faster
    NB_PROC=$(grep -c ^processor /proc/cpuinfo)

    # ensure that we have the required software to compile our own nginx
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall git
    @@ -47,7 +50,7 @@ export STATICLIBSSL=$BPATH/$VERSION_LIBRESSL
    # build static LibreSSL
    echo "Configure & Build LibreSSL"
    cd $STATICLIBSSL
    ./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/ && make install-strip
    ./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/ && make install-strip -j $NB_PROC

    # build nginx, with various modules included/excluded
    echo "Configure & Build Nginx"
    @@ -91,7 +94,7 @@ mkdir -p $BPATH/nginx
    --add-module=$BPATH/ngx_pagespeed-${NPS_VERSION}-beta

    touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
    make && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
    make -j $NB_PROC && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
    --provides="nginx" --requires="libc6, libpcre3, zlib1g" --strip=yes \
    --stripso=yes --backup=yes -y --install=yes

  13. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # names of latest versions of each package
    export NGINX_VERSION=1.9.6
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_LIBRESSL=libressl-2.2.4
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.10
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  14. @Belphemur Belphemur revised this gist Nov 10, 2015. No changes.
  15. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,7 @@ mkdir -p $BPATH/nginx
    --http-log-path=/var/log/nginx/access.log \
    --with-pcre=$BPATH/$VERSION_PCRE \
    --with-http_ssl_module \
    --with-http_spdy_module \
    --with-http_v2_module \
    --with-file-aio \
    --with-ipv6 \
    --with-http_gzip_static_module \
  16. @Belphemur Belphemur revised this gist Nov 10, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.4
    export NGINX_VERSION=1.9.6
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.2.3
    export VERSION_LIBRESSL=libressl-2.3.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.6
    export NPS_VERSION=1.9.32.10
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
  17. @Belphemur Belphemur revised this gist Sep 4, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.3
    export NGINX_VERSION=1.9.4
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.2.1
    export VERSION_LIBRESSL=libressl-2.2.3
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.4
    export NPS_VERSION=1.9.32.6
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
  18. @Belphemur Belphemur revised this gist Jul 19, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ export NGINX_VERSION=1.9.3
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.2.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
    export NPS_VERSION=1.9.32.4
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
  19. @Belphemur Belphemur revised this gist Jul 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.2
    export NGINX_VERSION=1.9.3
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.2.0
    export VERSION_LIBRESSL=libressl-2.2.1
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  20. @Belphemur Belphemur revised this gist Jun 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.9.1
    export NGINX_VERSION=1.9.2
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.1.6
    export VERSION_LIBRESSL=libressl-2.2.0
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta
  21. @Belphemur Belphemur revised this gist Jun 11, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.8.0
    export VERSION_PCRE=pcre-8.36
    export NGINX_VERSION=1.9.1
    export VERSION_PCRE=pcre-8.37
    export VERSION_LIBRESSL=libressl-2.1.6
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
  22. @Belphemur Belphemur revised this gist Apr 22, 2015. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,27 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.7.10
    export NGINX_VERSION=1.8.0
    export VERSION_PCRE=pcre-8.36
    export VERSION_LIBRESSL=libressl-2.1.3
    export VERSION_LIBRESSL=libressl-2.1.6
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
    export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
    export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/

    # clean out any files from previous runs of this script
    rm -rf build
    mkdir build

    # ensure that we have the required software to compile our own nginx
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall git

    # grab the source files
    echo "Download sources"
    wget -P ./build $SOURCE_PCRE$VERSION_PCRE.tar.gz
    @@ -30,7 +30,7 @@ wget -P ./build $SOURCE_NGINX$VERSION_NGINX.tar.gz
    wget -P ./build $SOURCE_PAGESPEED$VERSION_PAGESPEED.tar.gz
    wget -P ./build https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
    git clone $SOURCE_RTMP ./build/rtmp

    # expand the source files
    echo "Extract Packages"
    cd build
    @@ -43,12 +43,12 @@ cd ../
    # set where LibreSSL and nginx will be built
    export BPATH=$(pwd)/build
    export STATICLIBSSL=$BPATH/$VERSION_LIBRESSL

    # build static LibreSSL
    echo "Configure & Build LibreSSL"
    cd $STATICLIBSSL
    ./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/ && make install-strip

    # build nginx, with various modules included/excluded
    echo "Configure & Build Nginx"
    cd $BPATH/$VERSION_NGINX
    @@ -94,7 +94,7 @@ touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
    make && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
    --provides="nginx" --requires="libc6, libpcre3, zlib1g" --strip=yes \
    --stripso=yes --backup=yes -y --install=yes

    echo "All done.";
    echo "This build has not edited your existing /etc/nginx directory.";
    echo "If things aren't working now you may need to refer to the";
  23. @Belphemur Belphemur revised this gist Mar 19, 2015. 1 changed file with 11 additions and 3 deletions.
    14 changes: 11 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -5,12 +5,15 @@ export NGINX_VERSION=1.7.10
    export VERSION_PCRE=pcre-8.36
    export VERSION_LIBRESSL=libressl-2.1.3
    export VERSION_NGINX=nginx-$NGINX_VERSION
    export NPS_VERSION=1.9.32.3
    export VERSION_PAGESPEED=v${NPS_VERSION}-beta

    # URLs to the source directories
    export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git
    export SOURCE_PAGESPEED=https://github.com/pagespeed/ngx_pagespeed/archive/

    # clean out any files from previous runs of this script
    rm -rf build
    @@ -24,15 +27,19 @@ echo "Download sources"
    wget -P ./build $SOURCE_PCRE$VERSION_PCRE.tar.gz
    wget -P ./build $SOURCE_LIBRESSL$VERSION_LIBRESSL.tar.gz
    wget -P ./build $SOURCE_NGINX$VERSION_NGINX.tar.gz
    wget -P ./build $SOURCE_PAGESPEED$VERSION_PAGESPEED.tar.gz
    wget -P ./build https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
    git clone $SOURCE_RTMP ./build/rtmp

    # expand the source files
    echo "Extract Packages"
    cd build
    tar xzf $VERSION_NGINX.tar.gz
    tar xzf $VERSION_LIBRESSL.tar.gz
    tar xzf $VERSION_PCRE.tar.gz
    tar xzf $VERSION_PAGESPEED.tar.gz
    tar xzf ${NPS_VERSION}.tar.gz -C ngx_pagespeed-${NPS_VERSION}-beta
    cd ../

    # set where LibreSSL and nginx will be built
    export BPATH=$(pwd)/build
    export STATICLIBSSL=$BPATH/$VERSION_LIBRESSL
    @@ -80,8 +87,9 @@ mkdir -p $BPATH/nginx
    --with-http_addition_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module \
    --add-module=$BPATH/rtmp

    --add-module=$BPATH/rtmp \
    --add-module=$BPATH/ngx_pagespeed-${NPS_VERSION}-beta

    touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
    make && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
    --provides="nginx" --requires="libc6, libpcre3, zlib1g" --strip=yes \
  24. @Belphemur Belphemur revised this gist Mar 16, 2015. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -10,20 +10,21 @@ export VERSION_NGINX=nginx-$NGINX_VERSION
    export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
    export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
    export SOURCE_NGINX=http://nginx.org/download/
    #export NGINX_PATH=https://raw.githubusercontent.com/technion/libressl_nginx/master/nginx-libressl2.patch
    export SOURCE_RTMP=https://github.com/arut/nginx-rtmp-module.git

    # clean out any files from previous runs of this script
    rm -rf build
    mkdir build

    # ensure that we have the required software to compile our own nginx
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall git

    # grab the source files
    echo "Download sources"
    wget -P ./build $SOURCE_PCRE$VERSION_PCRE.tar.gz
    wget -P ./build $SOURCE_LIBRESSL$VERSION_LIBRESSL.tar.gz
    wget -P ./build $SOURCE_NGINX$VERSION_NGINX.tar.gz
    git clone $SOURCE_RTMP ./build/rtmp

    # expand the source files
    cd build
    @@ -78,7 +79,8 @@ mkdir -p $BPATH/nginx
    --with-http_auth_request_module \
    --with-http_addition_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module
    --with-http_gzip_static_module \
    --add-module=$BPATH/rtmp

    touch $STATICLIBSSL/.openssl/include/openssl/ssl.h
    make && sudo checkinstall --pkgname="nginx-libressl" --pkgversion="$NGINX_VERSION" \
  25. @Belphemur Belphemur revised this gist Mar 11, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ rm -rf build
    mkdir build

    # ensure that we have the required software to compile our own nginx
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev
    sudo apt-get -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall

    # grab the source files
    echo "Download sources"
  26. @Belphemur Belphemur revised this gist Mar 3, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -39,8 +39,6 @@ export STATICLIBSSL=$BPATH/$VERSION_LIBRESSL
    # build static LibreSSL
    echo "Configure & Build LibreSSL"
    cd $STATICLIBSSL
    echo -e "#! /bin/bash \n./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/" > config
    chmod +x config
    ./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/ && make install-strip

    # build nginx, with various modules included/excluded
  27. @Belphemur Belphemur revised this gist Mar 2, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@ echo "Configure & Build LibreSSL"
    cd $STATICLIBSSL
    echo -e "#! /bin/bash \n./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/" > config
    chmod +x config
    ./configure && make install-strip
    ./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/ && make install-strip

    # build nginx, with various modules included/excluded
    echo "Configure & Build Nginx"
  28. @Belphemur Belphemur revised this gist Mar 2, 2015. 1 changed file with 2 additions and 13 deletions.
    15 changes: 2 additions & 13 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -39,20 +39,9 @@ export STATICLIBSSL=$BPATH/$VERSION_LIBRESSL
    # build static LibreSSL
    echo "Configure & Build LibreSSL"
    cd $STATICLIBSSL
    echo -e "#! /bin/bash \n./configure LDFLAGS=-lrt" > config
    echo -e "#! /bin/bash \n./configure LDFLAGS=-lrt --prefix=${STATICLIBSSL}/.openssl/" > config
    chmod +x config
    ./configure && make check
    if [ -d ".openssl" ]; then
    rm -Rf .openssl
    fi

    mkdir -p .openssl/lib

    cp crypto/.libs/libcrypto.a ssl/.libs/libssl.a .openssl/lib
    cd .openssl && ln -s ../include ./

    # you might want to strip debugging-symbols
    cd .openssl/lib && strip -g libssl.a && strip -g libcrypto.a
    ./configure && make install-strip

    # build nginx, with various modules included/excluded
    echo "Configure & Build Nginx"
  29. @Belphemur Belphemur revised this gist Mar 2, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.7.9
    export NGINX_VERSION=1.7.10
    export VERSION_PCRE=pcre-8.36
    export VERSION_LIBRESSL=libressl-2.1.2
    export VERSION_LIBRESSL=libressl-2.1.3
    export VERSION_NGINX=nginx-$NGINX_VERSION

    # URLs to the source directories
  30. @Belphemur Belphemur revised this gist Jan 21, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build_nginx.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #!/usr/bin/env bash

    # names of latest versions of each package
    export NGINX_VERSION=1.7.7
    export NGINX_VERSION=1.7.9
    export VERSION_PCRE=pcre-8.36
    export VERSION_LIBRESSL=libressl-2.1.1
    export VERSION_LIBRESSL=libressl-2.1.2
    export VERSION_NGINX=nginx-$NGINX_VERSION

    # URLs to the source directories