git: 7267b89b7488 - main - sysutils/nut: Install nut-usb.conf

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 06 Apr 2023 21:49:36 UTC
The branch main has been updated by cy:

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

commit 7267b89b748860bd8dbca6d8682ebb3a541892df
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2023-04-06 21:40:54 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-04-06 21:45:49 +0000

    sysutils/nut: Install nut-usb.conf
    
    devd fails to change UPS device node ownership because the nut port
    fails to install ${LOCALBASE}/etc/devd/nut-usb.conf. Install it.
    
    Reported by:    Kostas Oikonomou <ko56 _AT_ winlab.rutgers.edu>
    MFH:            2023Q2
---
 sysutils/nut/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile
index 3dcc437aecb1..e9b3a93efe10 100644
--- a/sysutils/nut/Makefile
+++ b/sysutils/nut/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	nut
 PORTVERSION=	2.8.0
-PORTREVISION=	22
+PORTREVISION=	23
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
 
@@ -125,6 +125,9 @@ post-patch:
 
 pre-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nut
+.if ${PORT_OPTIONS:MUSB}
+	@${REINPLACE_CMD} -e 's/device-name\*/cdev/g' ${WRKSRC}/scripts/devd/nut-usb.conf
+.endif
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${STATEDIR}