-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinpack-1.toml
More file actions
92 lines (79 loc) · 2.76 KB
/
inpack-1.toml
File metadata and controls
92 lines (79 loc) · 2.76 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[project]
name = "nginx"
version = "1.18"
vendor = "nginx.org"
homepage = "http://nginx.org/"
description = "High Performance Load Balancer, Web Server, Reverse Proxy"
groups = ["dev/sys-srv"]
[files]
[scripts]
build = """
PREFIX="/opt/nginx/nginx"
cd {{.inpack__pack_dir}}/deps
if [ ! -f "nginx-{{.project__version}}.tar.gz" ]; then
wget http://nginx.org/download/nginx-{{.project__version}}.tar.gz
fi
if [ -d "nginx-{{.project__version}}" ]; then
rm -rf nginx-{{.project__version}}
fi
tar -zxf nginx-{{.project__version}}.tar.gz
cd nginx-{{.project__version}}
./configure \
--user=action \
--group=action \
--prefix=$PREFIX \
--sbin-path=$PREFIX/bin/nginx \
--modules-path=$PREFIX/modules \
--conf-path=$PREFIX/conf/nginx.conf \
--error-log-path=$PREFIX/var/log/error.log \
--http-log-path=$PREFIX/var/log/access.log \
--pid-path=$PREFIX/var/run.nginx.pid \
--lock-path=$PREFIX/var/run.nginx.lock \
--http-client-body-temp-path=$PREFIX/var/cache/nginx/client_temp \
--http-proxy-temp-path=$PREFIX/var/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=$PREFIX/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=$PREFIX/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=$PREFIX/var/cache/nginx/scgi_temp \
--with-compat \
--with-file-aio \
--with-threads \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_mp4_module \
--with-http_random_index_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_v2_module \
--with-mail \
--with-mail_ssl_module \
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module \
--with-stream_ssl_preread_module
make -j2
des_tmp=/tmp/nginx_build_tmp
mkdir -p $des_tmp
make install DESTDIR=$des_tmp
rm -rf {{.buildroot}}/*
cp -rp $des_tmp/$PREFIX/* {{.buildroot}}/
strip -s {{.buildroot}}/bin/nginx
rm -f {{.buildroot}}/bin/nginx.old
mkdir -p {{.buildroot}}/conf/conf.d/
mkdir -p {{.buildroot}}/modules
mkdir -p {{.buildroot}}/var/cache/nginx/{client_temp,proxy_temp,fastcgi_temp,uwsgi_temp,scgi_temp}
cd {{.inpack__pack_dir}}
install misc/nginx.conf.tpl {{.buildroot}}/conf/nginx.conf
sed -i 's/{\\[worker_processes\\]}/1/g' {{.buildroot}}/conf/nginx.conf
sed -i 's/{\\[events_worker_connections\\]}/8192/g' {{.buildroot}}/conf/nginx.conf
sed -i 's/{\\[http_server_default_listen\\]}/80/g' {{.buildroot}}/conf/nginx.conf
cd {{.inpack__pack_dir}}/deps
rm -rf nginx-{{.project__version}}
"""