blob: 5035a19cc7eb47e91582faaf18733877051a4ccf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|