Update Builder.sh

This commit is contained in:
ƬHE ЯAW ☣
2022-12-28 04:25:26 +01:00
committed by GitHub
parent 181e9de521
commit e26d19b5c5
+12 -12
View File
@@ -1,13 +1,14 @@
#!/bin/bash #!/bin/bash
curl -s https://raw.githubusercontent.com/theraw/The-World-Is-Yours/theraw-broken-lua/version > /tmp/version; source /tmp/version curl -s https://raw.githubusercontent.com/theraw/The-World-Is-Yours/theraw-broken-lua/version > /tmp/version; source /tmp/version
sudo apt-get install libpcre2-dev mercurial -y sudo apt-get install libpcre2-dev mercurial -y; mkdir -p /opt/mod; mkdir -p /opt/nginx
cd /opt/mod/; wget https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v${NGX_DEVEL_KIT}.tar.gz cd /opt/mod/; wget https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v${NGX_DEVEL_KIT}.tar.gz
cd /opt/mod/; tar xf v${NGX_DEVEL_KIT}.tar.gz; rm -Rf v${NGX_DEVEL_KIT}.tar.gz cd /opt/mod/; tar xf v${NGX_DEVEL_KIT}.tar.gz; rm -Rf v${NGX_DEVEL_KIT}.tar.gz
cd /opt/mod/; wget https://github.com/apache/incubator-pagespeed-ngx/archive/refs/tags/v${NGX_PAGESPEED}-stable.tar.gz cd /opt/mod/; wget https://github.com/apache/incubator-pagespeed-ngx/archive/refs/tags/v${NGX_PAGESPEED}-stable.tar.gz
cd /opt/mod/; tar xf v${NGX_PAGESPEED}-stable.tar.gz; rm -Rf v${NGX_PAGESPEED}-stable.tar.gz cd /opt/mod/; tar xf v${NGX_PAGESPEED}-stable.tar.gz; rm -Rf v${NGX_PAGESPEED}-stable.tar.gz
cd /opt/mod/incubator-pagespeed-ngx-${NGX_PAGESPEED}-stable; wget https://dl.google.com/dl/page-speed/psol/${NGX_PAGESPEED_PSOL}.tar.gz; tar xf ${NGX_PAGESPEED_PSOL}.tar.gz; rm -Rf tar xf ${NGX_PAGESPEED_PSOL}.tar.gz
cd /opt/mod/; wget https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/${NGX_GEOIP2}.tar.gz cd /opt/mod/; wget https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/${NGX_GEOIP2}.tar.gz
cd /opt/mod/; tar xf ${NGX_GEOIP2}.tar.gz; rm -Rf ${NGX_GEOIP2}.tar.gz cd /opt/mod/; tar xf ${NGX_GEOIP2}.tar.gz; rm -Rf ${NGX_GEOIP2}.tar.gz
@@ -31,7 +32,7 @@ cd /opt/mod/; git clone https://github.com/kyprizel/testcookie-nginx-module.git
cd /opt/mod/; git clone https://github.com/google/ngx_brotli.git ngx_brotli; cd /opt/mod/ngx_brotli && git submodule update --init cd /opt/mod/; git clone https://github.com/google/ngx_brotli.git ngx_brotli; cd /opt/mod/ngx_brotli && git submodule update --init
cd /opt/mod/; git clone --recurse-submodules https://github.com/wargio/naxsi.git naxsi cd /opt/mod/; git clone --recurse-submodules https://github.com/wargio/naxsi.git naxsi
cd /opt/mod/pagespeed; wget https://dl.google.com/dl/page-speed/psol/1.13.35.2-x64.tar.gz; tar -xzvf 1.13.35.2-x64.tar.gz; rm -Rf 1.13.35.2-x64.tar.gz
rm -Rf /opt/nginx-${NGINX}.tar.gz; cd /opt/; wget https://nginx.org/download/nginx-${NGINX}.tar.gz; tar xf nginx-${NGINX}.tar.gz; rm -Rf nginx-${NGINX}.tar.gz rm -Rf /opt/nginx-${NGINX}.tar.gz; cd /opt/; wget https://nginx.org/download/nginx-${NGINX}.tar.gz; tar xf nginx-${NGINX}.tar.gz; rm -Rf nginx-${NGINX}.tar.gz
cd /opt/nginx-${NGINX} && curl -s https://raw.githubusercontent.com/hakasenyang/openssl-patch/master/nginx_hpack_push_1.15.3.patch > hpack_push.patch && patch -p1 < hpack_push.patch cd /opt/nginx-${NGINX} && curl -s https://raw.githubusercontent.com/hakasenyang/openssl-patch/master/nginx_hpack_push_1.15.3.patch > hpack_push.patch && patch -p1 < hpack_push.patch
@@ -74,16 +75,15 @@ LUAJIT_LIB="/usr/local/LuaJIT/lib" LUAJIT_INC="/usr/local/LuaJIT/include/luajit-
--with-http_v2_hpack_enc \ --with-http_v2_hpack_enc \
--with-cc-opt="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC" \ --with-cc-opt="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC" \
--with-ld-opt="-Wl,-rpath,/usr/local/LuaJIT/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -lpcre" \ --with-ld-opt="-Wl,-rpath,/usr/local/LuaJIT/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -lpcre" \
--add-dynamic-module=/opt/mod/ngx_devel_kit \ --add-dynamic-module=/opt/mod/ngx_devel_kit-0.3.2 \
--add-dynamic-module=/opt/mod/misc \ --add-dynamic-module=/opt/mod/ModSecurity-nginx-1.0.3 \
--add-dynamic-module=/opt/mod/naxsi/naxsi_src \ --add-dynamic-module=/opt/mod/headers-more-nginx-module-0.34 \
--add-dynamic-module=/opt/mod/incubator-pagespeed-ngx-1.13.35.2-stable \
--add-dynamic-module=/opt/mod/lua-nginx-module-0.10.22 \
--add-dynamic-module=/opt/mod/naxsi \
--add-dynamic-module=/opt/mod/nginx-http-flv-module-1.2.10 \
--add-dynamic-module=/opt/mod/ngx_brotli \ --add-dynamic-module=/opt/mod/ngx_brotli \
--add-dynamic-module=/opt/mod/pagespeed \ --add-dynamic-module=/opt/mod/ngx_http_geoip2_module-3.4 \
--add-dynamic-module=/opt/mod/geoip2 \ --add-dynamic-module=/opt/mod/set-misc-nginx-module-0.33 \
--add-dynamic-module=/opt/mod/ModSecurity-nginx \
--add-dynamic-module=/opt/mod/flv_mod \
--add-dynamic-module=/opt/mod/headers_more \
--add-dynamic-module=/opt/mod/njs/nginx \
--add-dynamic-module=/opt/mod/lua \
--add-dynamic-module=/opt/mod/testcookie --add-dynamic-module=/opt/mod/testcookie
make -j`nproc` modules make -j`nproc` modules