github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/router/rootfs/bin/build (about) 1 #!/usr/bin/env bash 2 3 set -eof pipefail 4 5 export NGINX_VERSION=1.9.4 6 export NAXSI_VERSION=0d53a64ed856e694fcb4038748c8cf6d5551a603 7 export NDK_VERSION=0.2.19 8 export VTS_VERSION=22c51e201a550bb94e96239fef541347beb4eeca 9 export SETMISC_VERSION=0.29 10 11 export BUILD_PATH=/tmp/build 12 13 # nginx installation directory 14 export PREFIX=/opt/nginx 15 16 rm -rf "$PREFIX" 17 mkdir "$PREFIX" 18 19 mkdir "$BUILD_PATH" 20 cd "$BUILD_PATH" 21 22 # install required packages to build 23 apk add --update-cache \ 24 build-base \ 25 curl \ 26 geoip-dev \ 27 libcrypto1.0 \ 28 libpcre32 \ 29 patch \ 30 pcre-dev \ 31 openssl-dev \ 32 zlib \ 33 zlib-dev 34 35 # download, verify and extract the source files 36 get_src 479b0c03747ee6b2d4a21046f89b06d178a2881ea80cfef160451325788f2ba8 \ 37 "http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz" 38 39 get_src 128b56873eedbd3f240dc0f88a8b260d791321db92f14ba2fc5c49fc5307e04d \ 40 "https://github.com/nbs-system/naxsi/archive/$NAXSI_VERSION.tar.gz" 41 42 get_src 501f299abdb81b992a980bda182e5de5a4b2b3e275fbf72ee34dd7ae84c4b679 \ 43 "https://github.com/simpl/ngx_devel_kit/archive/v$NDK_VERSION.tar.gz" 44 45 get_src 8d280fc083420afb41dbe10df9a8ceec98f1d391bd2caa42ebae67d5bc9295d8 \ 46 "https://github.com/openresty/set-misc-nginx-module/archive/v$SETMISC_VERSION.tar.gz" 47 48 # replace with a release instead a commit once e06a618e5780b4b94b21cab37d61820dcd3bb585 is contained in one. 49 get_src 47340cf0c711b10a0231fca9264d73ea791ff8420b823b0295ae3df2d968a205 \ 50 "https://github.com/vozlt/nginx-module-vts/archive/$VTS_VERSION.tar.gz" 51 52 # build nginx 53 cd "$BUILD_PATH/nginx-$NGINX_VERSION" 54 55 ./configure \ 56 --prefix="$PREFIX" \ 57 --pid-path=/run/nginx.pid \ 58 --with-debug \ 59 --with-pcre-jit \ 60 --with-ipv6 \ 61 --with-http_ssl_module \ 62 --with-http_stub_status_module \ 63 --with-http_realip_module \ 64 --with-http_auth_request_module \ 65 --with-http_addition_module \ 66 --with-http_dav_module \ 67 --with-http_geoip_module \ 68 --with-http_gzip_static_module \ 69 --with-http_spdy_module \ 70 --with-http_sub_module \ 71 --with-mail \ 72 --with-mail_ssl_module \ 73 --with-stream \ 74 --add-module="$BUILD_PATH/naxsi-$NAXSI_VERSION/naxsi_src" \ 75 --add-module="$BUILD_PATH/ngx_devel_kit-$NDK_VERSION" \ 76 --add-module="$BUILD_PATH/set-misc-nginx-module-$SETMISC_VERSION" \ 77 --add-module="$BUILD_PATH/nginx-module-vts-$VTS_VERSION" \ 78 && make && make install 79 80 rm -rf "$BUILD_PATH" 81 apk del \ 82 build-base \ 83 curl \ 84 geoip-dev \ 85 libcrypto1.0 \ 86 libpcre32 \ 87 patch \ 88 pcre-dev \ 89 openssl-dev \ 90 zlib \ 91 zlib-dev 92 rm -rf /var/cache/apk/*