aboutsummaryrefslogtreecommitdiffstats
path: root/audio/squeezecenter
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2007-01-19 08:19:39 +0800
committerbrooks <brooks@FreeBSD.org>2007-01-19 08:19:39 +0800
commit1401d8a6d937753554faedcf4e72f9217f4627ca (patch)
tree256fece53b588588cbdd2e4f680fc09e5b014384 /audio/squeezecenter
parent2a9e3dd99410935069148aa68fe5567d6fd57f2a (diff)
downloadfreebsd-ports-gnome-1401d8a6d937753554faedcf4e72f9217f4627ca.tar.gz
freebsd-ports-gnome-1401d8a6d937753554faedcf4e72f9217f4627ca.tar.zst
freebsd-ports-gnome-1401d8a6d937753554faedcf4e72f9217f4627ca.zip
Upgrade to slimserver 6.5.1. Mostly minor improvements. See the
release notes for details http://www.slimdevices.com/Changelog6.html. Fix a longstanding bug that caused mDNS support to not actually work. Take advantage of improvements in rc.subr to reduce the amount of code in the shutdown path including removing the pgrep dependancy.
Diffstat (limited to 'audio/squeezecenter')
-rw-r--r--audio/squeezecenter/Makefile30
-rw-r--r--audio/squeezecenter/distinfo6
-rw-r--r--audio/squeezecenter/files/patch-Bin_build-perl-modules.pl12
-rw-r--r--audio/squeezecenter/files/patch-Slim_Networking_mDNS.pm22
-rw-r--r--audio/squeezecenter/files/patch-Slim_Utils_Misc.pm6
-rw-r--r--audio/squeezecenter/files/slimserver.sh.in36
-rw-r--r--audio/squeezecenter/files/squeezecenter.sh.in36
7 files changed, 77 insertions, 71 deletions
diff --git a/audio/squeezecenter/Makefile b/audio/squeezecenter/Makefile
index aad1989db748..53a010cae1cc 100644
--- a/audio/squeezecenter/Makefile
+++ b/audio/squeezecenter/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= slimserver
-PORTVERSION= 6.5.0
+PORTVERSION= 6.5.1
CATEGORIES= audio
MASTER_SITES= http://www.slimdevices.com/downloads/SlimServer_v${PORTVERSION}/
DISTNAME= SlimServer_v${PORTVERSION}.no-cpan-arch
@@ -80,13 +80,6 @@ RUN_DEPENDS+= oggdec:${PORTSDIR}/audio/vorbis-tools
IGNORE= perl 5.8.3 or newer required. Install lang/perl5.8 and try again
.endif
-.if ${OSVERSION} < 502110
-RUN_DEPENDS+= {LOCALBASE}/bin/pgrep:${PORTSDIR}/sysutils/pkill
-PGREPBASE= ${LOCALBASE}
-.else
-PGREPBASE= /usr
-.endif
-
USE_RC_SUBR= slimserver.sh
TMP_SLIMDIR= ${WRKDIR}/slimserver
TMP_DOCSDIR= ${WRKDIR}/doc
@@ -103,8 +96,9 @@ PLIST_SUB= SLIMDIR=${SLIMDIR}
PLIST_FILES= bin/softsqueeze
SUB_FILES= softsqueeze.sh pkg-install
-SUB_LIST= PGREPBASE=${PGREPBASE} \
+SUB_LIST= PERL=${PERL} \
SLIMDIR=${SLIMDIR} \
+ SLIMDBDIR=${SLIMDBDIR} \
CONFFILES="${CONFFILES}"
pre-fetch:
@@ -115,6 +109,7 @@ pre-fetch:
.endif
SLIMDIR?= slimserver
+SLIMDBDIR= /var/db/slimserver
post-fetch:
.for _PKG in ${SLIMCPANPKGS}
@@ -128,7 +123,12 @@ post-patch:
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|' \
-e 's|%%CPANWRKDIR%%|${CPANWRKDIR}|' \
- -e 's|%%DISTDIR%%|${_DISTDIR}|' ${WRKSRC}/Bin/build-perl-modules.pl
+ -e 's|%%DISTDIR%%|${_DISTDIR}|' \
+ ${WRKSRC}/Bin/build-perl-modules.pl
+ @${REINPLACE_CMD} \
+ -e 's|/usr/bin/perl|${PERL}|' \
+ ${WRKSRC}/scanner.pl ${WRKSRC}/slimserver.pl
+ @${RM} ${WRKSRC}/scanner.pl.bak ${WRKSRC}/slimserver.pl.bak
do-build:
@${MKDIR} -m 0755 ${TMP_SLIMDIR}
@@ -170,17 +170,17 @@ post-build:
${SED} -e 's|${TMP_DOCSDIR}|@dirrm %%DOCSDIR%%|' | \
${SORT} -r >> ${PLIST}
.endif
- @${ECHO} '@unexec rm -rf /var/db/slimserver/cache > /dev/null 2>&1 || true' >> ${PLIST}
- @${ECHO} '@dirrmtry /var/db/slimserver/playlists' >> ${PLIST}
- @${ECHO} '@dirrmtry /var/db/slimserver' >> ${PLIST}
- @${ECHO} '@unexec test -d /var/db/slimserver && (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove /var/db/slimserver and its contents manually.")' >> ${PLIST}
+ @${ECHO} '@unexec rm -rf ${SLIMDBDIR}/cache > /dev/null 2>&1 || true' >> ${PLIST}
+ @${ECHO} '@dirrmtry ${SLIMDBDIR}/playlists' >> ${PLIST}
+ @${ECHO} '@dirrmtry ${SLIMDBDIR}' >> ${PLIST}
+ @${ECHO} '@unexec test -d ${SLIMDBDIR} && (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove ${SLIMDBDIR} and its contents manually.")' >> ${PLIST}
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${MKDIR} -m 0755 ${PREFIX}/${SLIMDIR}
- @${LN} -s /var/db/slimserver/cache ${PREFIX}/${SLIMDIR}/Cache
+ @${LN} -s ${SLIMDBDIR}/cache ${PREFIX}/${SLIMDIR}/Cache
@cd ${TMP_SLIMDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${PREFIX}/${SLIMDIR}
diff --git a/audio/squeezecenter/distinfo b/audio/squeezecenter/distinfo
index 7cfa8f84dfe2..57a43b99f03d 100644
--- a/audio/squeezecenter/distinfo
+++ b/audio/squeezecenter/distinfo
@@ -1,6 +1,6 @@
-MD5 (slimserver/SlimServer_v6.5.0.no-cpan-arch.tar.gz) = 420e321577ed5b4f5fd61615cd01eb50
-SHA256 (slimserver/SlimServer_v6.5.0.no-cpan-arch.tar.gz) = 63bd2600efd70c4165b474dfab97e32085af80b155e99f944bbcc6937ed68ead
-SIZE (slimserver/SlimServer_v6.5.0.no-cpan-arch.tar.gz) = 12320425
+MD5 (slimserver/SlimServer_v6.5.1.no-cpan-arch.tar.gz) = 69298ca0a214224ac2a79a522e26dd3c
+SHA256 (slimserver/SlimServer_v6.5.1.no-cpan-arch.tar.gz) = 8e3122472e94f491984351774925c943a257643044655c468fc11b6be18d6cb5
+SIZE (slimserver/SlimServer_v6.5.1.no-cpan-arch.tar.gz) = 15271878
MD5 (slimserver/YAML-Syck-0.64.tar.gz) = 51054b5da582e381158f10276f82ae15
SHA256 (slimserver/YAML-Syck-0.64.tar.gz) = 70ff201165020c7aeadeb4bd1a6233462994a07a7153c8f5570a3698b0207e07
SIZE (slimserver/YAML-Syck-0.64.tar.gz) = 128255
diff --git a/audio/squeezecenter/files/patch-Bin_build-perl-modules.pl b/audio/squeezecenter/files/patch-Bin_build-perl-modules.pl
index a2cbae114627..b5ddceb89645 100644
--- a/audio/squeezecenter/files/patch-Bin_build-perl-modules.pl
+++ b/audio/squeezecenter/files/patch-Bin_build-perl-modules.pl
@@ -12,7 +12,7 @@ $FreeBSD$
- 'DBD::mysql' => 'DBD-mysql-3.0002.tar.gz',
- 'Digest::SHA1' => 'Digest-SHA1-2.11.tar.gz',
- 'HTML::Parser' => 'HTML-Parser-3.48.tar.gz',
-- 'Template' => 'Template-Toolkit-2.14.tar.gz',
+- 'Template' => 'Template-Toolkit-2.15.tar.gz',
- 'Time::HiRes' => 'Time-HiRes-1.86.tar.gz',
- 'XML::Parser::Expat' => 'XML-Parser-2.34.tar.gz',
+# 'Compress::Zlib' => 'Compress-Zlib-1.41.tar.gz',
@@ -20,7 +20,7 @@ $FreeBSD$
+# 'DBD::mysql' => 'DBD-mysql-3.0002.tar.gz',
+# 'Digest::SHA1' => 'Digest-SHA1-2.11.tar.gz',
+# 'HTML::Parser' => 'HTML-Parser-3.48.tar.gz',
-+# 'Template' => 'Template-Toolkit-2.14.tar.gz',
++# 'Template' => 'Template-Toolkit-2.15.tar.gz',
+# 'Time::HiRes' => 'Time-HiRes-1.86.tar.gz',
+# 'XML::Parser::Expat' => 'XML-Parser-2.34.tar.gz',
'YAML::Syck' => 'YAML-Syck-0.64.tar.gz',
@@ -116,7 +116,7 @@ $FreeBSD$
# Only download the packages that were passsed.
my @packages = ();
-@@ -189,30 +153,9 @@
+@@ -189,30 +153,8 @@
chdir($pwd) or die "Couldn't change to $pwd : $!";
@@ -129,7 +129,7 @@ $FreeBSD$
-
- LWP::Simple::getstore("$SOURCE/$package?view=auto", $package);
-
-- } elsif ($downloadUsing eq 'curl') {
+- } elsif ($downloadUsing =~ /curl$/) {
-
- `$downloadUsing --silent -o $package $SOURCE/$package?view=auto`;
-
@@ -141,10 +141,10 @@ $FreeBSD$
- unless (-r $package) {
- print "Something looks wrong - I couldn't read $pwd/$package, which I just downloaded.\n";
- }
-+ print "\nExtracting $package in: $pwd\n";
-
+-
- print "Uncompressing..\n";
- `gzip -d < $package | tar xvf -`;
++ print "\nExtracting $package in: $pwd\n";
+ `tar xfvz %%DISTDIR%%/$package`;
unlink $package;
diff --git a/audio/squeezecenter/files/patch-Slim_Networking_mDNS.pm b/audio/squeezecenter/files/patch-Slim_Networking_mDNS.pm
new file mode 100644
index 000000000000..259bee3f1f52
--- /dev/null
+++ b/audio/squeezecenter/files/patch-Slim_Networking_mDNS.pm
@@ -0,0 +1,22 @@
+
+$FreeBSD$
+
+--- Slim/Networking/mDNS.pm.orig
++++ Slim/Networking/mDNS.pm
+@@ -100,7 +100,6 @@
+
+ print CONF "$name\n";
+ print CONF "$service\n";
+- print CONF "TXT\n";
+ print CONF "$port\n";
+ print CONF "\n";
+ }
+@@ -113,7 +112,7 @@
+ return;
+ }
+
+- my $command = sprintf("%s -d -f %s -P %s", $mDNSBin, $confFile, $pidFile);
++ my $command = sprintf("%s -b -f %s -P %s", $mDNSBin, $confFile, $pidFile);
+
+ $::d_mdns && msg("mDNS: About to run: $command\n");
+
diff --git a/audio/squeezecenter/files/patch-Slim_Utils_Misc.pm b/audio/squeezecenter/files/patch-Slim_Utils_Misc.pm
index 16a2f1e07a1e..d1a688348668 100644
--- a/audio/squeezecenter/files/patch-Slim_Utils_Misc.pm
+++ b/audio/squeezecenter/files/patch-Slim_Utils_Misc.pm
@@ -3,12 +3,12 @@ $FreeBSD$
--- Slim/Utils/Misc.pm.orig
+++ Slim/Utils/Misc.pm
-@@ -106,7 +106,7 @@
+@@ -107,7 +107,7 @@
if (Slim::Utils::OSDetect::OS() ne "win") {
-- push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /sw/bin /usr/sbin));
-+ push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /usr/local/libexec /sw/bin /usr/sbin));
+- push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /usr/libexec /sw/bin /usr/sbin));
++ push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /usr/libexec /usr/local/libexec /sw/bin /usr/sbin));
} else {
diff --git a/audio/squeezecenter/files/slimserver.sh.in b/audio/squeezecenter/files/slimserver.sh.in
index ee4783aa1f1e..b91aa35cc23f 100644
--- a/audio/squeezecenter/files/slimserver.sh.in
+++ b/audio/squeezecenter/files/slimserver.sh.in
@@ -17,13 +17,14 @@
name=slimserver
start_precmd="slimserver_start_precmd"
-stop_cmd="slimserver_stop"
+stop_postcmd="slimserver_poststop"
rcvar=`set_rcvar`
command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl
+command_interpreter=%%PERL%%
pidfile=/var/run/${name}.pid
logfile=/var/log/slimserver.log
-statedir=/var/db/slimserver
+statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
@@ -31,8 +32,6 @@ u=slimserv
g=slimserv
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
-PGREP=%%PGREPBASE%%/bin/pgrep
-
slimserver_start_precmd()
{
if [ ! -d ${statedir} ]; then
@@ -57,25 +56,18 @@ slimserver_start_precmd()
fi
}
-slimserver_stop()
+slimserver_poststop()
{
- if [ ! -f ${pidfile} ]; then
- exit
- fi
- echo 'Stopping SlimServer.'
- rc_pid=`cat ${pidfile}`
- rc_pid=`${PGREP} -u ${u} | grep ${rc_pid}`
- if [ -n "${rc_pid}" ]; then
- # Should be mDNSResponderPosix, but the port truncates
- rc_pids="${rc_pid} `${PGREP} -u ${u} mDNSResponderPos`"
-
- kill $sig_stop $rc_pids
- wait_for_pids $rc_pids
- else
- echo "${name} not running? (check ${pidfile})"
- fi
-
- rm -f ${pidfile}
+ # Slimserver kills mDNSResponderPosix, but then manages to start
+ # another one while dying so kill it off.
+ echo "Stopping SlimServer's mDNSResponderPosix."
+ mdns_pid=$(check_pidfile ${cachedir}/mDNS.pid %%LOCALBASE%%/bin/mDNSResponderPosix)
+ if [ -n "${mdns_pid}" ]; then
+ # mDNSResponderPosix doens't die without a kill
+ kill -9 $mdns_pid
+ wait_for_pids $mdns_pid
+ rm -f ${cachedir}/mDNS.pid
+ fi
}
load_rc_config ${name}
diff --git a/audio/squeezecenter/files/squeezecenter.sh.in b/audio/squeezecenter/files/squeezecenter.sh.in
index ee4783aa1f1e..b91aa35cc23f 100644
--- a/audio/squeezecenter/files/squeezecenter.sh.in
+++ b/audio/squeezecenter/files/squeezecenter.sh.in
@@ -17,13 +17,14 @@
name=slimserver
start_precmd="slimserver_start_precmd"
-stop_cmd="slimserver_stop"
+stop_postcmd="slimserver_poststop"
rcvar=`set_rcvar`
command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl
+command_interpreter=%%PERL%%
pidfile=/var/run/${name}.pid
logfile=/var/log/slimserver.log
-statedir=/var/db/slimserver
+statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
@@ -31,8 +32,6 @@ u=slimserv
g=slimserv
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
-PGREP=%%PGREPBASE%%/bin/pgrep
-
slimserver_start_precmd()
{
if [ ! -d ${statedir} ]; then
@@ -57,25 +56,18 @@ slimserver_start_precmd()
fi
}
-slimserver_stop()
+slimserver_poststop()
{
- if [ ! -f ${pidfile} ]; then
- exit
- fi
- echo 'Stopping SlimServer.'
- rc_pid=`cat ${pidfile}`
- rc_pid=`${PGREP} -u ${u} | grep ${rc_pid}`
- if [ -n "${rc_pid}" ]; then
- # Should be mDNSResponderPosix, but the port truncates
- rc_pids="${rc_pid} `${PGREP} -u ${u} mDNSResponderPos`"
-
- kill $sig_stop $rc_pids
- wait_for_pids $rc_pids
- else
- echo "${name} not running? (check ${pidfile})"
- fi
-
- rm -f ${pidfile}
+ # Slimserver kills mDNSResponderPosix, but then manages to start
+ # another one while dying so kill it off.
+ echo "Stopping SlimServer's mDNSResponderPosix."
+ mdns_pid=$(check_pidfile ${cachedir}/mDNS.pid %%LOCALBASE%%/bin/mDNSResponderPosix)
+ if [ -n "${mdns_pid}" ]; then
+ # mDNSResponderPosix doens't die without a kill
+ kill -9 $mdns_pid
+ wait_for_pids $mdns_pid
+ rm -f ${cachedir}/mDNS.pid
+ fi
}
load_rc_config ${name}