aboutsummaryrefslogtreecommitdiff
path: root/scripts/nginx.sh
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-04-22 12:33:52 -0400
committerMitch Riedstra <mitch@riedstra.us>2018-04-22 12:33:52 -0400
commit4b1cd7ad1e1463a45b444d066b49574a9b6ad04a (patch)
treed8d86e9f86827f5f6ea4fe68f5aece99fa78173c /scripts/nginx.sh
parentdb54ef567f4c724299ad1830d574052170247e04 (diff)
downloadmin-4b1cd7ad1e1463a45b444d066b49574a9b6ad04a.tar.gz
min-4b1cd7ad1e1463a45b444d066b49574a9b6ad04a.tar.xz
Sweeping changes, switching to musl-cross-make
Updated busybox-config to reflect the toolchain change Nginx and Openssh build and are now apart of the system. Runit is included, still need to install configuration files
Diffstat (limited to 'scripts/nginx.sh')
-rw-r--r--scripts/nginx.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/nginx.sh b/scripts/nginx.sh
new file mode 100644
index 0000000..5035a19
--- /dev/null
+++ b/scripts/nginx.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+. ./.vars
+export DESTDIR=$prefix
+ZLIB=zlib-1.2.11
+VERSION=1.14.0
+APP_NAME="nginx"
+BUILD_DIR="${build_dir}/$APP_NAME-$VERSION"
+if ! [ -d "$BUILD_DIR" ] ; then
+ cd "$build_dir"
+ tar xfzv ${dist_dir}/$APP_NAME-$VERSION.tar.gz
+fi
+cd "$BUILD_DIR"
+# export CC=${BUILD_TGT}-gcc
+export CFLAGS="-static -I$prefix/usr/include"
+export LDFLAGS="-static -L$prefix/usr/lib"
+export DESTDIR="$prefix"
+make clean || echo ""
+./configure --prefix=/usr \
+ --without-pcre \
+ --conf-path="/etc/nginx/nginx.conf" \
+ --error-log-path="/var/log/nginx.error.log" \
+ --http-log-path="/var/log/nginx.access.log" \
+ --pid-path="/var/log/nginx.pid" \
+ --without-http_rewrite_module \
+ --with-openssl=$prefix/usr/include/openssl \
+ --with-zlib=$build_dir/$ZLIB
+cp objs/Makefile objs/Makefile.bak
+sed -e"s/^CC =.*$/CC = ${BUILD_TGT}-gcc/g" \
+ -e"s/^CPP =.*$/CPP = ${BUILD_TGT}-g++/g" \
+ -e'1aLDFLAGS = -static' \
+ objs/Makefile.bak > objs/Makefile
+make -j$(nproc)
+# make
+make install