summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg A. Mamontov <oleg@mamontov.net>2023-08-31 00:01:23 +0300
committerRobert Clausecker <fuz@FreeBSD.org>2023-09-10 12:13:01 -0400
commitac2a5278212d9967773e769174f42ea430c435a0 (patch)
tree5f8c0e07105a7b6df614a9a41e1718bedee3c6eb
parente2f23b676e5af1287417d0cc670a10fd22efe842 (diff)
downloadfreebsd-ports-ac2a5278212d9967773e769174f42ea430c435a0.zip
www/angie-module-subs: Angie substitutions filter dynamic module
Module performs both regular expression and fixed string substitutions on response bodies. This module is quite different from the native substitution module. It scans the output chains buffer and matches string line by line, just like Apache's mod_substitute. PR: 273462
-rw-r--r--www/Makefile1
-rw-r--r--www/angie-module-subs/Makefile24
-rw-r--r--www/angie-module-subs/files/pkg-message.in15
-rw-r--r--www/angie-module-subs/pkg-descr4
-rw-r--r--www/angie-module-subs/pkg-plist3
5 files changed, 47 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index da72992735a6..2b2c1f87d6a0 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -46,6 +46,7 @@
SUBDIR += angie-module-redis2
SUBDIR += angie-module-rtmp
SUBDIR += angie-module-set-misc
+ SUBDIR += angie-module-subs
SUBDIR += angie-module-xslt
SUBDIR += anyremote2html
SUBDIR += apache-mode.el
diff --git a/www/angie-module-subs/Makefile b/www/angie-module-subs/Makefile
new file mode 100644
index 000000000000..b444f72eab8a
--- /dev/null
+++ b/www/angie-module-subs/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= angie-module-subs
+GH_TUPLE= yaoweibin:ngx_http_substitutions_filter_module:e12e965ac1837ca709709f9a26f572a54d83430e:module
+
+COMMENT= Angie substitutions filter dynamic module
+
+LICENSE_FILE= ${WRKSRC_module}/README
+
+MASTERDIR= ${.CURDIR}/../../www/angie
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${MODDIR}
+
+ ${INSTALL_LIB} ${WRKSRC}/objs/ngx_http_subs_filter_module.so \
+ ${STAGEDIR}${MODDIR}
+
+ ${INSTALL_MAN} ${WRKSRC_module}/README ${STAGEDIR}${DOCSDIR}
+
+do-install-DEBUG-on:
+ ${INSTALL} ${COPY} -m ${_SHAREMODE} \
+ ${WRKSRC_DEBUG}/objs/ngx_http_subs_filter_module.so \
+ ${STAGEDIR}${MODDIR}/ngx_http_subs_filter_module-debug.so
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/angie-module-subs/files/pkg-message.in b/www/angie-module-subs/files/pkg-message.in
new file mode 100644
index 000000000000..5bfad5609ac2
--- /dev/null
+++ b/www/angie-module-subs/files/pkg-message.in
@@ -0,0 +1,15 @@
+[
+{ type: install
+ message: <<EOM
+
+The substitutions filter dynamic module for Angie has been installed.
+To enable this module, add the following to %%PREFIX%%/etc/angie/angie.conf
+and reload angie:
+
+ load_module modules/ngx_http_subs_filter_module.so;
+
+Please refer to the module documentation for further details:
+https://github.com/yaoweibin/ngx_http_substitutions_filter_module
+EOM
+}
+]
diff --git a/www/angie-module-subs/pkg-descr b/www/angie-module-subs/pkg-descr
new file mode 100644
index 000000000000..ebf491d16a36
--- /dev/null
+++ b/www/angie-module-subs/pkg-descr
@@ -0,0 +1,4 @@
+Module performs both regular expression and fixed string substitutions
+on response bodies. This module is quite different from the native
+substitution module. It scans the output chains buffer and matches string
+line by line, just like Apache's mod_substitute.
diff --git a/www/angie-module-subs/pkg-plist b/www/angie-module-subs/pkg-plist
new file mode 100644
index 000000000000..05f77c20a20a
--- /dev/null
+++ b/www/angie-module-subs/pkg-plist
@@ -0,0 +1,3 @@
+%%DOCSDIR%%/README
+%%MODDIR%%/ngx_http_subs_filter_module.so
+%%DEBUG%%%%MODDIR%%/ngx_http_subs_filter_module-debug.so