git: b1deda5bd66b - main - dns/nextdns: Use a cleaner way to manage its configuration file sample.

From: Olivier Cochard <olivier_at_FreeBSD.org>
Date: Thu, 23 Jun 2022 23:48:26 UTC
The branch main has been updated by olivier:

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

commit b1deda5bd66bf361b4e0d90a34e52b5b8d5c1ca1
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2022-06-23 23:46:27 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2022-06-23 23:47:29 +0000

    dns/nextdns: Use a cleaner way to manage its configuration file sample.
---
 dns/nextdns/Makefile      | 10 +++++++---
 dns/nextdns/pkg-deinstall |  4 ----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dns/nextdns/Makefile b/dns/nextdns/Makefile
index 073f5932279b..74903cf037fd 100644
--- a/dns/nextdns/Makefile
+++ b/dns/nextdns/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	nextdns
 PORTVERSION=	1.37.11
-PORTREVISION=	2
 DISTVERSIONPREFIX=	v
+PORTREVISION=	3
 CATEGORIES=	dns security
 
 MAINTAINER=	rs@nextdns.io
@@ -23,10 +23,14 @@ GH_TUPLE=	\
 		vishvananda:netlink:v1.1.0:vishvananda_netlink/vendor/github.com/vishvananda/netlink \
 		vishvananda:netns:2eb08e3e575f:vishvananda_netns/vendor/github.com/vishvananda/netns
 
-GO_TARGET=	.:${PREFIX}/sbin/nextdns
+GO_TARGET=	.:${PREFIX}/sbin/${PORTNAME}
 
 SUB_FILES=	pkg-message
 
-PLIST_FILES=	sbin/nextdns
+PLIST_FILES=	sbin/${PORTNAME} \
+		"@sample etc/${PORTNAME}.conf.sample"
+
+post-install:
+	@${STAGEDIR}${PREFIX}/sbin/${PORTNAME} config > ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
 
 .include <bsd.port.mk>
diff --git a/dns/nextdns/pkg-deinstall b/dns/nextdns/pkg-deinstall
index c67e487f45b0..0f9496f07f2f 100644
--- a/dns/nextdns/pkg-deinstall
+++ b/dns/nextdns/pkg-deinstall
@@ -6,8 +6,4 @@ fi
 
 ${PKG_PREFIX}/nextdns uninstall >/dev/null 2>/dev/null
 
-echo "==> If you are uninstalling nextdns permanently,"
-echo "    and you do *NOT* want to retain the configuration file,"
-echo "    you should manually delete ${PKG_PREFIX}/etc/nextdns.conf"
-
 exit 0