git: 8b4c54df7d25 - main - www/angie-module-headers-more: Angie headers-more dynamic module

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Sun, 10 Sep 2023 16:13:45 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8b4c54df7d257735b3dd8f33ca9de2e04ff72521

commit 8b4c54df7d257735b3dd8f33ca9de2e04ff72521
Author:     Oleg A. Mamontov <oleg@mamontov.net>
AuthorDate: 2023-08-30 21:00:22 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-10 16:13:00 +0000

    www/angie-module-headers-more: Angie headers-more dynamic module
    
    Module allows to set and clear input and output headers.
    This is an enhanced version of the standard headers module because it provides
    more utilities like resetting or clearing "builtin headers" like Content-Type,
    Content-Length, and Server.
    
    PR:             273462
---
 www/Makefile                                       |  1 +
 www/angie-module-headers-more/Makefile             | 24 ++++++++++++++++++++++
 www/angie-module-headers-more/files/pkg-message.in | 15 ++++++++++++++
 www/angie-module-headers-more/pkg-descr            |  4 ++++
 www/angie-module-headers-more/pkg-plist            |  3 +++
 5 files changed, 47 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 89db8d216a30..93f64086e95c 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -35,6 +35,7 @@
     SUBDIR += angie-module-enhanced-memcached
     SUBDIR += angie-module-eval
     SUBDIR += angie-module-geoip2
+    SUBDIR += angie-module-headers-more
     SUBDIR += angie-module-image-filter
     SUBDIR += angie-module-jwt
     SUBDIR += angie-module-keyval
diff --git a/www/angie-module-headers-more/Makefile b/www/angie-module-headers-more/Makefile
new file mode 100644
index 000000000000..b659af139b2b
--- /dev/null
+++ b/www/angie-module-headers-more/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	angie-module-headers-more
+GH_TUPLE=	openresty:headers-more-nginx-module:v0.34:module
+
+COMMENT=	Angie headers-more dynamic module
+
+LICENSE_FILE=	${WRKSRC_module}/README.markdown
+
+MASTERDIR=	${.CURDIR}/../../www/angie
+
+do-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${MODDIR}
+
+	${INSTALL_LIB} ${WRKSRC}/objs/ngx_http_headers_more_filter_module.so \
+	    ${STAGEDIR}${MODDIR}
+
+	${INSTALL_MAN} ${WRKSRC_module}/README.markdown ${STAGEDIR}${DOCSDIR}
+
+do-install-DEBUG-on:
+	${INSTALL} ${COPY} -m ${_SHAREMODE} \
+	    ${WRKSRC_DEBUG}/objs/ngx_http_headers_more_filter_module.so \
+	    ${STAGEDIR}${MODDIR}/ngx_http_headers_more_filter_module-debug.so
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/angie-module-headers-more/files/pkg-message.in b/www/angie-module-headers-more/files/pkg-message.in
new file mode 100644
index 000000000000..e2f982445e0f
--- /dev/null
+++ b/www/angie-module-headers-more/files/pkg-message.in
@@ -0,0 +1,15 @@
+[
+{ type: install
+  message: <<EOM
+
+The headers-more 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_headers_more_filter_module.so;
+
+Please refer to the module documentation for further details:
+https://github.com/openresty/headers-more-nginx-module/
+EOM
+}
+]
diff --git a/www/angie-module-headers-more/pkg-descr b/www/angie-module-headers-more/pkg-descr
new file mode 100644
index 000000000000..47deb2bea070
--- /dev/null
+++ b/www/angie-module-headers-more/pkg-descr
@@ -0,0 +1,4 @@
+Module allows to set and clear input and output headers.
+This is an enhanced version of the standard headers module because it provides
+more utilities like resetting or clearing "builtin headers" like Content-Type,
+Content-Length, and Server.
diff --git a/www/angie-module-headers-more/pkg-plist b/www/angie-module-headers-more/pkg-plist
new file mode 100644
index 000000000000..0949818176d6
--- /dev/null
+++ b/www/angie-module-headers-more/pkg-plist
@@ -0,0 +1,3 @@
+%%DOCSDIR%%/README.markdown
+%%MODDIR%%/ngx_http_headers_more_filter_module.so
+%%DEBUG%%%%MODDIR%%/ngx_http_headers_more_filter_module-debug.so