This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan.sh
79 lines (76 loc) · 2.08 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
68
69
70
71
72
73
74
75
76
77
78
79
pkg_name=nginx
pkg_origin=core
pkg_version=1.21.4
pkg_description="NGINX web server."
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_license=('BSD-2-Clause')
pkg_source="https://nginx.org/download/nginx-${pkg_version}.tar.gz"
pkg_upstream_url=https://nginx.org/
pkg_shasum=d1f72f474e71bcaaf465dcc7e6f7b6a4705e4b1ed95c581af31df697551f3bfe
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-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"
}