pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

hiawatha: added options



Module Name:	pkgsrc-wip
Committed By:	Kevin Bloom <kevin.bloom%posteo.net@localhost>
Pushed By:	nuclearkev
Date:		Mon Mar 25 11:38:47 2024 -0400
Changeset:	f454302ccd50b35336f6c344c608d7a0211dd60f

Modified Files:
	hiawatha/Makefile
	hiawatha/TODO
Added Files:
	hiawatha/options.mk

Log Message:
hiawatha: added options

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f454302ccd50b35336f6c344c608d7a0211dd60f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 hiawatha/Makefile   | 17 ++++++++++++++++-
 hiawatha/TODO       |  1 -
 hiawatha/options.mk | 18 ++++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)

diffs:
diff --git a/hiawatha/Makefile b/hiawatha/Makefile
index 400dc7157a..a6c1048083 100644
--- a/hiawatha/Makefile
+++ b/hiawatha/Makefile
@@ -9,6 +9,7 @@ HOMEPAGE=	https://www.hiawatha-webserver.org/files/
 COMMENT=	Advanced and secure webserver for Unix
 LICENSE=	gnu-gpl-v2
 
+
 USE_CMAKE=	yes
 
 CMAKE_ARGS+=	-DUSE_SHARED_MBEDTLS_LIBRARY=OFF
@@ -21,6 +22,8 @@ CMAKE_ARGS+=	-DCMAKE_INSTALL_MANDIR="${PREFIX}/man"
 CMAKE_ARGS+=	-DENABLE_XSLT=ON
 CMAKE_ARGS+=	-DPID_DIR="${PREFIX}/var/run"
 
+.include "options.mk"
+
 LDFLAGS+=	"-L${WRKDIR}/hiawatha/mbedtls/library"
 
 REPLACE_PHP+=	extra/letsencrypt/lefh.in
@@ -42,6 +45,18 @@ INSTALLATION_DIRS+=	${EGDIR} ${RCDIR}
 
 RCD_SCRIPTS=	hiawatha
 
+HIAWATHA_USER?=		hiawatha
+HIAWATHA_GROUP?=	hiawatha
+
+PKG_USERS_VARS+=	HIAWATHA_USER
+PKG_GROUPS_VARS+=	HIAWATHA_GROUP
+PKG_GROUPS=		${HIAWATHA_GROUP}
+PKG_USERS=		${HIAWATHA_USER}:${HIAWATHA_GROUP}
+
+PKG_GECOS.${HIAWATHA_USER}=	HIAWATHA web server user
+PKG_HOME.${HIAWATHA_USER}=	${HIAWATHA_DATADIR}
+PKG_SHELL.${HIAWATHA_USER}=	${NOLOGIN}
+
 post-install:
 	${MV} ${DESTDIR}${ETCDIR}/hiawatha.conf ${DESTDIR}${EGDIR}
 	${MV} ${DESTDIR}${ETCDIR}/mimetype.conf ${DESTDIR}${EGDIR}
@@ -49,8 +64,8 @@ post-install:
 	${MV} ${DESTDIR}${ETCDIR}/error.xslt ${DESTDIR}${EGDIR}
 	${MV} ${DESTDIR}${ETCDIR}/index.xslt ${DESTDIR}${EGDIR}
 
-.include "../../lang/php/replace.mk"
 .include "../../devel/cmake/build.mk"
+.include "../../lang/php/replace.mk"
 .include "../../textproc/libxslt/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/hiawatha/TODO b/hiawatha/TODO
index 397c9504ff..9daeafb986 100644
--- a/hiawatha/TODO
+++ b/hiawatha/TODO
@@ -1,2 +1 @@
 test
-monitor option
diff --git a/hiawatha/options.mk b/hiawatha/options.mk
new file mode 100644
index 0000000000..b2b2af8f1e
--- /dev/null
+++ b/hiawatha/options.mk
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.hiawatha
+PKG_SUPPORTED_OPTIONS=		monitor tomahawk
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmonitor)
+CMAKE_ARGS+=	-DENABLE_MONITOR=on
+.else
+CMAKE_ARGS+=	-DENABLE_MONITOR=off
+.endif
+
+.if !empty(PKG_OPTIONS:Mtomahawk)
+CMAKE_ARGS+=	-DENABLE_TOMAHAWK=on
+.else
+CMAKE_ARGS+=	-DENABLE_TOMAHAWK=off
+.endif


Home | Main Index | Thread Index | Old Index