diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2007-01-19 00:19:39 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2007-01-19 00:19:39 +0000 |
commit | 4f911a8c6a897f5179d2f7776e47e752f9cc76b9 (patch) | |
tree | 8de6cbc18ab95196d12e81a184f5a28e280760f4 /audio/slimserver/files | |
parent | 743b174d5ed5e210559c9f60d93ace00d78999d2 (diff) | |
download | ports-4f911a8c6a897f5179d2f7776e47e752f9cc76b9.tar.gz ports-4f911a8c6a897f5179d2f7776e47e752f9cc76b9.zip |
Notes
Diffstat (limited to 'audio/slimserver/files')
-rw-r--r-- | audio/slimserver/files/patch-Bin_build-perl-modules.pl | 12 | ||||
-rw-r--r-- | audio/slimserver/files/patch-Slim_Networking_mDNS.pm | 22 | ||||
-rw-r--r-- | audio/slimserver/files/patch-Slim_Utils_Misc.pm | 6 | ||||
-rw-r--r-- | audio/slimserver/files/slimserver.sh.in | 36 |
4 files changed, 45 insertions, 31 deletions
diff --git a/audio/slimserver/files/patch-Bin_build-perl-modules.pl b/audio/slimserver/files/patch-Bin_build-perl-modules.pl index a2cbae114627..b5ddceb89645 100644 --- a/audio/slimserver/files/patch-Bin_build-perl-modules.pl +++ b/audio/slimserver/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/slimserver/files/patch-Slim_Networking_mDNS.pm b/audio/slimserver/files/patch-Slim_Networking_mDNS.pm new file mode 100644 index 000000000000..259bee3f1f52 --- /dev/null +++ b/audio/slimserver/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/slimserver/files/patch-Slim_Utils_Misc.pm b/audio/slimserver/files/patch-Slim_Utils_Misc.pm index 16a2f1e07a1e..d1a688348668 100644 --- a/audio/slimserver/files/patch-Slim_Utils_Misc.pm +++ b/audio/slimserver/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/slimserver/files/slimserver.sh.in b/audio/slimserver/files/slimserver.sh.in index ee4783aa1f1e..b91aa35cc23f 100644 --- a/audio/slimserver/files/slimserver.sh.in +++ b/audio/slimserver/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} |