-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrds-json-nginx-module-dynamic-module.patch
43 lines (42 loc) · 2.16 KB
/
rds-json-nginx-module-dynamic-module.patch
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
diff --git a/config b/config
index f9f65d5..f3aad34 100644
--- a/config
+++ b/config
@@ -1,5 +1,35 @@
ngx_addon_name=ngx_http_rds_json_filter_module
-HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_rds_json_filter_module"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_rds_json_filter_module.c $ngx_addon_dir/src/ngx_http_rds_json_processor.c $ngx_addon_dir/src/ngx_http_rds_json_util.c $ngx_addon_dir/src/ngx_http_rds_json_output.c $ngx_addon_dir/src/ngx_http_rds_json_handler.c"
-NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/resty_dbd_stream.h $ngx_addon_dir/src/ngx_http_rds_json_filter_module.h $ngx_addon_dir/src/ngx_http_rds_json_processor.h $ngx_addon_dir/src/ngx_http_rds_json_util.h $ngx_addon_dir/src/ngx_http_rds.h $ngx_addon_dir/src/resty_dbd_stream.h $ngx_addon_dir/src/ngx_http_rds_json_output.h $ngx_addon_dir/src/ngx_http_rds_utils.h $ngx_addon_dir/src/ngx_http_rds_json_handler.h"
+RDS_JSON_FILTER_SRCS=" \
+ $ngx_addon_dir/src/ngx_http_rds_json_filter_module.c \
+ $ngx_addon_dir/src/ngx_http_rds_json_processor.c \
+ $ngx_addon_dir/src/ngx_http_rds_json_util.c \
+ $ngx_addon_dir/src/ngx_http_rds_json_output.c \
+ $ngx_addon_dir/src/ngx_http_rds_json_handler.c \
+ "
+
+RDS_JSON_FILTER_DEPS=" \
+ $ngx_addon_dir/src/ddebug.h \
+ $ngx_addon_dir/src/resty_dbd_stream.h \
+ $ngx_addon_dir/src/ngx_http_rds_json_filter_module.h \
+ $ngx_addon_dir/src/ngx_http_rds_json_processor.h \
+ $ngx_addon_dir/src/ngx_http_rds_json_util.h \
+ $ngx_addon_dir/src/ngx_http_rds.h \
+ $ngx_addon_dir/src/resty_dbd_stream.h \
+ $ngx_addon_dir/src/ngx_http_rds_json_output.h \
+ $ngx_addon_dir/src/ngx_http_rds_utils.h \
+ $ngx_addon_dir/src/ngx_http_rds_json_handler.h \
+ "
+
+if [ -n "$ngx_module_link" ]; then
+ ngx_module_type=HTTP_AUX_FILTER
+ ngx_module_name=$ngx_addon_name
+ ngx_module_srcs="$RDS_JSON_FILTER_SRCS"
+ ngx_module_deps="$RDS_JSON_FILTER_DEPS"
+
+ . auto/module
+else
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $RDS_JSON_FILTER_SRCS"
+ NGX_ADDON_DEPS="$NGX_ADDON_DEPS $RDS_JSON_FILTER_DEPS"
+fi