1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
6 VARIANTS= standard loaded
7 SDESC[standard]= HTTP and reverse proxy server (basic options)
8 SDESC[loaded]= HTTP and reverse proxy server (all options)
9 HOMEPAGE= https://nginx.org/
12 DOWNLOAD_GROUPS= main geoip2 notice
13 SITES[geoip2]= GITHUB/leev:ngx_http_geoip2_module:2.0
14 SITES[main]= http://nginx.org/download/
15 SITES[notice]= GITHUB/kr:nginx-notice:3c95966
16 DISTFILE[1]= nginx-1.13.4.tar.gz:main
17 DISTFILE[2]= generated:geoip2
18 DISTFILE[3]= generated:notice
20 SPKGS[standard]= single
23 OPTIONS_AVAILABLE= LOADED
24 OPTIONS_STANDARD= none
25 VOPTS[loaded]= LOADED=ON
27 BUILD_DEPENDS= pcre:static:standard
28 BUILDRUN_DEPENDS= pcre:shared:standard
32 USERGROUP_SPKG= single
38 FPC_EQUIVALENT= www/nginx
41 CONFIGURE_ARGS= --prefix={{PREFIX}}/etc/nginx
42 --with-cc-opt="-I{{LOCALBASE}}/include"
43 --with-ld-opt="-L{{LOCALBASE}}/lib -Wl,-rpath,{{LOCALBASE}}/lib"
44 --conf-path={{PREFIX}}/etc/nginx/nginx.conf
45 --sbin-path={{PREFIX}}/sbin/nginx
46 --pid-path=/var/run/nginx.pid
47 --error-log-path=/var/log/nginx/error.log
51 --modules-path={{PREFIX}}/libexec/nginx
53 --http-client-body-temp-path=/var/tmp/nginx/client_body_temp
54 --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
55 --http-proxy-temp-path=/var/tmp/nginx/proxy_temp
56 --http-scgi-temp-path=/var/tmp/nginx/scgi_temp
57 --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp
58 --http-log-path=/var/log/nginx/access.log
59 --with-http_addition_module
60 --with-http_auth_request_module
61 --with-http_dav_module
62 --with-http_flv_module
63 --with-http_gzip_static_module
64 --with-http_gunzip_module
65 --with-http_mp4_module
66 --with-http_random_index_module
67 --with-http_realip_module
68 --with-http_secure_link_module
69 --with-http_slice_module
70 --with-http_ssl_module
71 --with-http_stub_status_module
72 --with-http_sub_module
75 --with-mail_ssl_module
77 --with-stream_ssl_module
78 --with-stream_ssl_preread_module
81 PLIST_SUB= WWWOWN={{WWWOWN}}
83 NGINX_TMPDIR=/var/tmp/nginx
84 NGINX_LOGDIR=/var/log/nginx
86 SUB_FILES= pkg-message-single
87 SUB_LIST= WWWOWN={{WWWOWN}}
89 NGINX_TMPDIR=/var/tmp/nginx
90 NGINX_LOGDIR=/var/log/nginx
92 [LOADED].DESCRIPTION= All options enabled (heavy dependencies)
93 [LOADED].BROKEN_ON= need to replace gpatch with bsdpatch
94 [LOADED].BUILDRUN_DEPENDS_ON= libmaxminddb:single:standard
95 [LOADED].CONFIGURE_ARGS_OFF= --without-mail_imap_module
96 --without-mail_pop3_module
97 --without-mail_smtp_module
98 [LOADED].CONFIGURE_ARGS_ON= --add-dynamic-module={{WRKDIR}}/ngx_http_geoip2_module-2.0
99 --add-module={{WRKDIR}}/nginx-notice-3c95966
100 [LOADED].DF_INDEX_ON= 2
102 [LOADED].EXTRA_PATCHES_ON= extra-patch-ngx_http_notice_module.c
105 @${REINPLACE_CMD} 's!%%HTTP_PORT%%!80!; \
106 s!%%PREFIX%%!${PREFIX}!; \
107 s!%%NGINX_ERRORLOG%%!/var/log/nginx/error.log!' \
108 ${WRKSRC}/conf/nginx.conf
111 @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD})
114 ${CAT} ${WRKSRC}/conf/nginx.conf \
115 >>${STAGEDIR}${PREFIX}/etc/nginx/nginx.conf-dist
116 ${INSTALL_MAN} ${WRKSRC}/objs/nginx.8 \
117 ${STAGEDIR}${MAN8PREFIX}/man/man8
120 ${MKDIR} ${STAGEDIR}${PREFIX}/etc/nginx \
121 ${STAGEDIR}${PREFIX}/libexec/nginx \
122 ${STAGEDIR}/var/tmp/nginx \
123 ${STAGEDIR}/var/log/nginx \
124 ${STAGEDIR}${PREFIX}/www/nginx-dist
125 ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${STAGEDIR}${PREFIX}/sbin
126 .for i in koi-utf koi-win win-utf
127 ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${PREFIX}/etc/nginx
129 .for i in fastcgi_params mime.types scgi_params uwsgi_params
130 ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${PREFIX}/etc/nginx/${i}-dist
132 .for i in index.html 50x.html
133 ${INSTALL_DATA} ${WRKSRC}/html/${i} ${STAGEDIR}${PREFIX}/www/nginx-dist
135 ${ECHO_CMD} >> ${STAGEDIR}${PREFIX}/www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
136 (cd ${WRKSRC}/objs/ && ${FIND} . -depth -maxdepth 1 -name '*.so' -type f \
137 -exec ${INSTALL_PROGRAM} {} ${STAGEDIR}${PREFIX}/libexec/nginx \;)
139 [FILE:351:descriptions/desc.single.standard]
140 NGINX is a high performance edge web server with the lowest memory
141 footprint and the key features to build modern and efficient web
144 NGINX functionality includes HTTP server, HTTP and mail reverse proxy,
145 caching, load balancing, compression, request throttling, connection
146 multiplexing and reuse, SSL offload and HTTP media streaming.
149 [FILE:471:descriptions/desc.single.loaded]
150 NGINX is a high performance edge web server with the lowest memory
151 footprint and the key features to build modern and efficient web
154 NGINX functionality includes HTTP server, HTTP and mail reverse proxy,
155 caching, load balancing, compression, request throttling, connection
156 multiplexing and reuse, SSL offload and HTTP media streaming.
158 This package contains additional modules over the standard nginx:
159 geoip2 : handles maxmind geoip2 databases
163 de21f3c49ba65c611329d8759a63d72e5fcf719bc6f2a3270e2541348ef1fbba 988415 nginx-1.13.4.tar.gz
164 ebb4652c4f9a2e1ee31fddefc4c93ff78e651a4b2727d3453d026bccbd708d99 6766 leev-ngx_http_geoip2_module-2.0.tar.gz
165 e829fc94178cc8c91fef15a1fc44ee7ac162c13eddc0bba4c9427aaa23386885 3343 kr-nginx-notice-3c95966.tar.gz
168 [FILE:777:manifests/plist.single.standard]
169 @dir %%NGINX_LOGDIR%%
170 @dir %%NGINX_TMPDIR%%
171 @sample etc/nginx/fastcgi_params-dist etc/nginx/fastcgi_params
172 @sample etc/nginx/mime.types-dist etc/nginx/mime.types
173 @sample etc/nginx/nginx.conf-dist etc/nginx/nginx.conf
174 @sample etc/nginx/scgi_params-dist etc/nginx/scgi_params
175 @sample etc/nginx/uwsgi_params-dist etc/nginx/uwsgi_params
184 share/man/man8/nginx.8.gz
187 EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
189 @preexec mkdir -p -m 755 %D/www/nginx-dist
190 @preexec if [ ! -d %D/www/nginx/ ] ; then ln -fs %D/www/nginx-dist %D/www/nginx; fi
191 @preexec chmod a-w %D/www/nginx-dist
192 @postunexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
195 [FILE:833:manifests/plist.single.loaded]
196 @dir %%NGINX_LOGDIR%%
197 @dir %%NGINX_TMPDIR%%
198 @sample etc/nginx/fastcgi_params-dist etc/nginx/fastcgi_params
199 @sample etc/nginx/mime.types-dist etc/nginx/mime.types
200 @sample etc/nginx/nginx.conf-dist etc/nginx/nginx.conf
201 @sample etc/nginx/scgi_params-dist etc/nginx/scgi_params
202 @sample etc/nginx/uwsgi_params-dist etc/nginx/uwsgi_params
208 ngx_http_geoip2_module.so
211 ngx_stream_geoip2_module.so
213 share/man/man8/nginx.8.gz
216 EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
218 @preexec mkdir -p -m 755 %D/www/nginx-dist
219 @preexec if [ ! -d %D/www/nginx/ ] ; then ln -fs %D/www/nginx-dist %D/www/nginx; fi
220 @preexec chmod a-w %D/www/nginx-dist
221 @postunexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
224 [FILE:360:files/extra-patch-ngx_http_notice_module.c]
225 --- ../nginx-notice-3c95966/ngx_http_notice_module.c.orig 2009-07-16 18:37:57.000000000 +0200
226 +++ ../nginx-notice-3c95966/ngx_http_notice_module.c
228 return NGX_HTTP_NOT_ALLOWED;
231 - rc = ngx_http_discard_body(r);
232 + rc = ngx_http_discard_request_body(r);
234 if (rc != NGX_OK && rc != NGX_AGAIN) {
238 [FILE:3521:files/nginx.in]
242 # REQUIRE: LOGIN cleanvar
245 # Add the following lines to /etc/rc.conf to enable nginx:
246 # nginx_enable (bool): Set to "NO" by default.
247 # Set it to "YES" to enable nginx
248 # nginx_profiles (str): Set to "" by default.
249 # Define your profiles here.
250 # nginx_pid_prefix (str): Set to "" by default.
251 # When using profiles manually assign value to "nginx_"
252 # for prevent collision with other PIDs names.
253 # nginxlimits_enable (bool): Set to "NO" by default.
254 # Set it to yes to run `limits $limits_args`
255 # just before nginx starts.
256 # nginx_flags (str): Set to "" by default.
257 # Extra flags passed to start command.
258 # nginxlimits_args (str): Default to "-e -U %%WWWOWN%%"
259 # Arguments of pre-start limits run.
266 start_precmd="nginx_precmd"
267 restart_precmd="nginx_checkconfig"
268 reload_precmd="nginx_checkconfig"
269 configtest_cmd="nginx_checkconfig"
270 gracefulstop_cmd="nginx_gracefulstop"
271 upgrade_precmd="nginx_checkconfig"
272 upgrade_cmd="nginx_upgrade"
273 command="%%PREFIX%%/sbin/nginx"
274 _pidprefix="%%NGINX_RUNDIR%%"
275 pidfile="${_pidprefix}/${name}.pid"
276 _tmpprefix="%%NGINX_TMPDIR%%"
277 required_files=%%PREFIX%%/etc/nginx/nginx.conf
278 extra_commands="reload configtest upgrade gracefulstop"
280 [ -z "$nginx_enable" ] && nginx_enable="NO"
281 [ -z "$nginxlimits_enable" ] && nginxlimits_enable="NO"
282 [ -z "$nginxlimits_args" ] && nginxlimits_args="-e -U %%WWWOWN%%"
288 if [ "x${nginx_profiles}" != "x" ]; then
289 pidfile="${_pidprefix}/${nginx_pid_prefix}${profile}.pid"
290 eval nginx_configfile="\${nginx_${profile}_configfile:-}"
291 if [ "x${nginx_configfile}" = "x" ]; then
292 echo "You must define a configuration file (nginx_${profile}_configfile)"
295 required_files="${nginx_configfile}"
296 eval nginx_enable="\${nginx_${profile}_enable:-${nginx_enable}}"
297 eval nginx_flags="\${nginx_${profile}_flags:-${nginx_flags}}"
298 eval nginxlimits_enable="\${nginxlimits_${profile}_enable:-${nginxlimits_enable}}"
299 eval nginxlimits_args="\${nginxlimits_${profile}_args:-${nginxlimits_args}}"
300 nginx_flags="-c ${nginx_configfile} -g \"pid ${pidfile};\" ${nginx_flags}"
302 echo "$0: extra argument ignored"
305 if [ "x${nginx_profiles}" != "x" -a "x$1" != "x" ]; then
306 for profile in ${nginx_profiles}; do
307 echo "===> nginx profile: ${profile}"
308 %%PREFIX%%/etc/rc.d/nginx $1 ${profile}
310 if [ "0${retcode}" -ne 0 ]; then
311 failed="${profile} (${retcode}) ${failed:-}"
313 success="${profile} ${success:-}"
323 if [ ! -d ${_tmpprefix} ] ; then
324 install -d -o %%WWWOWN%% -g %%WWWGRP%% -m 755 ${_tmpprefix}
332 echo "Performing sanity check on nginx configuration:"
333 eval ${command} ${nginx_flags} -t
338 echo "Performing a graceful stop:"
340 run_rc_command ${rc_prefix}stop $rc_extra_args || return 1
345 echo "Upgrading nginx binary:"
349 run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
353 echo "Stopping old binary:"
356 pidfile="$pidfile.oldbin"
357 run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
364 if checkyesno nginxlimits_enable
366 eval `/usr/bin/limits ${nginxlimits_args}` 2>/dev/null
375 [FILE:763:files/pkg-message-single.in]
377 ===================================================================
378 A recent version of the NGINX introduced dynamic modules support.
379 To load a module at runtime, include the new `load_module'
380 directive in the main context, specifying the path to the shared
381 object file for the module, enclosed in quotation marks. When you
382 reload the configuration or restart NGINX, the module is loaded in.
383 It is possible to specify a path relative to the source directory,
384 or a full path, please see
385 https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
386 http://nginx.org/en/docs/ngx_core_module.html#load_module for
389 Default path for the NGINX dynamic modules is
391 %%PREFIX%%/libexec/nginx.
392 ===================================================================
396 [FILE:314:dragonfly/patch-src_core_ngx__config.h]
397 --- src/core/ngx_config.h.orig 2017-08-08 15:00:12 UTC
398 +++ src/core/ngx_config.h
400 #include <ngx_auto_headers.h>
403 -#if defined __DragonFly__ && !defined __FreeBSD__
404 -#define __FreeBSD__ 4
405 +#if defined __DragonFly__
406 +#undef __FreeBSD_version
407 #define __FreeBSD_version 480101
412 [FILE:470:dragonfly/patch-src_event_modules_ngx__eventport__module.c]
413 --- src/event/modules/ngx_eventport_module.c.orig 2017-08-08 15:00:13 UTC
414 +++ src/event/modules/ngx_eventport_module.c
415 @@ -49,7 +49,7 @@ typedef struct port_notify {
416 void *portnfy_user; /* user defined */
419 -#if (__FreeBSD__ && __FreeBSD_version < 700005) || (NGX_DARWIN)
420 +#if (__FreeBSD_version < 700005) || (NGX_DARWIN)
422 typedef struct itimerspec { /* definition per POSIX.4 */
423 struct timespec it_interval;/* timer period */
426 [FILE:532:dragonfly/patch-src_event_modules_ngx__kqueue__module.c]
427 --- src/event/modules/ngx_kqueue_module.c.orig 2017-08-08 15:00:13 UTC
428 +++ src/event/modules/ngx_kqueue_module.c
429 @@ -429,8 +429,7 @@ ngx_kqueue_set_event(ngx_event_t *ev, ng
430 if (filter == EVFILT_VNODE) {
431 kev->fflags = NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND
432 |NOTE_ATTRIB|NOTE_RENAME
433 -#if (__FreeBSD__ == 4 && __FreeBSD_version >= 430000) \
434 - || __FreeBSD_version >= 500018
435 +#if __FreeBSD_version >= 500018
441 [FILE:447:dragonfly/patch-src_os_unix_ngx__freebsd__init.c]
442 --- src/os/unix/ngx_freebsd_init.c.orig 2017-08-08 15:00:13 UTC
443 +++ src/os/unix/ngx_freebsd_init.c
444 @@ -162,8 +162,7 @@ ngx_os_specific_init(ngx_log_t *log)
445 * to allow an old binary to run correctly on an updated FreeBSD system.
448 -#if (__FreeBSD__ == 4 && __FreeBSD_version >= 460102) \
449 - || __FreeBSD_version == 460002 || __FreeBSD_version >= 500039
450 +#if __FreeBSD_version >= 500039
452 /* a new syscall without the bug */
456 [FILE:293:dragonfly/patch-src_os_unix_ngx__posix__config.h]
457 --- src/os/unix/ngx_posix_config.h.orig 2017-08-08 15:00:14 UTC
458 +++ src/os/unix/ngx_posix_config.h
459 @@ -145,7 +145,7 @@ typedef struct aiocb ngx_aiocb_t;
460 #define ngx_debug_init()
463 -#if (__FreeBSD__) && (__FreeBSD_version < 400017)
466 #include <sys/param.h> /* ALIGN() */