Add zstd module
This commit is contained in:
1 parent
2fd6e73a82
commit
e7c1a00aa8
1 file changed
+16
-1
+16
-1
@@ -8,6 +8,7 @@ V_PCRE="10.46"
|
||||
V_QSSL="3.5.4"
|
||||
V_MAXM="1.12.2"
|
||||
V_HEAD="0.38"
|
||||
USE_ZSTD=true
|
||||
BUILDROOT="/home/iamdoubz/Gits/freenginx-custom"
|
||||
####################################
|
||||
#### END change these variables ####
|
||||
@@ -67,6 +68,10 @@ check_dir()
|
||||
echo " "
|
||||
echo "Brotli Downloading..."
|
||||
git clone --quiet --recurse-submodules -j8 https://github.com/google/ngx_brotli ngx-brotli
|
||||
elif [ $what = "zstd" ]; then
|
||||
echo " "
|
||||
echo "Zstd Downloading..."
|
||||
git clone --quiet https://github.com/HanadaLee/ngx_http_zstd_module.git ngx-zstd
|
||||
elif [ $what = "geoip2" ]; then
|
||||
echo " "
|
||||
echo "GeoIP2 Downloading..."
|
||||
@@ -139,6 +144,16 @@ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast
|
||||
-DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. &>/dev/null
|
||||
cmake --build . --config Release --target brotlienc &>/dev/null
|
||||
|
||||
# zstd
|
||||
if [ $USE_ZSTD ] ; then
|
||||
CURRENTDIR="$BUILDROOT"
|
||||
cd "$CURRENTDIR"
|
||||
CURRENTDIR="$BUILDROOT/ngx-zstd"
|
||||
check_dir $CURRENTDIR zstd
|
||||
cd "$CURRENTDIR"
|
||||
git pull --quiet
|
||||
fi
|
||||
|
||||
# geoip2
|
||||
CURRENTDIR="$BUILDROOT"
|
||||
cd "$CURRENTDIR"
|
||||
@@ -177,7 +192,7 @@ make clean &>/dev/null
|
||||
--with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-mail --with-mail_ssl_module \
|
||||
--with-http_v2_module --with-http_v3_module --with-stream --with-select_module --with-poll_module --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module \
|
||||
--with-zlib=../zlib-$V_ZLIB --with-pcre=../pcre2-$V_PCRE --with-openssl=../openssl-$V_QSSL --with-openssl-opt="no-asm no-tests enable-tls1_3$USE_KTLS" \
|
||||
--add-module='../ngx-brotli' --add-module='../nginx-geoip2' --add-module="../headers-more-nginx-module-$V_HEAD" \
|
||||
--add-module='../ngx-brotli' --add-module='../nginx-geoip2' --add-module="../headers-more-nginx-module-$V_HEAD" --add-module="../ngx-zstd" \
|
||||
--with-cc-opt="-g -O2 -ffile-prefix-map=/data/builder/debuild/nginx-$V_NGINX/debian/debuild-base/nginx-$V_NGINX=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC -I../openssl-$V_QSSL/build/include" \
|
||||
--with-ld-opt="-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -L../openssl-$V_QSSL/build/lib" \
|
||||
--with-debug > config.log
|
||||
|
||||
Reference in new issue
Block a user