-
Notifications
You must be signed in to change notification settings - Fork 252
/
plan.sh
67 lines (64 loc) · 2.04 KB
/
plan.sh
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
pkg_name=nginx
pkg_origin=core
pkg_version=1.15.6
pkg_description="NGINX web server."
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=('BSD-2-Clause')
pkg_source="https://nginx.org/download/nginx-${pkg_version}.tar.gz"
pkg_upstream_url=https://nginx.org/
pkg_shasum=a3d8c67c2035808c7c0d475fffe263db8c353b11521aa7ade468b780ed826cc6
pkg_deps=(core/glibc core/libedit core/ncurses core/zlib core/bzip2 core/openssl core/pcre)
pkg_build_deps=(core/gcc core/make core/coreutils)
pkg_lib_dirs=(lib)
pkg_bin_dirs=(sbin)
pkg_include_dirs=(include)
pkg_svc_run="nginx"
pkg_svc_user="root"
pkg_exports=(
[port]=http.listen.port
)
pkg_exposes=(port)
do_build() {
./configure --prefix="$pkg_prefix" \
--conf-path="$pkg_svc_config_path/nginx.conf" \
--sbin-path="$pkg_prefix/bin/nginx" \
--pid-path="$pkg_svc_var_path/nginx.pid" \
--lock-path="$pkg_svc_var_path/nginx.lock" \
--user=hab \
--group=hab \
--http-log-path=/dev/stdout \
--error-log-path=stderr \
--http-client-body-temp-path="$pkg_svc_var_path/client-body" \
--http-proxy-temp-path="$pkg_svc_var_path/proxy" \
--http-fastcgi-temp-path="$pkg_svc_var_path/fastcgi" \
--http-scgi-temp-path="$pkg_svc_var_path/scgi" \
--http-uwsgi-temp-path="$pkg_svc_var_path/uwsgi" \
--with-ipv6 \
--with-pcre \
--with-pcre-jit \
--with-file-aio \
--with-stream=dynamic \
--with-stream_ssl_module \
--with-mail=dynamic \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_realip_module \
--with-http_v2_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_addition_module \
--with-http_degradation_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_secure_link_module \
--with-http_sub_module \
--with-http_slice_module \
--with-cc-opt="$CFLAGS" \
--with-ld-opt="$LDFLAGS"
make
}
do_install() {
make install
mkdir -p "$pkg_prefix/sbin"
cp "$HAB_CACHE_SRC_PATH/$pkg_dirname/objs/nginx" "$pkg_prefix/sbin"
}