git: 5a778c810be2 - main - textproc/bsd-spell: fix some paths

From: Craig Leres <leres_at_FreeBSD.org>
Date: Fri, 22 Aug 2025 16:53:07 UTC
The branch main has been updated by leres:

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

commit 5a778c810be28c930b99f31bf45945f00f888536
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2025-08-22 16:51:55 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2025-08-22 16:51:55 +0000

    textproc/bsd-spell: fix some paths
    
    The man page should use the same name as the executable (bspell).
    
    Obey PREFIX.
    
    While here fix minor portuadit and portfmt nits.
    
    PR:             288640
    Approved by:    gbe (maintainer timeout, 2 weeks)
---
 textproc/bsd-spell/Makefile  | 12 +++++++++---
 textproc/bsd-spell/pkg-plist |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/textproc/bsd-spell/Makefile b/textproc/bsd-spell/Makefile
index 4268e1be8157..5cac537f2704 100644
--- a/textproc/bsd-spell/Makefile
+++ b/textproc/bsd-spell/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	bsd-spell
-PORTREVISION=	2
 DISTVERSIONPREFIX=	v
-DISTVERSION=		1.0.1
+DISTVERSION=	1.0.1
+PORTREVISION=	3
 CATEGORIES=	textproc
 
 MAINTAINER=	gbe@FreeBSD.org
@@ -15,6 +15,12 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	gbergling
 GH_PROJECT=	bsdspell
 
+post-extract:
+	${REINPLACE_CMD} -e 's,/usr/share/,${PREFIX}/share/,' \
+	    ${WRKSRC}/usr.bin/spell/spell.sh ${WRKSRC}/usr.bin/spell/spell.1
+	${REINPLACE_CMD} -E -e 's,\<SPELL\>,B&,' -e 's,\<spell\>,b&,' \
+	    ${WRKSRC}/usr.bin/spell/spell.1
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/usr.bin/spell/spellprog ${STAGEDIR}${PREFIX}/libexec
 	${INSTALL_PROGRAM} ${WRKSRC}/usr.bin/deroff/deroff ${STAGEDIR}${PREFIX}/bin
@@ -26,7 +32,7 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/usr.bin/spell/special.math ${STAGEDIR}${PREFIX}/share/dict
 	${INSTALL_DATA} ${WRKSRC}/usr.bin/spell/stop ${STAGEDIR}${PREFIX}/share/dict
 
-	${INSTALL_MAN} ${WRKSRC}/usr.bin/spell/spell.1.gz ${STAGEDIR}${PREFIX}/share/man/man1
+	${INSTALL_MAN} ${WRKSRC}/usr.bin/spell/spell.1.gz ${STAGEDIR}${PREFIX}/share/man/man1/bspell.1.gz
 	${INSTALL_MAN} ${WRKSRC}/usr.bin/deroff/deroff.1.gz ${STAGEDIR}${PREFIX}/share/man/man1
 
 .include <bsd.port.mk>
diff --git a/textproc/bsd-spell/pkg-plist b/textproc/bsd-spell/pkg-plist
index 76edb9a3d79a..b54a61fe4b05 100644
--- a/textproc/bsd-spell/pkg-plist
+++ b/textproc/bsd-spell/pkg-plist
@@ -1,7 +1,7 @@
 libexec/spellprog
 bin/bspell
 bin/deroff
-share/man/man1/spell.1.gz
+share/man/man1/bspell.1.gz
 share/man/man1/deroff.1.gz
 share/dict/american
 share/dict/british