git: f1fbe644d372 - main - mail/sendmail-devel: use ${PREFIX}/share/man

From: Dirk Meyer <dinoex_at_FreeBSD.org>
Date: Thu, 11 Jan 2024 18:01:14 UTC
The branch main has been updated by dinoex:

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

commit f1fbe644d372fcfb50c550b602e97f0e2a5f9398
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-01-11 18:00:48 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-01-11 18:00:48 +0000

    mail/sendmail-devel: use ${PREFIX}/share/man
---
 mail/sendmail/Makefile             | 17 ++++++++++-------
 mail/sendmail/files/site.config.m4 |  4 ++--
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile
index aa413a611cae..f6ae13074d6e 100644
--- a/mail/sendmail/Makefile
+++ b/mail/sendmail/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	sendmail
 PORTVERSION=	8.17.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.sendmail.org/pub/sendmail/
 DISTNAME=	${PORTNAME}.${PORTVERSION}
@@ -31,7 +31,7 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 DOCS=		KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
 		sendmail/TRACEFLAGS sendmail/SECURITY sendmail/TUNING
 PLIST_SUB+=	PREFIX=${PREFIX:S=${PREFIX}/==} \
-		MANPREFIX=${MANPREFIX:S=$=/=:S=${PREFIX}==:S=^/==}
+		MANPREFIX=${PREFIX}/share/
 SUB_FILES=	pkg-message
 
 WCONF=		${WRKSRC}/devtools/Site
@@ -217,7 +217,10 @@ post-build:
 	 ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} op.txt)
 
 pre-install:
-	${MKDIR} ${STAGEDIR}/etc/mail
+	${MKDIR} ${STAGEDIR}/etc/mail \
+		${STAGEDIR}${PREFIX}/share/man/cat1 \
+		${STAGEDIR}${PREFIX}/share/man/cat5 \
+		${STAGEDIR}${PREFIX}/share/man/cat8
 	@${CAT} ${PKGDIR}/pkg-plist >${PLIST}
 	@cd ${WRKSRC} && ${FIND} cf -type f | \
 	${AWK} '{print "share/sendmail/" $$1}' >>${PLIST}
@@ -244,18 +247,18 @@ post-install:
 	(cd ${WRKSRC}/rmail && \
 	 ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} force-install)
 .for i in ${LMAN8}
-	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${MANPREFIX}/man/man8/
+	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${PREFIX}/share/man/man8/
 .endfor
 .for i in ${LMAN5}
-	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${MANPREFIX}/man/man5/
+	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${PREFIX}/share/man/man5/
 .endfor
 .for i in ${LMAN1}
-	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${MANPREFIX}/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/*/${i} ${STAGEDIR}${PREFIX}/share/man/man1/
 .endfor
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/sendmail
 	${TAR} -C ${WRKSRC} -cf - cf | \
 		${TAR} -C ${STAGEDIR}${PREFIX}/share/sendmail -xf -
-	${RM} ${STAGEDIR}${PREFIX}/man/cat*/*
+	${RM} -rfv ${STAGEDIR}${PREFIX}/share/man/cat*
 # final perm of sendmail is 2555 (see plist), needed for strip cmd
 	${CHMOD} 755 ${STAGEDIR}${PREFIX}/sbin/sendmail
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/vacation
diff --git a/mail/sendmail/files/site.config.m4 b/mail/sendmail/files/site.config.m4
index 6fca36fdda64..bea3f87bc2c1 100644
--- a/mail/sendmail/files/site.config.m4
+++ b/mail/sendmail/files/site.config.m4
@@ -1,6 +1,6 @@
 define(`confEBINDIR',`%%PREFIX%%/libexec')
-define(`confMANROOT',`%%PREFIX%%/man/cat')
-define(`confMANROOTMAN',`%%PREFIX%%/man/man')
+define(`confMANROOT',`%%PREFIX%%/share/man/cat')
+define(`confMANROOTMAN',`%%PREFIX%%/share/man/man')
 define(`confMBINDIR',`%%PREFIX%%/sbin')
 define(`confSBINDIR',`%%PREFIX%%/sbin')
 define(`confUBINDIR',`%%PREFIX%%/bin')