Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jul 2014 14:48:54 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362323 - in head/audio/musicpd: . files
Message-ID:  <201407201448.s6KEms7u088986@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Sun Jul 20 14:48:53 2014
New Revision: 362323
URL: http://svnweb.freebsd.org/changeset/ports/362323
QAT: https://qat.redports.org/buildarchive/r362323/

Log:
  Give up trying to make MPDDIR, and let pw useradd do it.  Stop making
  it customisable via make.conf; pointless with package installations.
  
  Modernise slightly.
  
  Correct IGNORE message-- there is no real problem with using .error here,
  but since it was mysteriously changed without notice assume that there was an
  extremely good reason for it.

Modified:
  head/audio/musicpd/Makefile
  head/audio/musicpd/files/musicpd.in
  head/audio/musicpd/files/pkg-message.in
  head/audio/musicpd/pkg-plist

Modified: head/audio/musicpd/Makefile
==============================================================================
--- head/audio/musicpd/Makefile	Sun Jul 20 14:44:10 2014	(r362322)
+++ head/audio/musicpd/Makefile	Sun Jul 20 14:48:53 2014	(r362323)
@@ -124,18 +124,12 @@ WAVPACK_LIB_DEPENDS=libwavpack.so:${PORT
 WILDMIDI_CONFIGURE_ENABLE=wildmidi
 WILDMIDI_LIB_DEPENDS=libWildMidi.so:${PORTSDIR}/audio/wildmidi
 
-MPDDIR?=	/var/mpd
 MPDUSER?=	mpd
 MPDGROUP?=	mpd
 
 USERS=	${MPDUSER}
 GROUPS=	${MPDGROUP}
 
-PLIST_SUB=	MPDUSER=${MPDUSER} \
-		MPDDIR=${MPDDIR}   \
-		MPDGROUP=${MPDGROUP}
-SUB_LIST+=	MPDDIR=${MPDDIR}
-
 .include <bsd.port.options.mk>
 
 .ifdef MPDCONF
@@ -143,7 +137,7 @@ IGNORE=Please remove the MPDCONF line fr
 .endif
 
 .if exists(${PREFIX}/etc/mpd.conf)
-MSG=You still have ${PREFIX}/etc/mpd.conf in existence-- this file is no longer used by musicpd.
+MSG=does not expect ${PREFIX}/etc/mpd.conf to exist.
 .if !exists(${PREFIX}/etc/musicpd.conf)
 IGNORE=${MSG}  Move it to ${PREFIX}/etc/musicpd.conf.
 .else
@@ -191,8 +185,8 @@ CONFIGURE_ARGS+=--disable-shout
 .endif
 
 post-patch:
-# Replace ~/ with MPDDIR and make musicpd run as mpd by default
-	@${REINPLACE_CMD} -e 's,^#\([^"]*"\)~/,\1${MPDDIR}/,g' \
+# Replace ~/ with /var/mpd and make musicpd run as mpd by default
+	@${REINPLACE_CMD} -e 's,^#\([^"]*"\)~/,\1/var/mpd,g' \
 		-e 's,^#\(user[^"]*"\)nobody,\1${MPDUSER},g' \
 		${WRKSRC}/doc/mpdconf.example
 # Uncomment OSS audio output part from MPDCONF; dragons!
@@ -227,16 +221,5 @@ do-install:
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}/${DOCSDIR}/
 	${INSTALL_DATA} ${WRKSRC}/doc/mpdconf.example \
 		${STAGEDIR}/${PREFIX}/etc/${PORTNAME}.conf.sample
-	${PRINTF} "%s\n%s\n%s\n" "@cwd /" "@owner ${MPDUSER}" \
-		"@group ${MPDGROUP}" >> ${TMPPLIST}
-	cd ${STAGEDIR} && ${MKDIR} -v ${MPDDIR:S,^/,,}/.mpd | ${SORT} -r | \
-		${SED} 's,^,@dirrmtry ,' >> ${TMPPLIST}
-.ifndef WITH_PKGNG
-	# Cute, we can't use @dirrmtry with pkg_old...
-	# Remove once all using pkgng
-	${REINPLACE_CMD} \
-		's,^@dirrmtry \(.*\),@unexec rmdir \1 > /dev/null || :,' \
-		${TMPPLIST}
-.endif
 
 .include <bsd.port.mk>

Modified: head/audio/musicpd/files/musicpd.in
==============================================================================
--- head/audio/musicpd/files/musicpd.in	Sun Jul 20 14:44:10 2014	(r362322)
+++ head/audio/musicpd/files/musicpd.in	Sun Jul 20 14:48:53 2014	(r362323)
@@ -30,7 +30,7 @@ musicpd_getpidfile()
 	if get_pidfile_from_conf pid_file %%PREFIX%%/etc/musicpd.conf ; then
 		pidfile="$_pidfile_from_conf"
 	else
-		pidfile="%%MPDDIR%%/.mpd/pid"
+		pidfile="/var/mpd/.mpd/pid"
 	fi
 }
 

Modified: head/audio/musicpd/files/pkg-message.in
==============================================================================
--- head/audio/musicpd/files/pkg-message.in	Sun Jul 20 14:44:10 2014	(r362322)
+++ head/audio/musicpd/files/pkg-message.in	Sun Jul 20 14:48:53 2014	(r362323)
@@ -17,7 +17,7 @@ Then start the server with
 or reboot.
 
 The example configuration of MPD server requires music files to
-be stored in the %%MPDDIR%%/music directory.
+be stored in the /var/mpd/music directory.
 
 NOTE: The musicpd server is pretty useless without a client.
       You might want to install one of the following ports too:

Modified: head/audio/musicpd/pkg-plist
==============================================================================
--- head/audio/musicpd/pkg-plist	Sun Jul 20 14:44:10 2014	(r362322)
+++ head/audio/musicpd/pkg-plist	Sun Jul 20 14:48:53 2014	(r362323)
@@ -1,6 +1,4 @@
 bin/musicpd
-@unexec if cmp -s %D/etc/musicpd.conf.sample %D/etc/musicpd.conf; then rm -f %D/etc/musicpd.conf; fi
-etc/musicpd.conf.sample
-@exec if [ ! -f %B/musicpd.conf ] ; then cp -p %D/%F %B/musicpd.conf; fi
+@sample etc/musicpd.conf.sample
 man/man1/musicpd.1.gz
 man/man5/musicpd.conf.5.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407201448.s6KEms7u088986>