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

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

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

commit da8c93e915ee19fd92ea6a4f8b6368c3db6bef74
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-01-11 18:02:20 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-01-11 18:02:20 +0000

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

diff --git a/mail/sendmail-devel/Makefile b/mail/sendmail-devel/Makefile
index cba3642cc08a..712f6fc35fb1 100644
--- a/mail/sendmail-devel/Makefile
+++ b/mail/sendmail-devel/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	sendmail
 PORTVERSION=	8.18.0.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.sendmail.org/pub/sendmail/snapshots/
 PKGNAMESUFFIX?=	-devel${PKGNAMESUFFIX2}
@@ -32,7 +32,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
@@ -225,7 +225,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}
@@ -252,18 +255,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-devel/files/site.config.m4 b/mail/sendmail-devel/files/site.config.m4
index 6fca36fdda64..bea3f87bc2c1 100644
--- a/mail/sendmail-devel/files/site.config.m4
+++ b/mail/sendmail-devel/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')