ports/156625: [MAINTAINER] Fix port: audio/musicpd Add avahi OPTION & resolve CONFLICT
Chris Rees
utisoft at gmail.com
Sun Apr 24 21:10:14 UTC 2011
>Number: 156625
>Category: ports
>Synopsis: [MAINTAINER] Fix port: audio/musicpd Add avahi OPTION & resolve CONFLICT
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 24 21:10:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Chris Rees
>Release: FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Sun Feb 27 22:19:51 UTC 2011 root at zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386
>Description:
>How-To-Repeat:
>Fix:
- Add OPTION for avahi, stop autoactivating
- Rename binary to musicpd, removing CONFLICT
Submitted by: Chris Rees (utisoft_at_gmail.com) (maintainer)
Also, to fix sonata and mpdbrowser's dependencies, patches at [1] and
[2] (maintainers CC'd)
[3] is a patch to mpich2, which has the conflict removed (also passing
maintainership to me)
[1] http://www.bayofrum.net/~crees/patches/sonata-mpdname.diff
[2] http://www.bayofrum.net/~crees/patches/mpdbrowser-mpdname.diff
[3] http://www.bayofrum.net/~crees/patches/mpich2-conflict-remove.diff
--- musicpd-avahi.diff begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/Makefile,v
retrieving revision 1.62
diff -u -r1.62 Makefile
--- Makefile 20 Mar 2011 21:28:56 -0000 1.62
+++ Makefile 24 Apr 2011 20:52:10 -0000
@@ -7,6 +7,7 @@
PORTNAME= musicpd
PORTVERSION= 0.16.2
+PORTREVISION= 1
CATEGORIES= audio ipv6
MASTER_SITES= SF/${PORTNAME}/mpd/${PORTVERSION}
DISTNAME= mpd-${PORTVERSION}
@@ -19,8 +20,6 @@
LICENSE= GPLv2
-CONFLICTS_INSTALL= mpich2-[1-9]*
-
USE_GMAKE= yes
USE_BZIP2= yes
GNU_CONFIGURE= yes
@@ -32,16 +31,17 @@
CFLAGS+= -I${PREFIX}/include
-MAN1= mpd.1
-MAN5= mpd.conf.5
+MAN1= ${PORTNAME}.1
+MAN5= ${MPDCONF}.5
-DOCSDIR= ${PREFIX}/share/doc/mpd
-PORTDOCS= mpdconf.example AUTHORS README COPYING NEWS UPGRADING
+DOCSDIR?= ${PREFIX}/share/doc/mpd
+PORTDOCS= AUTHORS README COPYING NEWS UPGRADING
SUB_FILES= pkg-message
OPTIONS= ID3TAG "Support ID3 v1/v2 tags" on \
IPV6 "Support IPv6 protocol" on \
+ AVAHI "Support Zeroconf through Avahi" off \
FLAC "Support FLAC audio format" on \
VORBIS "Support OGG Vorbis audio format" on \
WAV "Support WAV audio format" on \
@@ -188,6 +188,13 @@
CONFIGURE_ARGS+=--disable-ipv6
.endif
+.if defined(WITHOUT_AVAHI)
+CONFIGURE_ARGS+=--with-zeroconf=no
+.else
+CONFIGURE_ARGS+=--with-zeroconf=avahi
+LIB_DEPENDS+= avahi-client.3:${PORTSDIR}/net/avahi-app
+.endif
+
.if defined(WITH_AO)
CONFIGURE_ARGS+=--enable-ao
LIB_DEPENDS+= ao.4:${PORTSDIR}/audio/libao
@@ -229,15 +236,29 @@
@${REINPLACE_CMD} -e 's,^#\([^"]*"\)~/,\1${MPDDIR}/,g' \
-e 's,^#\(user[^"]*"\)nobody,\1${MPDUSER},g' \
${WRKSRC}/doc/mpdconf.example
+# Fix man pages for executable names
+ @${REINPLACE_CMD} -e 's/^\(\.B m\)/\1usic/' \
+ -e 's#^\(\.BI \)/etc/mpd.conf#\1${PREFIX}/etc/${MPDCONF}#' \
+ -e 's#^mpd.conf#${MPDCONF}#' \
+ -e 's#^mpd(1)#musicpd(1)#' \
+ ${WRKSRC}/doc/mpd.1 ${WRKSRC}/doc/mpd.conf.5
.if (${OSVERSION} < 800000)
${REINPLACE_CMD} -e 's/nan[f]\{0,1\}(\"\")/NAN/g' \
${WRKSRC}/src/crossfade.c \
${WRKSRC}/src/player_thread.c \
${WRKSRC}/src/player_control.c
.endif
-.if defined(NOPORTDOCS)
- @${REINPLACE_CMD} -e 's|install-docDATA ||' \
- ${WRKSRC}/Makefile.in
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/src/mpd ${PREFIX}/bin/${PORTNAME}
+ @${INSTALL_MAN} ${WRKSRC}/doc/mpd.1 ${MAN1PREFIX}/man/man1/${PORTNAME}.1
+ @${INSTALL_MAN} ${WRKSRC}/doc/mpd.conf.5 \
+ ${MAN5PREFIX}/man/man5/${MPDCONF}.5
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+. for doc in ${PORTDOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}/
+. endfor
.endif
post-install:
Index: pkg-plist
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/pkg-plist,v
retrieving revision 1.8
diff -u -r1.8 pkg-plist
--- pkg-plist 25 Jul 2010 02:48:54 -0000 1.8
+++ pkg-plist 24 Apr 2011 20:52:10 -0000
@@ -1,5 +1,5 @@
-bin/mpd
- at dirrmtry var/mpd
+ at stopdaemon musicpd
+bin/musicpd
@unexec if cmp -s %D/etc/%%MPDCONF%%.sample %D/etc/%%MPDCONF%%; then rm -f %D/etc/%%MPDCONF%%; fi
etc/%%MPDCONF%%.sample
@exec if [ ! -f %D/etc/%%MPDCONF%% ] ; then cp -p %D/%F %B/%%MPDCONF%%; fi
Index: files/musicpd.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/files/musicpd.in,v
retrieving revision 1.6
diff -u -r1.6 musicpd.in
--- files/musicpd.in 3 Feb 2011 20:19:41 -0000 1.6
+++ files/musicpd.in 24 Apr 2011 20:52:10 -0000
@@ -3,7 +3,7 @@
# $FreeBSD: ports/audio/musicpd/files/musicpd.in,v 1.6 2011/02/03 20:19:41 bapt Exp $
#
# PROVIDE: musicpd
-# REQUIRE: mixer LOGIN
+# REQUIRE: mixer LOGIN avahi_daemon
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable mpd:
@@ -17,7 +17,7 @@
stop_cmd="${name}_stop"
config=%%PREFIX%%/etc/%%MPDCONF%%
-command=%%PREFIX%%/bin/mpd
+command=%%PREFIX%%/bin/musicpd
required_files=$config
musicpd_stop()
--- musicpd-avahi.diff ends here ---
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list