Skip to content

Commit f521001

Browse files
committed
fix(router): build cleanup.
1 parent c27bd53 commit f521001

1 file changed

Lines changed: 14 additions & 21 deletions

File tree

router/parent/build.sh

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
11
#!/usr/bin/env bash
22

3-
cd /tmp
4-
53
export VERSION_NGINX=nginx-1.6.2
6-
export VERSION_TCP_PROXY=v0.4.5
4+
export VERSION_TCP_PROXY=0.4.5
75

8-
# URLs to the source directories
9-
export SOURCE_NGINX=http://nginx.org/download
10-
export SOURCE_TCP_PROXY=https://github.com/yaoweibin/nginx_tcp_proxy_module/archive
6+
export BUILD_PATH=/tmp/build
117

12-
export BPATH=`pwd`/build
13-
export PREFIX=/deis
14-
export STATICLIBSSL="$PREFIX"
8+
# nginx installation directory
9+
export PREFIX=/nginx
1510

1611
rm -rf $PREFIX
1712
mkdir $PREFIX
1813

14+
mkdir $BUILD_PATH
15+
cd $BUILD_PATH
16+
1917
# install required packages to build
2018
apt-get update \
21-
&& apt-get install -y patch curl wget build-essential \
19+
&& apt-get install -y patch curl build-essential \
2220
libpcre3 libpcre3-dev libssl-dev libgeoip-dev zlib1g-dev
2321

24-
# where the installers are
25-
mkdir $BPATH
26-
2722
# grab the source files
28-
wget -P $BPATH ${SOURCE_NGINX}/${VERSION_NGINX}.tar.gz
29-
wget -P $BPATH ${SOURCE_TCP_PROXY}/${VERSION_TCP_PROXY}.tar.gz
30-
23+
curl -sSL http://nginx.org/download/$VERSION_NGINX.tar.gz -o $BUILD_PATH/$VERSION_NGINX.tar.gz
24+
curl -sSL https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/v$VERSION_TCP_PROXY.tar.gz -o $BUILD_PATH/$VERSION_TCP_PROXY.tar.gz
3125

3226
# expand the source files
33-
cd $BPATH
3427
tar xzf $VERSION_NGINX.tar.gz
3528
tar xzf $VERSION_TCP_PROXY.tar.gz
3629

3730
# build nginx
38-
cd $BPATH/$VERSION_NGINX
31+
cd $BUILD_PATH/$VERSION_NGINX
3932

40-
patch -p1 < /$BPATH/nginx_tcp_proxy_module-0.4.5/tcp.patch
33+
patch -p1 < $BUILD_PATH/nginx_tcp_proxy_module-$VERSION_TCP_PROXY/tcp.patch
4134

4235
./configure \
43-
--prefix=/nginx \
36+
--prefix=$PREFIX \
4437
--pid-path=/run/nginx.pid \
4538
--with-debug \
4639
--with-pcre-jit \
@@ -57,5 +50,5 @@ patch -p1 < /$BPATH/nginx_tcp_proxy_module-0.4.5/tcp.patch
5750
--with-http_sub_module \
5851
--with-mail \
5952
--with-mail_ssl_module \
60-
--add-module=$BPATH/nginx_tcp_proxy_module-0.4.5 \
53+
--add-module=$BUILD_PATH/nginx_tcp_proxy_module-$VERSION_TCP_PROXY \
6154
&& make && make install

0 commit comments

Comments
 (0)