pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/musicpd Add an example logrotate configuration file



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a74aa5966d27
branches:  trunk
changeset: 770165:a74aa5966d27
user:      pho <pho%pkgsrc.org@localhost>
date:      Fri Nov 26 15:14:41 2021 +0000

description:
Add an example logrotate configuration file

mpd creates its own log file but doesn't rotate it on its own. It will
get huge if you listen to music all day and night.

diffstat:

 audio/musicpd/Makefile            |  9 ++++++---
 audio/musicpd/PLIST               |  3 ++-
 audio/musicpd/files/mpd.logrotate |  8 ++++++++
 3 files changed, 16 insertions(+), 4 deletions(-)

diffs (68 lines):

diff -r d4635c37efb8 -r a74aa5966d27 audio/musicpd/Makefile
--- a/audio/musicpd/Makefile    Fri Nov 26 12:23:23 2021 +0000
+++ b/audio/musicpd/Makefile    Fri Nov 26 15:14:41 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.253 2021/11/16 14:36:21 wiz Exp $
+# $NetBSD: Makefile,v 1.254 2021/11/26 15:14:41 pho Exp $
 
 DISTNAME=      mpd-0.23.4
+PKGREVISION=   1
 PKGNAME=       ${DISTNAME:S/mpd/musicpd/}
 CATEGORIES=    audio
 MASTER_SITES=  https://www.musicpd.org/download/mpd/${PKGVERSION_NOREV:R}/
@@ -68,7 +69,8 @@
 .endif
 
 EGDIR=         ${PREFIX}/share/examples/mpd
-CONF_FILES=    ${EGDIR}/mpd.conf ${PKG_SYSCONFDIR}/mpd.conf
+CONF_FILES+=   ${EGDIR}/mpd.conf ${PKG_SYSCONFDIR}/mpd.conf
+CONF_FILES+=   ${EGDIR}/logrotate.d/mpd ${PKG_SYSCONFDIR}/logrotate.d/mpd
 RCD_SCRIPTS=   mpd
 
 FILES_SUBST+=  MPD_USER=${MPD_USER:Q}
@@ -103,7 +105,7 @@
 SUBST_MESSAGE.sphinx=  Fixing sphinx binary name.
 SUBST_SED.sphinx+=     -e "s,sphinx-build,sphinx-build-${PYVERSSUFFIX},"
 
-INSTALLATION_DIRS=     ${EGDIR}
+INSTALLATION_DIRS=     ${EGDIR} ${EGDIR}/logrotate.d
 
 PYTHON_FOR_BUILD_ONLY= tool
 
@@ -115,6 +117,7 @@
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/mpd.conf ${DESTDIR}${EGDIR}
        ${INSTALL_DATA} ${WRKSRC}/doc/mpdconf.example ${DESTDIR}${EGDIR}
+       ${INSTALL_DATA} ${FILESDIR}/mpd.logrotate ${DESTDIR}${EGDIR}/logrotate.d/mpd
 
 .include "../../devel/meson/build.mk"
 BUILDLINK_API_DEPENDS.flac+=   flac>=1.2
diff -r d4635c37efb8 -r a74aa5966d27 audio/musicpd/PLIST
--- a/audio/musicpd/PLIST       Fri Nov 26 12:23:23 2021 +0000
+++ b/audio/musicpd/PLIST       Fri Nov 26 15:14:41 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2021/11/01 09:51:07 wiz Exp $
+@comment $NetBSD: PLIST,v 1.18 2021/11/26 15:14:41 pho Exp $
 bin/mpd
 man/man1/mpd.1
 man/man5/mpd.conf.5
@@ -42,6 +42,7 @@
 share/doc/mpd/html/search.html
 share/doc/mpd/html/searchindex.js
 share/doc/mpd/html/user.html
+share/examples/mpd/logrotate.d/mpd
 share/examples/mpd/mpd.conf
 share/examples/mpd/mpdconf.example
 share/icons/hicolor/scalable/apps/mpd.svg
diff -r d4635c37efb8 -r a74aa5966d27 audio/musicpd/files/mpd.logrotate
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/musicpd/files/mpd.logrotate Fri Nov 26 15:14:41 2021 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: mpd.logrotate,v 1.1 2021/11/26 15:14:41 pho Exp $
+
+/var/log/mpd.log {
+    missingok
+    notifempty
+    copytruncate
+    compress
+}



Home | Main Index | Thread Index | Old Index