git: 629c89d95134 - stable/13 - pkgbase: Create a FreeBSD-newsyslog package

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Wed, 05 Jan 2022 17:24:32 UTC
The branch stable/13 has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=629c89d951341c81691aa7886fa218c0702a8ebf

commit 629c89d951341c81691aa7886fa218c0702a8ebf
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2021-12-15 09:46:00 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-01-05 17:23:52 +0000

    pkgbase: Create a FreeBSD-newsyslog package
    
    This allow one to install it without having to install FreeBSD-utilities.
    While here put some newsyslog.d file in their own package.
    
    MFC after:      2 weeks
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D33456
    
    (cherry picked from commit 26ea904caae7e6be8394eb8ca94f282d99f63c8c)
---
 release/packages/Makefile.package            |  2 ++
 usr.sbin/newsyslog/Makefile                  |  2 ++
 usr.sbin/newsyslog/newsyslog.conf.d/Makefile | 22 ++++++++++++++++++----
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index 2356940828b0..2f90307cfda2 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -79,6 +79,8 @@ mlx-tools_COMMENT=	Mellanox Utilities
 mlx-tools_DESC=		Mellanox Utilities
 mtree_COMMENT=		MTREE Files
 mtree_DESC=		MTREE Files
+newsyslog_COMMENT=	Newsyslog Utility
+newsyslog_DESC=		Newsyslog Utility
 nfs_COMMENT=		NFS Utilities
 nfs_DESC= 		NFS Utilities
 openssl_COMMENT=	OpenSSL Library and Utility
diff --git a/usr.sbin/newsyslog/Makefile b/usr.sbin/newsyslog/Makefile
index 81237126afed..a0f933333320 100644
--- a/usr.sbin/newsyslog/Makefile
+++ b/usr.sbin/newsyslog/Makefile
@@ -2,6 +2,8 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	newsyslog
+
 CONFS=	newsyslog.conf
 PROG=	newsyslog
 MAN=	newsyslog.8 newsyslog.conf.5
diff --git a/usr.sbin/newsyslog/newsyslog.conf.d/Makefile b/usr.sbin/newsyslog/newsyslog.conf.d/Makefile
index 3974581ff57f..1c8980c2e383 100644
--- a/usr.sbin/newsyslog/newsyslog.conf.d/Makefile
+++ b/usr.sbin/newsyslog/newsyslog.conf.d/Makefile
@@ -2,12 +2,17 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	newsyslog
 CONFSDIR=	/etc/newsyslog.conf.d
 
+CONFGROUPS=	CONFS
 CONFS=
 
 .if ${MK_FTP} != "no"
-CONFS+=		ftp.conf
+CONFGROUPS+=	FTP
+FTP+=		ftp.conf
+FTPPACKAGE=	ftpd
+FTPDIR=		/etc/newsyslog.conf.d
 .endif
 
 .if ${MK_LPR} != "no"
@@ -19,15 +24,24 @@ CONFS+=		opensm.conf
 .endif
 
 .if ${MK_PF} != "no"
-CONFS+=		pf.conf
+CONFGROUPS+=	PF
+PF+=		pf.conf
+PFPACKAGE=	pf
+PFDIR=		/etc/newsyslog.conf.d
 .endif
 
 .if ${MK_PPP} != "no"
-CONFS+=		ppp.conf
+CONFGROUPS+=	PPP
+PPP+=		ppp.conf
+PPPPACKAGE=	ppp
+PPPDIR=		/etc/newsyslog.conf.d
 .endif
 
 .if ${MK_SENDMAIL} != "no"
-CONFS+=		sendmail.conf
+CONFGROUPS+=		SENDMAIL
+SENDMAIL+=		sendmail.conf
+SENDMAILPACKAGE=	sendmail
+SENDMAILDIR=		/etc/newsyslog.conf.d
 .endif
 
 .include <bsd.prog.mk>