git: 3e774cb07c9b - main - mail/postsrsd: add missing files and variables

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Fri, 22 Sep 2023 05:07:54 UTC
The branch main has been updated by fuz:

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

commit 3e774cb07c9bb3a4fc28ad8d69c009c123fe3714
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2023-09-19 17:08:25 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-22 04:54:46 +0000

    mail/postsrsd: add missing files and variables
    
    This fixes an issue where postsrsd would fail to start.
    
    Reported by:    Javier Sturman <sturmanj@gmail.com>
    PR:             273787
---
 mail/postsrsd/Makefile          | 7 ++++++-
 mail/postsrsd/files/postsrsd.in | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/mail/postsrsd/Makefile b/mail/postsrsd/Makefile
index cf906a7d0d4a..bf7cd417785b 100644
--- a/mail/postsrsd/Makefile
+++ b/mail/postsrsd/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	postsrsd
-PORTVERSION=	2.0.8
+DISTVERSION=	2.0.8
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	mail
 
@@ -32,6 +33,7 @@ SUB_FILES=	pkg-message
 
 PLIST_FILES=	\
 		sbin/postsrsd \
+		"@sample ${ETCDIR}.conf.sample" \
 		"@dir /var/db/${PORTNAME}"
 
 PORTDOCS=	CHANGELOG.rst README.rst postsrsd.conf
@@ -48,4 +50,7 @@ SQLITE_DESC=	Use sqlite3 backebd for storing envelope senders
 SQLITE_USES=	sqlite
 SQLITE_CMAKE_BOOL=	WITH_SQLITE
 
+post-install:
+		${INSTALL_DATA} ${WRKSRC}/doc/postsrsd.conf ${STAGEDIR}${PREFIX}/etc/postsrsd.conf.sample
+
 .include <bsd.port.mk>
diff --git a/mail/postsrsd/files/postsrsd.in b/mail/postsrsd/files/postsrsd.in
index a4625245439c..1e0617568447 100644
--- a/mail/postsrsd/files/postsrsd.in
+++ b/mail/postsrsd/files/postsrsd.in
@@ -13,6 +13,7 @@
 # postsrsd_enable (bool):   Set to "NO" by default.
 #                           Set it to "YES" to enable postsrsd.
 # postsrsd_uid (str):       Set username to run postsrsd.
+# postsrsd_secret (str):    Secret file file. See postsrsd(8)
 # postsrsd_flags (str):     Flags passed to start command.
 
 . /etc/rc.subr
@@ -33,6 +34,7 @@ load_rc_config $name
 #
 : ${postsrsd_enable="NO"}
 : ${postsrsd_uid="mailnull"}
+: ${postsrsd_secret="%%PREFIX%%/etc/postsrsd.secret"}
 
 # Options other than above can be set with $postsrsd_flags.
 # see postsrsd documentation for detail.