From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 29 02:30:10 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C47106566C for ; Sun, 29 Jan 2012 02:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 194198FC0A for ; Sun, 29 Jan 2012 02:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0T2UArT028299 for ; Sun, 29 Jan 2012 02:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0T2UAwf028295; Sun, 29 Jan 2012 02:30:10 GMT (envelope-from gnats) Resent-Date: Sun, 29 Jan 2012 02:30:10 GMT Resent-Message-Id: <201201290230.q0T2UAwf028295@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jarrod Sayers Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01B5106566C for ; Sun, 29 Jan 2012 02:20:17 +0000 (UTC) (envelope-from jarrod@burbank.downtools.com.au) Received: from mail.downtools.com.au (mail.downtools.com.au [123.136.33.243]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8CB8FC13 for ; Sun, 29 Jan 2012 02:20:16 +0000 (UTC) Received: from burbank.downtools.com.au (burbank.downtools.com.au [123.136.33.245]) by mail.downtools.com.au (8.14.4/8.14.4) with ESMTP id q0T2K5bR010259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 29 Jan 2012 12:50:06 +1030 (CST) (envelope-from jarrod@burbank.downtools.com.au) Received: from burbank.downtools.com.au (localhost [127.0.0.1]) by burbank.downtools.com.au (8.14.5/8.14.5) with ESMTP id q0T2K5bF010256; Sun, 29 Jan 2012 12:50:05 +1030 (CST) (envelope-from jarrod@burbank.downtools.com.au) Received: (from jarrod@localhost) by burbank.downtools.com.au (8.14.5/8.14.5/Submit) id q0T2K5KC010255; Sun, 29 Jan 2012 12:50:05 +1030 (CST) (envelope-from jarrod) Message-Id: <201201290220.q0T2K5KC010255@burbank.downtools.com.au> Date: Sun, 29 Jan 2012 12:50:05 +1030 (CST) From: Jarrod Sayers To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/164591: [maintainer-update] audio/shoutcast: Add support for Configuration Builder X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jarrod Sayers List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2012 02:30:10 -0000 >Number: 164591 >Category: ports >Synopsis: [maintainer-update] audio/shoutcast: Add support for Configuration Builder >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 Jan 29 02:30:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Jarrod Sayers >Release: FreeBSD 8.2-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD burbank.downtools.com.au 8.2-RELEASE-p5 FreeBSD 8.2-RELEASE-p5 #11: Tue Dec 27 18:00:01 CST 2011 root@burbank.downtools.com.au:/usr/obj/usr/src/sys/BURBANK i386 >Description: Update to 2.0.0.29_1. * Use USE_DOS2UNIX to remove ^M from documentation * Add support for the bundled configuration builder * Move default logging directory to PORTNAME specific one * Apply FreeBSD-specific patching to all example files (not just basic) * Move example files to EXAMPLESDIR and make optional * Remove dsp_sc plugin documentation * Reinstate required_dirs variable from rc.d script * Remove log file creation from rc.d script (no longer required) * Display clean-up warning on port deinstall (based on bsd.port.mk) Modified files: * ports/audio/shoutcast/Makefile * ports/audio/shoutcast/files/pkg-message.in * ports/audio/shoutcast/files/shoutcast.in * ports/audio/shoutcast/pkg-plist >How-To-Repeat: >Fix: Attached diff can be downloaded from: http://www.downtools.com.au/~jarrod/FreeBSD/audio-shoutcast-2.0.0.29_1.diff --- audio-shoutcast-2.0.0.29_1.diff begins here --- diff -ruN ports/audio/shoutcast.orig/Makefile ports/audio/shoutcast/Makefile --- ports/audio/shoutcast.orig/Makefile 2012-01-25 05:45:14.000000000 +1030 +++ ports/audio/shoutcast/Makefile 2012-01-29 12:19:33.000000000 +1030 @@ -7,6 +7,7 @@ PORTNAME= shoutcast PORTVERSION= 2.0.0.29 +PORTREVISION= 1 CATEGORIES= audio net MASTER_SITES= http://download.nullsoft.com/shoutcast/tools/ DISTNAME= sc_serv2_bsd_8_x_07_31_2011 @@ -17,18 +18,25 @@ RESTRICTED= redistribution of software is not permitted IA32_BINARY_PORT= yes +USE_DOS2UNIX= yes +DOS2UNIX_REGEX= .*\.(conf|css|html|js|txt|xml) + USE_RC_SUBR= shoutcast CONFLICTS= linux-shoutcast-[0-9]* NO_WRKSUBDIR= yes NO_BUILD= yes +OPTIONS= CONFIG_BUILDER "Install SHOUTcast Configuration Builder" off + SHOUTCASTUSER= ${PORTNAME} SHOUTCASTGROUP= ${PORTNAME} +SHOUTCASTLDIR= /var/log/${PORTNAME} SHOUTCASTDIR= /var/run/${PORTNAME} SHOUTCAST_SUB= SHOUTCASTUSER=${SHOUTCASTUSER} \ SHOUTCASTGROUP=${SHOUTCASTGROUP} \ + SHOUTCASTLDIR=${SHOUTCASTLDIR} \ SHOUTCASTDIR=${SHOUTCASTDIR} PLIST_SUB= ${SHOUTCAST_SUB} @@ -42,37 +50,73 @@ .include +.if defined(WITH_CONFIG_BUILDER) +PLIST_SUB+= CONFIG_BUILDER="" +.else +PLIST_SUB+= CONFIG_BUILDER="@comment " +.endif + post-patch: +.for _file in basic debug public relay simple @${REINPLACE_CMD} -e '/sc_serv2 directory/d' \ - -e 's#=.*/sc_serv.log#=/var/log/sc_serv.log#g' \ - -e 's#=.*/sc_w3c.log#=/var/log/sc_w3c.log#g' \ - -e 's#=control/#=${SHOUTCASTDIR}/#g' ${WRKSRC}/sc_serv_basic.conf + -e 's#=.*/\([^\.]*.log\)#=${SHOUTCASTLDIR}/\1#g' \ + -e 's#=control/#=${SHOUTCASTDIR}/#g' ${WRKSRC}/sc_serv_${_file}.conf +.endfor +.if defined(WITH_CONFIG_BUILDER) + @${REINPLACE_CMD} -e 's#<[^>]*>Windows<[^>]*>##g' \ + -e 's#<[^>]*>Macintosh<[^>]*>##g' ${WRKSRC}/config_builder/config_builder.html + @${REINPLACE_CMD} -e 's#\(LogFile="\)\([^"/]*\)#\1${SHOUTCASTLDIR}/\2#g' \ + -e 's#\(ConfFile="\)\([^"/]*\)#\1${ETCDIR}/\2#g' \ + -e 's#\(BanFile="\)\([^"/]*\)#\1${SHOUTCASTDIR}/\2#g' \ + -e 's#\(RipFile="\)\([^"/]*\)#\1${SHOUTCASTDIR}/\2#g' ${WRKSRC}/config_builder/js/config_builder.js +.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/sc_serv ${PREFIX}/sbin ${MKDIR} ${ETCDIR} - ${INSTALL_DATA} ${WRKSRC}/sc_serv_basic.conf ${ETCDIR}/sc_serv_basic.conf.sample - ${INSTALL_DATA} ${WRKSRC}/sc_serv_debug.conf ${ETCDIR}/sc_serv_debug.conf.sample - ${INSTALL_DATA} ${WRKSRC}/sc_serv_public.conf ${ETCDIR}/sc_serv_public.conf.sample - ${INSTALL_DATA} ${WRKSRC}/sc_serv_relay.conf ${ETCDIR}/sc_serv_relay.conf.sample - ${INSTALL_DATA} ${WRKSRC}/sc_serv_simple.conf ${ETCDIR}/sc_serv_simple.conf.sample .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/changes.txt ${DOCSDIR}/changes.txt - ${INSTALL_DATA} ${WRKSRC}/docs/crossdomain.xml ${DOCSDIR}/crossdomain.xml - ${INSTALL_DATA} ${WRKSRC}/docs/dsp_sc/dsp_sc.txt ${DOCSDIR}/dsp_sc.txt - ${INSTALL_DATA} ${WRKSRC}/docs/dsp_sc/dsp_sc_config.txt ${DOCSDIR}/dsp_sc_config.txt ${INSTALL_DATA} ${WRKSRC}/docs/getting_started.txt ${DOCSDIR}/getting_started.txt ${INSTALL_DATA} ${WRKSRC}/docs/sc_serv2.txt ${DOCSDIR}/sc_serv2.txt ${INSTALL_DATA} ${WRKSRC}/docs/sc_serv2_authhash.txt ${DOCSDIR}/sc_serv2_authhash.txt ${INSTALL_DATA} ${WRKSRC}/docs/sc_serv2_xml_responses.txt ${DOCSDIR}/sc_serv2_xml_responses.txt ${INSTALL_DATA} ${WRKSRC}/docs/shoutcast_system_overview.txt ${DOCSDIR}/shoutcast_system_overview.txt + ${INSTALL_DATA} ${WRKSRC}/tos.txt ${DOCSDIR}/tos.txt +.endif +.if !defined(NOPORTEXAMPLES) + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/crossdomain.xml ${EXAMPLESDIR}/crossdomain.xml + ${INSTALL_DATA} ${WRKSRC}/sc_serv_basic.conf ${EXAMPLESDIR}/sc_serv_basic.conf + ${INSTALL_DATA} ${WRKSRC}/sc_serv_debug.conf ${EXAMPLESDIR}/sc_serv_debug.conf + ${INSTALL_DATA} ${WRKSRC}/sc_serv_public.conf ${EXAMPLESDIR}/sc_serv_public.conf + ${INSTALL_DATA} ${WRKSRC}/sc_serv_relay.conf ${EXAMPLESDIR}/sc_serv_relay.conf + ${INSTALL_DATA} ${WRKSRC}/sc_serv_simple.conf ${EXAMPLESDIR}/sc_serv_simple.conf +.endif +.if defined(WITH_CONFIG_BUILDER) + ${MKDIR} ${WWWDIR}/config_builder + ${INSTALL_DATA} ${WRKSRC}/config_builder/config_builder.html ${WWWDIR}/config_builder/config_builder.html + ${MKDIR} ${WWWDIR}/config_builder/db + ${INSTALL_DATA} ${WRKSRC}/config_builder/db/config_builder_help.txt ${WWWDIR}/config_builder/db/config_builder_help.txt + ${MKDIR} ${WWWDIR}/config_builder/js + ${INSTALL_DATA} ${WRKSRC}/config_builder/js/config_builder.js ${WWWDIR}/config_builder/js/config_builder.js + ${INSTALL_DATA} ${WRKSRC}/config_builder/js/downloadify.js ${WWWDIR}/config_builder/js/downloadify.js + ${INSTALL_DATA} ${WRKSRC}/config_builder/js/mootools-1.3.js ${WWWDIR}/config_builder/js/mootools-1.3.js + ${INSTALL_DATA} ${WRKSRC}/config_builder/js/swfobject.js ${WWWDIR}/config_builder/js/swfobject.js + ${MKDIR} ${WWWDIR}/config_builder/res + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/collapse.png ${WWWDIR}/config_builder/res/collapse.png + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/config_builder.css ${WWWDIR}/config_builder/res/config_builder.css + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/dl_button.png ${WWWDIR}/config_builder/res/dl_button.png + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/downloadify.swf ${WWWDIR}/config_builder/res/downloadify.swf + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/expand.png ${WWWDIR}/config_builder/res/expand.png + ${INSTALL_DATA} ${WRKSRC}/config_builder/res/sc_logo.png ${WWWDIR}/config_builder/res/sc_logo.png .endif post-install: - ${MKDIR} ${SHOUTCASTDIR} - @${CHMOD} 0750 ${SHOUTCASTDIR} + ${MKDIR} ${SHOUTCASTDIR} ${SHOUTCASTLDIR} + @${CHMOD} 0750 ${SHOUTCASTDIR} ${SHOUTCASTLDIR} @${CHOWN} ${SHOUTCASTUSER}:${SHOUTCASTGROUP} ${SHOUTCASTDIR} + @${CHOWN} ${SHOUTCASTUSER}:wheel ${SHOUTCASTLDIR} @${CAT} ${PKGMESSAGE} .include diff -ruN ports/audio/shoutcast.orig/files/pkg-message.in ports/audio/shoutcast/files/pkg-message.in --- ports/audio/shoutcast.orig/files/pkg-message.in 2012-01-25 05:45:15.000000000 +1030 +++ ports/audio/shoutcast/files/pkg-message.in 2012-01-29 12:19:43.000000000 +1030 @@ -6,8 +6,8 @@ shoutcast_enable="YES" - Configuration templates are available in %%ETCDIR%% as - *.sample files. A basic installation can be completed by copying - sc_serv_basic.conf.sample to sc_serv.conf. + See %%EXAMPLESDIR%% for configuration examples. + A basic installation can be completed by copying sc_serv_basic.conf + to %%ETCDIR%%/sc_serv.conf. ********************************************************************** diff -ruN ports/audio/shoutcast.orig/files/shoutcast.in ports/audio/shoutcast/files/shoutcast.in --- ports/audio/shoutcast.orig/files/shoutcast.in 2012-01-25 05:45:15.000000000 +1030 +++ ports/audio/shoutcast/files/shoutcast.in 2012-01-29 12:19:44.000000000 +1030 @@ -12,8 +12,6 @@ # shoutcast_configfile (str): Set to "%%ETCDIR%%/sc_serv.conf" by default. # shoutcast_user (str): Set to "%%SHOUTCASTUSER%%" by default. # shoutcast_chdir (str): Set to "%%SHOUTCASTDIR%%" by default. -# shoutcast_logfile (str): Set to "/var/log/sc_serv.log" by default. -# shoutcast_w3clog (str): Set to "/var/log/sc_w3c.log" by default. . /etc/rc.subr @@ -26,22 +24,12 @@ : ${shoutcast_configfile:="%%ETCDIR%%/sc_serv.conf"} : ${shoutcast_user:="%%SHOUTCASTUSER%%"} : ${shoutcast_chdir:="%%SHOUTCASTDIR%%"} -: ${shoutcast_logfile:="/var/log/sc_serv.log"} -: ${shoutcast_w3clog:="/var/log/sc_w3c.log"} command="%%PREFIX%%/sbin/sc_serv" +required_dirs="${shoutcast_chdir}" required_files="${shoutcast_configfile}" command_args="${shoutcast_configfile} >/dev/null 2>&1 &" -start_precmd="shoutcast_prestart" - -shoutcast_prestart() -{ - touch "${shoutcast_logfile}" "${shoutcast_w3clog}" - chown %%SHOUTCASTUSER%%:wheel "${shoutcast_logfile}" "${shoutcast_w3clog}" - chmod 0640 "${shoutcast_logfile}" "${shoutcast_w3clog}" -} - run_rc_command "$1" diff -ruN ports/audio/shoutcast.orig/pkg-plist ports/audio/shoutcast/pkg-plist --- ports/audio/shoutcast.orig/pkg-plist 2012-01-25 05:45:14.000000000 +1030 +++ ports/audio/shoutcast/pkg-plist 2012-01-29 12:19:35.000000000 +1030 @@ -1,23 +1,45 @@ -@exec mkdir -p %%SHOUTCASTDIR%% -@exec chmod 0750 %%SHOUTCASTDIR%% +@exec mkdir -p %%SHOUTCASTDIR%% %%SHOUTCASTLDIR%% %%ETCDIR%% +@exec chmod 0750 %%SHOUTCASTDIR%% %%SHOUTCASTLDIR%% @exec chown %%SHOUTCASTUSER%%:%%SHOUTCASTGROUP%% %%SHOUTCASTDIR%% -%%ETCDIR%%/sc_serv_basic.conf.sample -%%ETCDIR%%/sc_serv_debug.conf.sample -%%ETCDIR%%/sc_serv_public.conf.sample -%%ETCDIR%%/sc_serv_relay.conf.sample -%%ETCDIR%%/sc_serv_simple.conf.sample +@exec chown %%SHOUTCASTUSER%%:wheel %%SHOUTCASTLDIR%% sbin/sc_serv %%PORTDOCS%%%%DOCSDIR%%/changes.txt -%%PORTDOCS%%%%DOCSDIR%%/crossdomain.xml -%%PORTDOCS%%%%DOCSDIR%%/dsp_sc.txt -%%PORTDOCS%%%%DOCSDIR%%/dsp_sc_config.txt %%PORTDOCS%%%%DOCSDIR%%/getting_started.txt %%PORTDOCS%%%%DOCSDIR%%/sc_serv2.txt %%PORTDOCS%%%%DOCSDIR%%/sc_serv2_authhash.txt %%PORTDOCS%%%%DOCSDIR%%/sc_serv2_xml_responses.txt %%PORTDOCS%%%%DOCSDIR%%/shoutcast_system_overview.txt +%%PORTDOCS%%%%DOCSDIR%%/tos.txt +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/crossdomain.xml +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sc_serv_basic.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sc_serv_debug.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sc_serv_public.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sc_serv_relay.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sc_serv_simple.conf +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/config_builder.html +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/db/config_builder_help.txt +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/js/config_builder.js +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/js/downloadify.js +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/js/mootools-1.3.js +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/js/swfobject.js +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/collapse.png +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/config_builder.css +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/dl_button.png +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/downloadify.swf +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/expand.png +%%CONFIG_BUILDER%%%%WWWDIR%%/config_builder/res/sc_logo.png @dirrmtry %%ETCDIR%% %%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +%%CONFIG_BUILDER%%@dirrm %%WWWDIR%%/config_builder/db +%%CONFIG_BUILDER%%@dirrm %%WWWDIR%%/config_builder/js +%%CONFIG_BUILDER%%@dirrm %%WWWDIR%%/config_builder/res +%%CONFIG_BUILDER%%@dirrm %%WWWDIR%%/config_builder +%%CONFIG_BUILDER%%@dirrm %%WWWDIR%% @unexec if [ ! -s %%SHOUTCASTDIR%%/sc_serv.ban ]; then rm -f %%SHOUTCASTDIR%%/sc_serv.ban; fi @unexec if [ ! -s %%SHOUTCASTDIR%%/sc_serv.rip ]; then rm -f %%SHOUTCASTDIR%%/sc_serv.rip; fi @unexec rmdir %%SHOUTCASTDIR%% 2>/dev/null || true +@unexec rmdir %%SHOUTCASTLDIR%% 2>/dev/null || true +@unexec if [ -d %D/%%ETCDIR%% ]; then echo "==> You should manually remove the "\""%D/%%ETCDIR%%"\"" directory."; fi +@unexec if [ -d %%SHOUTCASTDIR%% ]; then echo "==> You should manually remove the "\""%%SHOUTCASTDIR%%"\"" directory."; fi +@unexec if [ -d %%SHOUTCASTLDIR%% ]; then echo "==> You should manually remove the "\""%%SHOUTCASTLDIR%%"\"" directory."; fi --- audio-shoutcast-2.0.0.29_1.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: