ports/94248: [PATCH] net/xbms: UNBREAk (fix fetch) + other fixes
Ion-Mihai IOnut Tetcu
itetcu at people.tecnik93.com
Wed Mar 8 22:50:05 UTC 2006
>Number: 94248
>Category: ports
>Synopsis: [PATCH] net/xbms: UNBREAk (fix fetch) + other fixes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 08 22:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Ion-Mihai "IOnut" Tetcu
>Release: FreeBSD 6.1-PRERELEASE i386
>Organization:
Tecnik'93
>Environment:
System: FreeBSD 6.1-PRERELEASE #0: Fri Feb 24 07:01:54 EET 2006
root at it.buh.tecnik93.com:/usr/obj/usr/src/sys/IT6_B_P
>Description:
Fix MASTER_SITES. [1]
Dop USE_REINPPLACE.
USE_RC_SUBR and provide rc.d compatible script (deleted: files/xbms.sh.sample, added files/xbms.in).
Install .conf file if not already present and deinstall it if not modified by user.
Tested on 4,5,6,7 -STABLE tinderbox.
Reported by: fenner's distfile survey [1]
>How-To-Repeat:
>Fix:
--- xbms.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/xbms/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile 20 Jan 2006 15:50:35 -0000 1.6
+++ Makefile 8 Mar 2006 22:37:08 -0000
@@ -7,14 +7,15 @@
PORTNAME= xbms
PORTVERSION= 0.30.6
+PORTREVISION= 1
CATEGORIES= net
-MASTER_SITES= http://wipux2.wifo.uni-mannheim.de/~ck/
-DISTNAME= ${PORTNAME}_${PORTVERSION}
+MASTER_SITES= http://www.xboxmediaplayer.de/downloads/
+DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= ports at FreeBSD.org
COMMENT= Xbms, the unix streaming server for xbox mediaplayer
-USE_REINPLACE= yes
+USE_RC_SUBR= ${PORTNAME}
post-patch:
${REINPLACE_CMD} -e 's|@@PREFIX@@|${PREFIX}|g' ${WRKSRC}/server.c
@@ -22,6 +23,9 @@
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xbms ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/xbms.conf ${PREFIX}/etc/xbms.conf.sample
- ${INSTALL_DATA} ${FILESDIR}/xbms.sh.sample ${PREFIX}/etc/rc.d/xbms.sh.sample
+ @if ! [ -f ${PREFIX}/etc/xbms.conf ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/xbms.conf ${PREFIX}/etc/ ; \
+ fi
+
.include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/xbms/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist 8 Oct 2003 20:39:57 -0000 1.2
+++ pkg-plist 8 Mar 2006 22:37:08 -0000
@@ -1,4 +1,4 @@
@comment $FreeBSD: ports/net/xbms/pkg-plist,v 1.2 2003/10/08 20:39:57 naddy Exp $
bin/xbms
+ at unexec if cmp -s %D/etc/xbms.conf %D/etc/xbms.conf.sample; then rm -f %D/etc/xbms.conf; fi
etc/xbms.conf.sample
-etc/rc.d/xbms.sh.sample
Index: files/xbms.in
===================================================================
RCS file: files/xbms.in
diff -N files/xbms.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/xbms.in 8 Mar 2006 22:37:08 -0000
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# PROVIDE: xbms
+# REQUIRE: LOGIN
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# xbms_enable (bool): Set to NO by default.
+# Set it to YES to enable doormand.
+#
+
+. %%RC_SUBR%%
+
+name="xbms"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.pid
+required_files=%%PREFIX%%/etc/$[name}.conf
+
+load_rc_config $name
+
+: ${xbms_enable="NO"}
+
+run_rc_command "$1"
Index: files/xbms.sh.sample
===================================================================
RCS file: files/xbms.sh.sample
diff -N files/xbms.sh.sample
--- files/xbms.sh.sample 10 Oct 2003 06:56:17 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# Start or stop the xbms server
-#
-# $FreeBSD: ports/net/xbms/files/xbms.sh.sample,v 1.2 2003/10/10 06:56:17 krion Exp $
-
-pidfile="/var/run/xbms.pid"
-name="xbms"
-
-case "$1" in
- start)
- echo -n " xbms"
- if [ -f /usr/local/etc/xbms.conf ]; then
- /usr/local/bin/xbms
- fi
- ;;
-
- stop)
- if [ ! -f /var/run/xbms.pid ]; then
- echo "XBMS not running"
- exit 64
- fi
- kill `cat /var/run/xbms.pid`
- ;;
-status)
- ps -auxww | egrep ${name} | egrep -v "($0|egrep)"
- ;;
-
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop | status}"
- echo ""
- exit 64
- ;;
-esac
--- xbms.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list