git: 2f692bf9576a - main - www/angie-module-ndk: Angie NDK dynamic module

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=2f692bf9576af6cc4b6ce44a7a52b7baccb92ace

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

    www/angie-module-ndk: Angie NDK dynamic module
    
    Module is designed to extend the Angie core functionality in a way that can be
    used as a basis of other modules. It has functions and macros to deal with
    generic tasks that don't currently have generic code as part of the core
    distribution.
    
    PR:             273462
---
 www/Makefile                              |  1 +
 www/angie-module-ndk/Makefile             | 24 ++++++++++++++++++++++++
 www/angie-module-ndk/files/pkg-message.in | 15 +++++++++++++++
 www/angie-module-ndk/pkg-descr            |  4 ++++
 www/angie-module-ndk/pkg-plist            |  3 +++
 5 files changed, 47 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 93f64086e95c..ab07dfcccc79 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -39,6 +39,7 @@
     SUBDIR += angie-module-image-filter
     SUBDIR += angie-module-jwt
     SUBDIR += angie-module-keyval
+    SUBDIR += angie-module-ndk
     SUBDIR += angie-module-njs
     SUBDIR += angie-module-perl
     SUBDIR += angie-module-redis2
diff --git a/www/angie-module-ndk/Makefile b/www/angie-module-ndk/Makefile
new file mode 100644
index 000000000000..322f78c3383f
--- /dev/null
+++ b/www/angie-module-ndk/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	angie-module-ndk
+GH_TUPLE=	vision5:ngx_devel_kit:v0.3.2:module
+
+COMMENT=	Angie NDK dynamic module
+
+CFLAGS+=	-DNDK_SET_VAR -DNDK_UPSTREAM_LIST
+
+MASTERDIR=	${.CURDIR}/../../www/angie
+
+do-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${MODDIR}
+
+	${INSTALL_LIB} ${WRKSRC}/objs/ndk_http_module.so \
+	    ${STAGEDIR}${MODDIR}
+
+	${INSTALL_MAN} ${WRKSRC_module}/README.md ${STAGEDIR}${DOCSDIR}
+
+do-install-DEBUG-on:
+	${INSTALL} ${COPY} -m ${_SHAREMODE} \
+	    ${WRKSRC_DEBUG}/objs/ndk_http_module.so \
+	    ${STAGEDIR}${MODDIR}/ndk_http_module-debug.so
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/angie-module-ndk/files/pkg-message.in b/www/angie-module-ndk/files/pkg-message.in
new file mode 100644
index 000000000000..a7ab64e98cd6
--- /dev/null
+++ b/www/angie-module-ndk/files/pkg-message.in
@@ -0,0 +1,15 @@
+[
+{ type: install
+  message: <<EOM
+
+The ndk 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/ndk_http_module;
+
+Please refer to the modules documentation for further details:
+https://github.com/vision5/ngx_devel_kit
+EOM
+}
+]
diff --git a/www/angie-module-ndk/pkg-descr b/www/angie-module-ndk/pkg-descr
new file mode 100644
index 000000000000..2b0be2eb3351
--- /dev/null
+++ b/www/angie-module-ndk/pkg-descr
@@ -0,0 +1,4 @@
+Module is designed to extend the Angie core functionality in a way that can be
+used as a basis of other modules. It has functions and macros to deal with
+generic tasks that don't currently have generic code as part of the core
+distribution.
diff --git a/www/angie-module-ndk/pkg-plist b/www/angie-module-ndk/pkg-plist
new file mode 100644
index 000000000000..518d79834606
--- /dev/null
+++ b/www/angie-module-ndk/pkg-plist
@@ -0,0 +1,3 @@
+%%DOCSDIR%%/README.md
+%%MODDIR%%/ndk_http_module.so
+%%DEBUG%%%%MODDIR%%/ndk_http_module-debug.so