Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2024 07:20:01 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4187fb7333b1 - main - dns/doggo: Flavorize and add the "webui" flavor
Message-ID:  <202407130720.46D7K1Ig023035@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4187fb7333b10df1bef993f19691d615c4db1759

commit 4187fb7333b10df1bef993f19691d615c4db1759
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-07-13 07:19:30 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-07-13 07:19:59 +0000

    dns/doggo: Flavorize and add the "webui" flavor
---
 dns/doggo/Makefile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/dns/doggo/Makefile b/dns/doggo/Makefile
index 305d96afc344..9299aea2e2d3 100644
--- a/dns/doggo/Makefile
+++ b/dns/doggo/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	doggo
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.0.4
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	dns
 
@@ -11,16 +12,35 @@ WWW=		https://github.com/mr-karan/doggo
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+FLAVORS=	default webui
+FLAVOR?=	${FLAVORS:[1]}
+webui_PKGNAMESUFFIX=	-webui
+
 USES=		go:modules
 
+.if ${FLAVOR} == webui
+COMMENT+=	(web UI version)
+.endif
+
 GO_MODULE=	github.com/mr-karan/doggo
+.if ${FLAVOR} == default
 GO_TARGET=	./cmd/${PORTNAME}
+.endif
+.if ${FLAVOR} == webui
+GO_TARGET=	./web
+.endif
 
+.if ${FLAVOR} == default
 PLIST_FILES=	bin/${PORTNAME} \
 		share/bash-completion/completions/_${PORTNAME} \
 		share/fish/completions/${PORTNAME}.fish \
 		share/zsh/site-functions/_${PORTNAME}
+.endif
+.if ${FLAVOR} == webui
+PLIST_FILES=	bin/${PORTNAME}-webui
+.endif
 
+.if ${FLAVOR} == default
 post-install: # install completions
 	# bash
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
@@ -34,5 +54,11 @@ post-install: # install completions
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
 	${STAGEDIR}${PREFIX}/bin/${PORTNAME} completions zsh > \
 		${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
+.endif
+
+.if ${FLAVOR} == webui
+post-install: # rename executable
+	@${MV} ${STAGEDIR}${PREFIX}/bin/web ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-webui
+.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407130720.46D7K1Ig023035>