Index: head/audio/shoutcast/Makefile =================================================================== --- head/audio/shoutcast/Makefile (revision 289569) +++ head/audio/shoutcast/Makefile (revision 289570) @@ -1,79 +1,77 @@ # New ports collection makefile for: shoutcast # Date created: 15 January 2011 # Whom: Jarrod Sayers # # $FreeBSD$ # PORTNAME= shoutcast PORTVERSION= 2.0.b14 CATEGORIES= audio net MASTER_SITES= http://download.nullsoft.com/shoutcast/tools/ DISTNAME= sc_serv2_bsd_8_x_01_25_2011 MAINTAINER= jarrod@downtools.com.au COMMENT= SHOUTcast Distributed Network Audio Server RESTRICTED= redistribution of software is not permitted IA32_BINARY_PORT= yes USE_RC_SUBR= shoutcast CONFLICTS= linux-shoutcast-[0-9]* NO_WRKSUBDIR= yes NO_BUILD= yes SHOUTCASTUSER= ${PORTNAME} SHOUTCASTGROUP= ${PORTNAME} SHOUTCASTDIR= /var/run/${PORTNAME} PLIST_SUB= SHOUTCASTUSER=${SHOUTCASTUSER} \ SHOUTCASTGROUP=${SHOUTCASTGROUP} \ SHOUTCASTDIR=${SHOUTCASTDIR} SUB_FILES= pkg-message -SUB_LIST= ${PLIST_SUB} +SUB_LIST= SHOUTCASTUSER=${SHOUTCASTUSER} \ + SHOUTCASTGROUP=${SHOUTCASTGROUP} \ + SHOUTCASTDIR=${SHOUTCASTDIR} USERS= ${SHOUTCASTUSER} GROUPS= ${SHOUTCASTGROUP} .include - -.if ${OSVERSION} < 800000 -IGNORE= is for FreeBSD 8.x and later -.endif post-patch: @${REINPLACE_CMD} -e '/^logfile=.*\/logfile.log/d' \ -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 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/sc2_xml_metadata.txt ${DOCSDIR}/sc2_xml_metadata.txt ${INSTALL_DATA} ${WRKSRC}/docs/shoutcast_system_overview.txt ${DOCSDIR}/shoutcast_system_overview.txt .endif post-install: ${MKDIR} ${SHOUTCASTDIR} @${CHMOD} 0750 ${SHOUTCASTDIR} @${CHOWN} ${SHOUTCASTUSER}:${SHOUTCASTGROUP} ${SHOUTCASTDIR} @${CAT} ${PKGMESSAGE} .include Property changes on: head/audio/shoutcast/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.20 \ No newline at end of property +1.21 \ No newline at end of property Index: head/audio/shoutcast/files/shoutcast.in =================================================================== --- head/audio/shoutcast/files/shoutcast.in (revision 289569) +++ head/audio/shoutcast/files/shoutcast.in (revision 289570) @@ -1,45 +1,44 @@ #!/bin/sh -# + # $FreeBSD$ # - # PROVIDE: shoutcast # REQUIRE: LOGIN -# BEFORE: # KEYWORD: shutdown - # # Add the following lines to /etc/rc.conf to enable SHOUTcast: # shoutcast_enable (bool): Set to "NO" by default. # Set it to "YES" to enable SHOUTcast. # shoutcast_configfile (str): Set to "%%PREFIX%%/%%ETCDIR%%/sc_serv.conf" by default. -# +# shoutcast_user (str): Set to %%SHOUTCASTUSER%% by default +# shoutcast_chdir (str): Set to %%SHOUTCASTDIR%% by default . /etc/rc.subr -name="shoutcast" -rcvar=`set_rcvar` -shoutcast_logfile="/var/log/sc_serv.log" +name=shoutcast +rcvar=shoutcast_enable -start_cmd="shoutcast_startcmd" -stop_cmd="shoutcast_stopcmd" +load_rc_config shoutcast -[ -z "${shoutcast_enable}" ] && shoutcast_enable="NO" -[ -z "${shoutcast_configfile}" ] && shoutcast_configfile="%%PREFIX%%/%%ETCDIR%%/sc_serv.conf" +: ${shoutcast_enable:="NO"} +: ${shoutcast_user:="%%SHOUTCASTUSER%%"} +: ${shoutcast_chdir:="%%SHOUTCASTDIR%%"} -load_rc_config "${name}" +command="%%PREFIX%%/sbin/sc_serv" +shoutcast_logfile="/var/log/sc_serv.log" -required_files="${shoutcast_configfile}" +required_dirs="${shoutcast_chdir}" +required_files="${shoutcast_configfile:="%%PREFIX%%/%%ETCDIR%%/sc_serv.conf"}" -shoutcast_startcmd() { +command_args="${required_files} >/dev/null 2>&1 &" + +start_precmd="shoutcast_prestart" + +shoutcast_prestart() +{ touch ${shoutcast_logfile} chown %%SHOUTCASTUSER%%:wheel ${shoutcast_logfile} chmod 0640 ${shoutcast_logfile} - su %%SHOUTCASTUSER%% -c "cd %%SHOUTCASTDIR%% && %%PREFIX%%/sbin/sc_serv ${shoutcast_configfile} >/dev/null 2>&1 &" -} - -shoutcast_stopcmd() { - killall sc_serv } run_rc_command "$1" Property changes on: head/audio/shoutcast/files/shoutcast.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property