aboutsummaryrefslogtreecommitdiff
path: root/audio/squeezeboxserver
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2008-06-24 16:10:23 +0000
committerBrooks Davis <brooks@FreeBSD.org>2008-06-24 16:10:23 +0000
commit7952d5226b6af1989a293c5d769fb1d6ea394c7b (patch)
treee124a78f66262683cac5a20b0768f9145bd90ebf /audio/squeezeboxserver
parent0b807d701e7d7ec656a5ed93864ddfc6d725d18c (diff)
downloadports-7952d5226b6af1989a293c5d769fb1d6ea394c7b.tar.gz
ports-7952d5226b6af1989a293c5d769fb1d6ea394c7b.zip
Remove most bare references to "squeezecenter" in files subject to
substitution. Now I'm ready for what ever they decide to call 8.0. :) This also fixes the newsyslog.conf entry created by pkg-install. Reported by: Tim Bishop <tim at bishnet dot net> (newsyslog.conf)
Notes
Notes: svn path=/head/; revision=215711
Diffstat (limited to 'audio/squeezeboxserver')
-rw-r--r--audio/squeezeboxserver/Makefile3
-rw-r--r--audio/squeezeboxserver/files/pkg-install.in14
-rw-r--r--audio/squeezeboxserver/files/squeezecenter.sh.in28
3 files changed, 23 insertions, 22 deletions
diff --git a/audio/squeezeboxserver/Makefile b/audio/squeezeboxserver/Makefile
index e77ab376f6f4..f7c34b4529db 100644
--- a/audio/squeezeboxserver/Makefile
+++ b/audio/squeezeboxserver/Makefile
@@ -7,7 +7,7 @@
PORTNAME= squeezecenter
PORTVERSION= 7.0.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= audio
MASTER_SITES= http://www.slimdevices.com/downloads/SqueezeCenter_v${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-noCPAN
@@ -113,6 +113,7 @@ PLIST_SUB= SLIMDIR=${SLIMDIR}
SUB_FILES= softsqueeze.sh pkg-install
SUB_LIST= PERL=${PERL} \
+ PORTNAME=${PORTNAME} \
SLIMDIR=${SLIMDIR} \
SLIMDBDIR=${SLIMDBDIR} \
SLIMUSER=${SLIMUSER} \
diff --git a/audio/squeezeboxserver/files/pkg-install.in b/audio/squeezeboxserver/files/pkg-install.in
index 4f4f0b53766b..9abd91af165c 100644
--- a/audio/squeezeboxserver/files/pkg-install.in
+++ b/audio/squeezeboxserver/files/pkg-install.in
@@ -1,7 +1,7 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.6 2008-04-30 23:18:04 brooks Exp $
+# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.7 2008-06-24 16:10:23 brooks Exp $
-name=slimserver
+name=%%PORTNAME%%
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
ugid=104
@@ -11,13 +11,13 @@ comment="Slim Devices SlimServer/SqueezeCenter pseudo-user"
slimdir="%%PREFIX%%/%%SLIMDIR%%"
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
-conffile=${statedir}/squeezecenter.conf
+conffile=${statedir}/${name}.conf
playlistdir=${statedir}/playlists
pidfile=/var/run/${name}/${name}.pid
newsyslogfile=/etc/newsyslog.conf
-logcomment="# added by audio/squeezecenter port"
-serverlogfile=/var/log/squeezecenter/server.log
-scannerlogfile=/var/log/squeezecenter/scanner.log
+logcomment="# added by audio/${name} port"
+serverlogfile=/var/log/${name}/server.log
+scannerlogfile=/var/log/${name}/scanner.log
serverlogline="${serverlogfile} ${u}:${g} 644 3 100 * J ${pidfile}"
scannerlogline="${scannerlogfile} ${u}:${g} 644 3 100 * J ${pidfile}"
@@ -49,7 +49,7 @@ POST-INSTALL)
if egrep -q "^${serverlogfile}\>" ${newsyslogfile}; then
echo "Using existing ${newsyslogfile} entry."
else
- echo "Adding squeezecenter log entry to ${newsyslogfile}."
+ echo "Adding ${name} log entry to ${newsyslogfile}."
echo "$logcomment" >> ${newsyslogfile}
echo "$serverlogline" >> ${newsyslogfile}
echo "$scannerlogline" >> ${newsyslogfile}
diff --git a/audio/squeezeboxserver/files/squeezecenter.sh.in b/audio/squeezeboxserver/files/squeezecenter.sh.in
index 9b4a6f2687dc..a0292bd4c382 100644
--- a/audio/squeezeboxserver/files/squeezecenter.sh.in
+++ b/audio/squeezeboxserver/files/squeezecenter.sh.in
@@ -3,39 +3,39 @@
# $FreeBSD$
#
-# PROVIDE: squeezecenter
+# PROVIDE: %%PORTNAME%%
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
-# Add the following lines to /etc/rc.conf to enable squeezecenter:
+# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%:
#
-#squeezecenter_enable="YES"
+#%%PORTNAME%%_enable="YES"
#
. %%RC_SUBR%%
-name=squeezecenter
-start_precmd="squeezecenter_start_precmd"
-stop_postcmd="squeezecenter_stop_postcmd"
+name=%%PORTNAME%%
+start_precmd="%%PORTNAME%%_start_precmd"
+stop_postcmd="%%PORTNAME%%_stop_postcmd"
rcvar=`set_rcvar`
command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl
command_interpreter=%%PERL%%
pidfile=/var/run/${name}/${name}.pid
-logdir=/var/log/squeezecenter
+logdir=/var/log/%{name}
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
prefsdir=${statedir}/prefs
playlistdir=${statedir}/playlists
-conffile=${statedir}/squeezecenter.conf
+conffile=${statedir}/%{name}.conf
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
command_args="--daemon --prefsfile=${conffile} --pidfile=${pidfile}"
-squeezecenter_user=${u}
-squeezecenter_group=${g}
+%%PORTNAME%%_user=${u}
+%%PORTNAME%%_group=${g}
-squeezecenter_start_precmd()
+%%PORTNAME%%_start_precmd()
{
mkdir -p /var/run/${name}
chown -R ${u}:${g} /var/run/${name}
@@ -56,7 +56,7 @@ squeezecenter_start_precmd()
fi
}
-squeezecenter_stop_postcmd()
+%%PORTNAME%%_stop_postcmd()
{
pids=`pgrep -u $u`
if [ -n "${pids}" ]; then
@@ -71,7 +71,7 @@ squeezecenter_stop_postcmd()
load_rc_config ${name}
-squeezecenter_enable=${squeezecenter_enable:-"NO"}
-squeezecenter_flags=${squeezecenter_flags:-""}
+%%PORTNAME%%_enable=${%%PORTNAME%%_enable:-"NO"}
+%%PORTNAME%%_flags=${%%PORTNAME%%_flags:-""}
run_rc_command "$1"