1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Introduce a port of SqueezeCenter 7.0.0, the latest release of the software

formerly know as SlimServer (audio/slimserver).

The most visiable change is a new AJAX heavy default skin.  A
configuration option is available to install with the Classic skin
instead (the new Default is broken with Konqueror).  Other changes
can be found in the release notes:

http://www.slimdevices.com/changelog7.html

The SqueezeCenter port does not overlap with SlimServer so both
will remain for the time being.

Repocopy by:	marcus (ports/122138)
This commit is contained in:
Brooks Davis 2008-04-02 17:30:27 +00:00
parent d90e52fe99
commit bfc8bac928
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=210395
29 changed files with 5659 additions and 768 deletions

View File

@ -627,6 +627,7 @@
SUBDIR += splay
SUBDIR += splaytk
SUBDIR += squash
SUBDIR += squeezecenter
SUBDIR += streamripper
SUBDIR += streamtranscoder
SUBDIR += streamtuner

View File

@ -1,24 +1,25 @@
# Ports collection makefile for: slimserver
# Date created: Wed Apr 14, 2004
# Whom: Brooks Davis <brooks@freebsd.org>
# Ports collection makefile for: squeezecenter
# Date created: Wed Apr 14, 2004
# Whom: Brooks Davis <brooks@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= slimserver
PORTVERSION= 6.5.4
PORTREVISION= 1
PORTNAME= squeezecenter
PORTVERSION= 7.0.0
CATEGORIES= audio
MASTER_SITES= http://www.slimdevices.com/downloads/SlimServer_v${PORTVERSION}/
DISTNAME= SlimServer_v${PORTVERSION}.no-cpan-arch
DIST_SUBDIR= slimserver
MASTER_SITES= http://www.slimdevices.com/downloads/SqueezeCenter_v${PORTVERSION}/
DISTNAME= ${PORTNAME}-7.0-noCPAN
DIST_SUBDIR= ${PORTNAME}
EXTRACT_SUFX= .tgz
MAINTAINER= brooks@FreeBSD.org
COMMENT= Slim Devices audio streaming server
# Defaults support playback of relativly unrestricted formats on SB2 or
# SB3 devices and wired SB1 devices.
OPTIONS= APE "Support Monkey's Audio Codec input" on \
OPTIONS= CLASSIC "Default to the Classic skin" off \
APE "Support Monkey's Audio Codec input" on \
FAAD "Support AAC input via FAAD" on \
FLAC "Support FLAC output (and input on SliMP3 and SB1)" on \
LAME "Support MP3 output via LAME" off \
@ -28,13 +29,16 @@ OPTIONS= APE "Support Monkey's Audio Codec input" on \
RESTRICTED= Contains non-redistributable firmware, documentation, and images
WRKSRC= ${WRKDIR}/SlimServer_v${PORTVERSION}
WRKSRC= ${WRKDIR}/squeezecenter-7.0-17793-noCPAN
BUILD_DEPENDS+= ${SITE_PERL}/File/Which.pm:${PORTSDIR}/sysutils/p5-File-Which
RUN_DEPENDS+= ${LOCALBASE}/bin/mDNSResponderPosix:${PORTSDIR}/net/mDNSResponder \
${SITE_PERL}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql \
${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \
${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
${SITE_PERL}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD \
${SITE_PERL}/${PERL_ARCH}/JSON/XS.pm:${PORTSDIR}/converters/p5-JSON-XS \
${SITE_PERL}/${PERL_ARCH}/HTML/Parser.pm:${PORTSDIR}/www/p5-HTML-Parser \
${SITE_PERL}/${PERL_ARCH}/Template.pm:${PORTSDIR}/www/p5-Template-Toolkit \
${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
@ -49,7 +53,7 @@ IGNORE_WITH_MYSQL= 323 40
.include <bsd.port.pre.mk>
# We need a dependency on the server because slimserver runs the binary
# We need a dependency on the server because squeezecenter runs the binary
# directly with a non-standard config.
RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server
@ -75,20 +79,31 @@ RUN_DEPENDS+= shorten:${PORTSDIR}/audio/shorten
RUN_DEPENDS+= oggdec:${PORTSDIR}/audio/vorbis-tools
.endif
USE_RC_SUBR= slimserver.sh
TMP_SLIMDIR= ${WRKDIR}/slimserver
.if defined(WITH_CLASSIC)
DEFAULT_SKIN= Classic
.else
DEFAULT_SKIN?= Default
.endif
USE_RC_SUBR= squeezecenter.sh
TMP_SLIMDIR= ${WRKDIR}/_squeezecenter
TMP_DOCSDIR= ${WRKDIR}/doc
DOCFILES= Changelog.html Installation.txt License.txt
CONFFILES= convert.conf types.conf
EXCEPTFILES= ${DOCFILES} ${CONFFILES} MySQL/errmsg.txt MySQL/errmsg.sys
EXCEPTFILES= ${DOCFILES} \
${CONFFILES} \
CPAN/Template.pm \
CPAN/XML/Parser.pm \
MySQL/errmsg.txt \
MySQL/errmsg.sys
EXCEPTDIRS= Bin \
CPAN/arch \
CPAN/Template \
CPAN/XML/Parser \
CPAN/YAML
CPIOARGS= --quiet -pdum -R
PLIST= ${WRKDIR}/pkg-plist
PLIST_SUB= SLIMDIR=${SLIMDIR}
PLIST_FILES= bin/softsqueeze
SUB_FILES= softsqueeze.sh pkg-install
SUB_LIST= PERL=${PERL} \
@ -98,37 +113,57 @@ SUB_LIST= PERL=${PERL} \
SLIMGROUP=${SLIMGROUP} \
CONFFILES="${CONFFILES}"
JSON_FIXUP_FILES= Slim/Control/Queries.pm \
Slim/Networking/SqueezeNetwork.pm \
Slim/Networking/SqueezeNetwork/Stats.pm \
Slim/Networking/SqueezeNetwork/PrefSync.pm \
Slim/Networking/SqueezeNetwork/Players.pm \
Slim/Plugin/AudioScrobbler/Plugin.pm \
Slim/Plugin/Live365/ProtocolHandler.pm \
Slim/Plugin/Pandora/ProtocolHandler.pm \
Slim/Plugin/RPC/Plugin.pm \
Slim/Plugin/RhapsodyDirect/ProtocolHandler.pm \
Slim/Plugin/Slacker/ProtocolHandler.pm \
Slim/Web/Cometd.pm \
Slim/Web/JSONRPC.pm \
pre-fetch:
.if !defined(SLIMDIR)
@${ECHO_MSG} ""
@${ECHO_MSG} "Define SLIMDIR to override default of 'slimserver'."
@${ECHO_MSG} "Define SLIMDIR to override default of 'squeezecenter'."
@${ECHO_MSG} ""
.endif
SLIMDIR?= slimserver
SLIMDBDIR?= /var/db/slimserver
SLIMDIR?= squeezecenter
SLIMDBDIR?= /var/db/squeezecenter
SLIMUSER?= slimserv
SLIMGROUP?= ${SLIMUSER}
post-patch:
@${REINPLACE_CMD} \
-e 's|/usr/bin/perl|${PERL}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|' \
-e 's|%%DISTDIR%%|${_DISTDIR}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%PREFIX%%|${PREFIX}|' \
-e 's|%%SITE_PERL%%|${SITE_PERL}|' \
-e 's|%%SLIMDBDIR%%|${SLIMDBDIR}|' \
${WRKSRC}/Bin/dbish \
-e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|' \
-e 's|%%DEFAULT_SKIN%%|${DEFAULT_SKIN}|' \
${WRKSRC}/Slim/Utils/OSDetect.pm \
${WRKSRC}/Slim/Utils/Prefs.pm \
${WRKSRC}/Slim/Web/HTTP.pm \
${WRKSRC}/scanner.pl \
${WRKSRC}/slimserver.pl
@${RM} ${WRKSRC}/scanner.pl.bak ${WRKSRC}/slimserver.pl.bak \
${WRKSRC}/Slim/Utils/Prefs.pm.bak \
${WRKSRC}/Bin/dbish.bak
cd ${WRKSRC} && ${REINPLACE_CMD} \
-e 's/to_json/encode_json/' \
-e 's/from_json/decode_json/' \
${JSON_FIXUP_FILES}
do-build:
@${MKDIR} -m 0755 ${TMP_SLIMDIR}
@cd ${WRKSRC} && \
${FIND} . -name \*.orig ${EXCEPTFILES:S|^|-o -path ./|} \
${FIND} . -name \*.orig -o -name \*.bak \
${EXCEPTFILES:S|^|-o -path ./|} \
${EXCEPTDIRS:S/$/\*/:S/^/-o -path .\//} -o -print | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${TMP_SLIMDIR}
.for _CONF in ${CONFFILES}
@ -139,8 +174,35 @@ do-build:
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${TMP_DOCSDIR}
.endif
post-build:
@${RM} -f ${PLIST}
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${MKDIR} -m 0755 ${PREFIX}/${SLIMDIR}
@${LN} -s ${SLIMDBDIR}/cache ${PREFIX}/${SLIMDIR}/Cache
@cd ${TMP_SLIMDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${PREFIX}/${SLIMDIR}
@${LN} -s ${LOCALBASE}/share/mysql/errmsg.txt \
${PREFIX}/${SLIMDIR}/MySQL/
@${LN} -s ${LOCALBASE}/share/mysql/english/errmsg.sys \
${PREFIX}/${SLIMDIR}/MySQL/
@${INSTALL_SCRIPT} ${WRKDIR}/softsqueeze.sh ${PREFIX}/bin/softsqueeze
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${TMP_DOCSDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${DOCSDIR}
.endif
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO}
@${CAT} ${PKGMESSAGE}
build-plist:
@${CAT} /dev/null > ${PLIST}
echo bin/softsqueeze >> ${PLIST}
.for _CONF in ${CONFFILES}
@${ECHO} '@unexec if cmp -s %D/%%SLIMDIR%%/${_CONF} %D/%%SLIMDIR%%/${_CONF}.sample; then rm -f %D/%%SLIMDIR%%/${_CONF}; fi' >> ${PLIST}
.endfor
@ -171,30 +233,4 @@ post-build:
@${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 ${SLIMDBDIR}/cache ${PREFIX}/${SLIMDIR}/Cache
@cd ${TMP_SLIMDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${PREFIX}/${SLIMDIR}
@${LN} -s ${LOCALBASE}/share/mysql/errmsg.txt \
${PREFIX}/${SLIMDIR}/MySQL/
@${LN} -s ${LOCALBASE}/share/mysql/english/errmsg.sys \
${PREFIX}/${SLIMDIR}/MySQL/
@${INSTALL_SCRIPT} ${WRKDIR}/softsqueeze.sh ${PREFIX}/bin/softsqueeze
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${TMP_DOCSDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${DOCSDIR}
.endif
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,3 +1,6 @@
MD5 (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 6ffa0002b47dc6a77649289a3ad7f8b9
SHA256 (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 7e9bb04006cb61b1a527c37e4ae2be437f78236e1301869bbfea852ff601e27a
SIZE (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 15757045
MD5 (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 55925e50fd016c999a812e522fdcc931
SHA256 (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 78bbb0c0e296b1d19dee1f5c9d88f996f7cd43808f8798f2baded6dd2c334df7
SIZE (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 18464419
MD5 (squeezecenter/YAML-Syck-0.64.tar.gz) = 51054b5da582e381158f10276f82ae15
SHA256 (squeezecenter/YAML-Syck-0.64.tar.gz) = 70ff201165020c7aeadeb4bd1a6233462994a07a7153c8f5570a3698b0207e07
SIZE (squeezecenter/YAML-Syck-0.64.tar.gz) = 128255

View File

@ -1,151 +0,0 @@
$FreeBSD$
--- Bin/build-perl-modules.pl.orig
+++ Bin/build-perl-modules.pl
@@ -24,14 +24,14 @@
# The list of all the packages needed.
my %packages = (
- 'Compress::Zlib' => 'Compress-Zlib-1.41.tar.gz',
- 'DBI' => 'DBI-1.50.tar.gz',
- '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.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',
+# 'DBI' => 'DBI-1.50.tar.gz',
+# '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.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',
);
@@ -57,6 +57,13 @@
'env' => [qw(DBI-1.50/blib/lib: DBI-1.50/blib/arch)],
},
+
+ 'XML-Parser-2.34' => {
+ 'Makefile.PL' => join(' ', qw(
+ EXPATLIBPATH="%%LOCALBASE%%/lib"
+ EXPATINCPATH="%%LOCALBASE%%/include"
+ )),
+ },
);
sub main {
@@ -73,28 +80,14 @@
print "*** Ignore any warnings about AppConfig. ***\n\n";
- print "Please enter a perl binary to use (defaults to /usr/bin/perl)\n";
- print "This must be the same perl binary that you ran this program with --> ";
- chomp($perlBinary = <STDIN>);
-
- $perlBinary ||= '/usr/bin/perl';
+ $perlBinary = '/usr/bin/perl';
unless (-f $perlBinary && -x $perlBinary) {
die "Couldn't find a perl binary. Exiting.\n";
}
# Where does their slimserver live? Try to guess.
- if (-f 'slimserver.pl' && -d 'CPAN/arch') {
-
- $slimServerPath = cwd();
-
- } else {
-
- print "Please enter the path to your SlimServer directory (ex: /usr/local/slimserver) --> ";
- chomp($slimServerPath = <STDIN>);
- }
-
- $slimServerPath ||= '/usr/local/slimserver';
+ $slimServerPath ||= '%%TMP_SLIMDIR%%';
unless (-d $slimServerPath) {
die "Couldn't find a valid SlimServer path. Exiting.\n";
@@ -109,12 +102,7 @@
# This is where the binaries will end up.
my $cpanDest = "$slimServerPath/CPAN/arch/$version/$archname/auto";
- # Where do they want the downloads to go?
- print "Please enter a directory to download files to --> ";
- chomp($downloadPath = <STDIN>);
-
- # Default to the current directory.
- $downloadPath ||= '.';
+ $downloadPath = '%%CPANWRKDIR%%';
# Remove trailing slash
$downloadPath =~ s|^(.+?)/$|$1|;
@@ -127,30 +115,6 @@
my $pwd = cwd();
- # What do we want to download with?
- eval { require LWP::Simple };
-
- # No LWP - try a command line program.
- if ($@) {
-
- for my $cmd (qw(curl wget)) {
-
- if ($downloadUsing = which($cmd)) {
- last;
- }
- }
-
- } else {
-
- $downloadUsing = 'lwp';
- }
-
- unless ($downloadUsing) {
- die "Couldn't find any valid downloaders - install LWP, wget or curl.\n";
- } else {
- print "Downloads will use $downloadUsing to fetch tarballs.\n";
- }
-
# Only download the packages that were passsed.
my @packages = ();
@@ -189,30 +153,8 @@
chdir($pwd) or die "Couldn't change to $pwd : $!";
- print "\nDownloading $package to: $pwd\n";
-
- # Remove any previous version.
- unlink $package;
-
- if ($downloadUsing eq 'lwp') {
-
- LWP::Simple::getstore("$SOURCE/$package?view=auto", $package);
-
- } elsif ($downloadUsing =~ /curl$/) {
-
- `$downloadUsing --silent -o $package $SOURCE/$package?view=auto`;
-
- } else {
-
- `$downloadUsing -q -O $package $SOURCE/$package?view=auto`;
- }
-
- unless (-r $package) {
- print "Something looks wrong - I couldn't read $pwd/$package, which I just downloaded.\n";
- }
-
- print "Uncompressing..\n";
- `gzip -d < $package | tar xvf -`;
+ print "\nExtracting $package in: $pwd\n";
+ `tar xfvz %%DISTDIR%%/$package`;
unlink $package;

View File

@ -3,20 +3,18 @@ $FreeBSD$
--- Slim/Networking/mDNS.pm.orig
+++ Slim/Networking/mDNS.pm
@@ -100,7 +100,6 @@
@@ -131,11 +131,12 @@
my ($name, $port) = @$data;
+ # mDNSResponderPosix can handle an extra space at the front,
+ # but prints an error if on occurs at the end.
+ print CONF "\n";
print CONF "$name\n";
print CONF "$service\n";
- print CONF "TXT\n";
print CONF "$port\n";
print CONF "\n";
}
@@ -113,7 +112,7 @@
return;
- print CONF "\n";
}
- 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");
close(CONF);

View File

@ -1,14 +0,0 @@
$FreeBSD$
--- Slim/Utils/Misc.pm.orig
+++ Slim/Utils/Misc.pm
@@ -107,7 +107,7 @@
if (Slim::Utils::OSDetect::OS() ne "win") {
- 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 {

View File

@ -0,0 +1,92 @@
$FreeBSD$
--- Slim/Utils/OSDetect.pm.orig
+++ Slim/Utils/OSDetect.pm
@@ -125,7 +125,7 @@
if ($detectedOS ne "win") {
- 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/local/libexec /usr/libexec /sw/bin /usr/sbin));
} else {
@@ -248,6 +248,48 @@
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
+ } elsif (isFreeBSD()) {
+
+ if ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL|lib|Bin)$/) {
+
+ push @dirs, "%%PREFIX%%/squeezecenter/$dir";
+
+ } elsif ($dir eq 'Plugins') {
+ push @dirs, "%%SITE_PERL%%", "%%PREFIX%%/squeezecenter/Plugins";
+
+ } elsif ($dir eq 'strings' || $dir eq 'revision') {
+
+ push @dirs, "%%PREFIX%%/squeezecenter";
+
+ } elsif ($dir eq 'types' || $dir eq 'convert') {
+
+ push @dirs, "%%PREFIX%%/squeezecenter";
+
+ } elsif ($dir eq 'prefs') {
+
+ push @dirs, "%%SLIMDBDIR%%/prefs";
+
+ } elsif ($dir eq 'log') {
+
+ push @dirs, "/var/log/squeezecenter";
+
+ } elsif ($dir eq 'cache') {
+
+ push @dirs, "%%SLIMDBDIR%%/cache";
+
+ } elsif ($dir eq 'MySQL') {
+
+ # Do nothing - use the depended upon MySQL install.
+
+ } elsif ($dir =~ /^(?:music|playlists)$/) {
+
+ push @dirs, '';
+
+ } else {
+
+ warn "dirsFor: Didn't find a match request: [$dir]\n";
+ }
+
# Red Hat/Fedora/SUSE RPM specific paths.
} elsif (isRHorSUSE()) {
@@ -432,6 +474,28 @@
return isReadyNAS();
}
+=head2 isFreeBSD( )
+
+ The FreeBSD package has some specific differences for file locations.
+ This routine needs no args, and returns 1 if FreeBSD is detected, with
+ a clear sign that the port/package has been installed, 0 if not.
+
+=cut
+
+sub isFreeBSD {
+
+ # Initialize
+ my $OS = OS();
+ my $details = details();
+
+ if ($details->{'osName'} eq 'freebsd' && $0 =~ m{^/usr/local/squeezecenter} ) {
+ return 1;
+ }
+
+ return 0;
+}
+
+
sub isRHorSUSE {
# Initialize

View File

@ -3,32 +3,12 @@ $FreeBSD$
--- Slim/Utils/Prefs.pm.orig
+++ Slim/Utils/Prefs.pm
@@ -392,6 +392,10 @@
$path = $Bin . '/Playlists';
+ } elsif (Slim::Utils::OSDetect::OS() eq 'unix') {
+
+ $path = "%%SLIMDBDIR%%/playlists";
+
} else {
$path = '';
@@ -424,7 +428,7 @@
} elsif ($os eq 'unix') {
- $CacheDir = catdir($ENV{'HOME'},'Cache');
+ $CacheDir = "%%SLIMDBDIR%%/cache";
} elsif ($os eq 'win' && Slim::Utils::OSDetect::details->{'osName'} =~ /Vista/) {
@@ -1022,7 +1026,7 @@
$prefsPath = $Bin;
}
} else {
- $prefsPath = $ENV{'HOME'};
+ $prefsPath = "%%SLIMDBDIR%%";
}
$::d_prefs && msg("The default prefs directory is $prefsPath\n");
@@ -235,7 +235,7 @@
],
'titleFormatWeb' => 1,
# Server Settings - UserInterface
- 'skin' => 'Default',
+ 'skin' => '%%DEFAULT_SKIN%%',
'itemsPerPage' => 50,
'refreshRate' => 30,
'coverArt' => '',

View File

@ -0,0 +1,18 @@
$FreeBSD$
--- Slim/Utils/Prefs/OldPrefs.pm.orig
+++ Slim/Utils/Prefs/OldPrefs.pm
@@ -117,7 +117,11 @@
$oldPrefs = catdir($ENV{'HOME'}, 'slimserver.pref');
- } else {
+ } elsif (-r '/var/db/slimserver/slimserver.conf') {
+
+ $oldPrefs = '/var/db/slimserver/slimserver.conf';
+
+ }else {
$log->warn("no old preference file found - using default preferences");

View File

@ -0,0 +1,14 @@
$FreeBSD$
--- Slim/Web/HTTP.pm.orig
+++ Slim/Web/HTTP.pm
@@ -54,7 +54,7 @@
$Template::Config::CONTEXT = 'Slim::Web::Template::Context';
}
-use constant defaultSkin => 'Default';
+use constant defaultSkin => '%%DEFAULT_SKIN%%';
use constant baseSkin => 'EN';
use constant HALFYEAR => 60 * 60 * 24 * 180;

View File

@ -7,11 +7,11 @@ $FreeBSD$
# specific combinations match before wildcards
mov mp3 * *
- [mov123] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r - -
+ [faad] -w -f 2 $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r - -
- [mov123] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
+ [faad] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
alc mp3 * *
[alac] -r $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r -x - -
[alac] -r $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r -x - -
ogg mp3 * *
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
@ -19,7 +19,7 @@ $FreeBSD$
wav mp3 * *
[lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ $FILE$ -
@@ -91,7 +91,7 @@
@@ -88,7 +88,7 @@
-
ogg aif * *
@ -37,16 +37,16 @@ $FreeBSD$
wma wma squeezebox2 *
-
@@ -133,7 +133,7 @@
[shorten] -x $FILE$ - | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -
@@ -130,7 +130,7 @@
[flac] -cs --totally-silent --compression-level-0 --skip=$START$ --until=$END$ -- $FILE$
ogg flc * *
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channel 2 --bps 16 --sample-rate 44100 --sign signed -
+ [oggdec] -Q -o - $FILE$ | [flac] -cs --compression-level-0 --totally-silent --endian big --channel 2 --bps 16 --sample-rate 44100 --sign signed -
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channels 2 --bps 16 --sample-rate 44100 --sign signed -
+ [oggdec] -Q -o - $FILE$ | [flac] -cs --compression-level-0 --totally-silent --endian big --channels 2 --bps 16 --sample-rate 44100 --sign signed -
wma flc * *
[wmadec] -r 44100 -b 16 -n 2 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -
@@ -145,7 +145,7 @@
@@ -142,7 +142,7 @@
[mac] $FILE$ - -d | [flac] -cs --totally-silent --compression-level-0 -
mov flc * *

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.3 2007-07-15 03:47:20 brooks Exp $
# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.4 2008-04-02 17:30:27 brooks Exp $
name=slimserver
u=%%SLIMUSER%%
@ -7,17 +7,17 @@ g=%%SLIMGROUP%%
ugid=104
homedir=/nonexistent
shell=/sbin/nologin
comment="Slim Devices SlimServer pseudo-user"
comment="Slim Devices SlimServer/SqueezeCenter pseudo-user"
slimdir="%%PREFIX%%/%%SLIMDIR%%"
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
conffile=${statedir}/slimserver.conf
conffile=${statedir}/squeezecenter.conf
playlistdir=${statedir}/playlists
pidfile=/var/run/${name}.pid
newsyslogfile=/etc/newsyslog.conf
logfile=/var/log/slimserver.log
logcomment="# added by audio/slimserver port"
logline="${logfile} ${u}:${g} 644 3 100 * Z ${pidfile}"
logfile=/var/log/squeezecenter.log
logcomment="# added by audio/squeezecenter port"
logline="${logfile} ${u}:${g} 644 3 100 * J ${pidfile}"
case $2 in
PRE-INSTALL)
@ -53,9 +53,6 @@ POST-INSTALL)
if [ -d ${playlistdir} ]; then
chown -R ${u}:${g} ${playlistdir}
fi
if [ -d /var/run/slimserver ]; then
chown -R ${u}:${g} /var/run/slimserver
fi
if [ -f ${conffile} ]; then
chown ${u}:${g} ${conffile}
fi
@ -65,7 +62,7 @@ POST-INSTALL)
if egrep -q "^${logfile}\>" ${newsyslogfile}; then
echo "Using existing ${newsyslogfile} entry."
else
echo "Adding slimserver log entry to ${newsyslogfile}."
echo "Adding squeezecenter log entry to ${newsyslogfile}."
echo "$logcomment" >> ${newsyslogfile}
echo "$logline" >> ${newsyslogfile}
fi

View File

@ -1,78 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: slimserver
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable slimserver:
#
#slimserver_enable="YES"
#
. %%RC_SUBR%%
name=slimserver
start_precmd="slimserver_start_precmd"
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=%%SLIMDBDIR%%
cachedir=${statedir}/cache
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
slimserver_start_precmd()
{
if [ ! -d ${statedir} ]; then
mkdir -p ${statedir}
chown -R ${u}:${g} ${statedir}
fi
if [ ! -d ${cachedir} ]; then
mkdir -p ${cachedir}
chown -R ${u}:${g} ${cachedir}
fi
if [ ! -d ${playlistdir} ]; then
mkdir -p ${playlistdir}
chown -R ${u}:${g} ${playlistdir}
fi
if [ ! -f ${conffile} ]; then
touch ${conffile}
chown ${u}:${g} ${conffile}
fi
if [ ! -f ${logfile} ]; then
touch ${logfile}
chown ${u}:${g} ${logfile}
fi
}
slimserver_poststop()
{
# 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}
slimserver_enable=${slimserver_enable:-"NO"}
slimserver_flags=${slimserver_flags:-""}
run_rc_command "$1"

View File

@ -3,36 +3,36 @@
# $FreeBSD$
#
# PROVIDE: slimserver
# PROVIDE: squeezecenter
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable slimserver:
# Add the following lines to /etc/rc.conf to enable squeezecenter:
#
#slimserver_enable="YES"
#squeezecenter_enable="YES"
#
. %%RC_SUBR%%
name=slimserver
start_precmd="slimserver_start_precmd"
stop_postcmd="slimserver_poststop"
name=squeezecenter
start_precmd="squeezecenter_start_precmd"
rcvar=`set_rcvar`
command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl
command_interpreter=%%PERL%%
pidfile=/var/run/${name}.pid
logfile=/var/log/slimserver.log
logfile=/var/log/squeezecenter.log
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
prefsdir=${statedir}/prefs
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
conffile=${statedir}/squeezecenter.conf
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
slimserver_start_precmd()
squeezecenter_start_precmd()
{
if [ ! -d ${statedir} ]; then
mkdir -p ${statedir}
@ -42,6 +42,10 @@ slimserver_start_precmd()
mkdir -p ${cachedir}
chown -R ${u}:${g} ${cachedir}
fi
if [ ! -d ${prefsdir} ]; then
mkdir -p ${prefsdir}
chown -R ${u}:${g} ${prefsdir}
fi
if [ ! -d ${playlistdir} ]; then
mkdir -p ${playlistdir}
chown -R ${u}:${g} ${playlistdir}
@ -56,23 +60,9 @@ slimserver_start_precmd()
fi
}
slimserver_poststop()
{
# 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}
slimserver_enable=${slimserver_enable:-"NO"}
slimserver_flags=${slimserver_flags:-""}
squeezecenter_enable=${squeezecenter_enable:-"NO"}
squeezecenter_flags=${squeezecenter_flags:-""}
run_rc_command "$1"

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,25 @@
# Ports collection makefile for: slimserver
# Date created: Wed Apr 14, 2004
# Whom: Brooks Davis <brooks@freebsd.org>
# Ports collection makefile for: squeezecenter
# Date created: Wed Apr 14, 2004
# Whom: Brooks Davis <brooks@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= slimserver
PORTVERSION= 6.5.4
PORTREVISION= 1
PORTNAME= squeezecenter
PORTVERSION= 7.0.0
CATEGORIES= audio
MASTER_SITES= http://www.slimdevices.com/downloads/SlimServer_v${PORTVERSION}/
DISTNAME= SlimServer_v${PORTVERSION}.no-cpan-arch
DIST_SUBDIR= slimserver
MASTER_SITES= http://www.slimdevices.com/downloads/SqueezeCenter_v${PORTVERSION}/
DISTNAME= ${PORTNAME}-7.0-noCPAN
DIST_SUBDIR= ${PORTNAME}
EXTRACT_SUFX= .tgz
MAINTAINER= brooks@FreeBSD.org
COMMENT= Slim Devices audio streaming server
# Defaults support playback of relativly unrestricted formats on SB2 or
# SB3 devices and wired SB1 devices.
OPTIONS= APE "Support Monkey's Audio Codec input" on \
OPTIONS= CLASSIC "Default to the Classic skin" off \
APE "Support Monkey's Audio Codec input" on \
FAAD "Support AAC input via FAAD" on \
FLAC "Support FLAC output (and input on SliMP3 and SB1)" on \
LAME "Support MP3 output via LAME" off \
@ -28,13 +29,16 @@ OPTIONS= APE "Support Monkey's Audio Codec input" on \
RESTRICTED= Contains non-redistributable firmware, documentation, and images
WRKSRC= ${WRKDIR}/SlimServer_v${PORTVERSION}
WRKSRC= ${WRKDIR}/squeezecenter-7.0-17793-noCPAN
BUILD_DEPENDS+= ${SITE_PERL}/File/Which.pm:${PORTSDIR}/sysutils/p5-File-Which
RUN_DEPENDS+= ${LOCALBASE}/bin/mDNSResponderPosix:${PORTSDIR}/net/mDNSResponder \
${SITE_PERL}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql \
${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \
${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
${SITE_PERL}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD \
${SITE_PERL}/${PERL_ARCH}/JSON/XS.pm:${PORTSDIR}/converters/p5-JSON-XS \
${SITE_PERL}/${PERL_ARCH}/HTML/Parser.pm:${PORTSDIR}/www/p5-HTML-Parser \
${SITE_PERL}/${PERL_ARCH}/Template.pm:${PORTSDIR}/www/p5-Template-Toolkit \
${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
@ -49,7 +53,7 @@ IGNORE_WITH_MYSQL= 323 40
.include <bsd.port.pre.mk>
# We need a dependency on the server because slimserver runs the binary
# We need a dependency on the server because squeezecenter runs the binary
# directly with a non-standard config.
RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server
@ -75,20 +79,31 @@ RUN_DEPENDS+= shorten:${PORTSDIR}/audio/shorten
RUN_DEPENDS+= oggdec:${PORTSDIR}/audio/vorbis-tools
.endif
USE_RC_SUBR= slimserver.sh
TMP_SLIMDIR= ${WRKDIR}/slimserver
.if defined(WITH_CLASSIC)
DEFAULT_SKIN= Classic
.else
DEFAULT_SKIN?= Default
.endif
USE_RC_SUBR= squeezecenter.sh
TMP_SLIMDIR= ${WRKDIR}/_squeezecenter
TMP_DOCSDIR= ${WRKDIR}/doc
DOCFILES= Changelog.html Installation.txt License.txt
CONFFILES= convert.conf types.conf
EXCEPTFILES= ${DOCFILES} ${CONFFILES} MySQL/errmsg.txt MySQL/errmsg.sys
EXCEPTFILES= ${DOCFILES} \
${CONFFILES} \
CPAN/Template.pm \
CPAN/XML/Parser.pm \
MySQL/errmsg.txt \
MySQL/errmsg.sys
EXCEPTDIRS= Bin \
CPAN/arch \
CPAN/Template \
CPAN/XML/Parser \
CPAN/YAML
CPIOARGS= --quiet -pdum -R
PLIST= ${WRKDIR}/pkg-plist
PLIST_SUB= SLIMDIR=${SLIMDIR}
PLIST_FILES= bin/softsqueeze
SUB_FILES= softsqueeze.sh pkg-install
SUB_LIST= PERL=${PERL} \
@ -98,37 +113,57 @@ SUB_LIST= PERL=${PERL} \
SLIMGROUP=${SLIMGROUP} \
CONFFILES="${CONFFILES}"
JSON_FIXUP_FILES= Slim/Control/Queries.pm \
Slim/Networking/SqueezeNetwork.pm \
Slim/Networking/SqueezeNetwork/Stats.pm \
Slim/Networking/SqueezeNetwork/PrefSync.pm \
Slim/Networking/SqueezeNetwork/Players.pm \
Slim/Plugin/AudioScrobbler/Plugin.pm \
Slim/Plugin/Live365/ProtocolHandler.pm \
Slim/Plugin/Pandora/ProtocolHandler.pm \
Slim/Plugin/RPC/Plugin.pm \
Slim/Plugin/RhapsodyDirect/ProtocolHandler.pm \
Slim/Plugin/Slacker/ProtocolHandler.pm \
Slim/Web/Cometd.pm \
Slim/Web/JSONRPC.pm \
pre-fetch:
.if !defined(SLIMDIR)
@${ECHO_MSG} ""
@${ECHO_MSG} "Define SLIMDIR to override default of 'slimserver'."
@${ECHO_MSG} "Define SLIMDIR to override default of 'squeezecenter'."
@${ECHO_MSG} ""
.endif
SLIMDIR?= slimserver
SLIMDBDIR?= /var/db/slimserver
SLIMDIR?= squeezecenter
SLIMDBDIR?= /var/db/squeezecenter
SLIMUSER?= slimserv
SLIMGROUP?= ${SLIMUSER}
post-patch:
@${REINPLACE_CMD} \
-e 's|/usr/bin/perl|${PERL}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|' \
-e 's|%%DISTDIR%%|${_DISTDIR}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%PREFIX%%|${PREFIX}|' \
-e 's|%%SITE_PERL%%|${SITE_PERL}|' \
-e 's|%%SLIMDBDIR%%|${SLIMDBDIR}|' \
${WRKSRC}/Bin/dbish \
-e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|' \
-e 's|%%DEFAULT_SKIN%%|${DEFAULT_SKIN}|' \
${WRKSRC}/Slim/Utils/OSDetect.pm \
${WRKSRC}/Slim/Utils/Prefs.pm \
${WRKSRC}/Slim/Web/HTTP.pm \
${WRKSRC}/scanner.pl \
${WRKSRC}/slimserver.pl
@${RM} ${WRKSRC}/scanner.pl.bak ${WRKSRC}/slimserver.pl.bak \
${WRKSRC}/Slim/Utils/Prefs.pm.bak \
${WRKSRC}/Bin/dbish.bak
cd ${WRKSRC} && ${REINPLACE_CMD} \
-e 's/to_json/encode_json/' \
-e 's/from_json/decode_json/' \
${JSON_FIXUP_FILES}
do-build:
@${MKDIR} -m 0755 ${TMP_SLIMDIR}
@cd ${WRKSRC} && \
${FIND} . -name \*.orig ${EXCEPTFILES:S|^|-o -path ./|} \
${FIND} . -name \*.orig -o -name \*.bak \
${EXCEPTFILES:S|^|-o -path ./|} \
${EXCEPTDIRS:S/$/\*/:S/^/-o -path .\//} -o -print | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${TMP_SLIMDIR}
.for _CONF in ${CONFFILES}
@ -139,8 +174,35 @@ do-build:
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${TMP_DOCSDIR}
.endif
post-build:
@${RM} -f ${PLIST}
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${MKDIR} -m 0755 ${PREFIX}/${SLIMDIR}
@${LN} -s ${SLIMDBDIR}/cache ${PREFIX}/${SLIMDIR}/Cache
@cd ${TMP_SLIMDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${PREFIX}/${SLIMDIR}
@${LN} -s ${LOCALBASE}/share/mysql/errmsg.txt \
${PREFIX}/${SLIMDIR}/MySQL/
@${LN} -s ${LOCALBASE}/share/mysql/english/errmsg.sys \
${PREFIX}/${SLIMDIR}/MySQL/
@${INSTALL_SCRIPT} ${WRKDIR}/softsqueeze.sh ${PREFIX}/bin/softsqueeze
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${TMP_DOCSDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${DOCSDIR}
.endif
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO}
@${CAT} ${PKGMESSAGE}
build-plist:
@${CAT} /dev/null > ${PLIST}
echo bin/softsqueeze >> ${PLIST}
.for _CONF in ${CONFFILES}
@${ECHO} '@unexec if cmp -s %D/%%SLIMDIR%%/${_CONF} %D/%%SLIMDIR%%/${_CONF}.sample; then rm -f %D/%%SLIMDIR%%/${_CONF}; fi' >> ${PLIST}
.endfor
@ -171,30 +233,4 @@ post-build:
@${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 ${SLIMDBDIR}/cache ${PREFIX}/${SLIMDIR}/Cache
@cd ${TMP_SLIMDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${PREFIX}/${SLIMDIR}
@${LN} -s ${LOCALBASE}/share/mysql/errmsg.txt \
${PREFIX}/${SLIMDIR}/MySQL/
@${LN} -s ${LOCALBASE}/share/mysql/english/errmsg.sys \
${PREFIX}/${SLIMDIR}/MySQL/
@${INSTALL_SCRIPT} ${WRKDIR}/softsqueeze.sh ${PREFIX}/bin/softsqueeze
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${TMP_DOCSDIR} && \
${FIND} . | \
${CPIO} ${CPIOARGS} ${BINOWN}:${BINGRP} ${DOCSDIR}
.endif
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,3 +1,6 @@
MD5 (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 6ffa0002b47dc6a77649289a3ad7f8b9
SHA256 (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 7e9bb04006cb61b1a527c37e4ae2be437f78236e1301869bbfea852ff601e27a
SIZE (slimserver/SlimServer_v6.5.4.no-cpan-arch.tar.gz) = 15757045
MD5 (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 55925e50fd016c999a812e522fdcc931
SHA256 (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 78bbb0c0e296b1d19dee1f5c9d88f996f7cd43808f8798f2baded6dd2c334df7
SIZE (squeezecenter/squeezecenter-7.0-noCPAN.tgz) = 18464419
MD5 (squeezecenter/YAML-Syck-0.64.tar.gz) = 51054b5da582e381158f10276f82ae15
SHA256 (squeezecenter/YAML-Syck-0.64.tar.gz) = 70ff201165020c7aeadeb4bd1a6233462994a07a7153c8f5570a3698b0207e07
SIZE (squeezecenter/YAML-Syck-0.64.tar.gz) = 128255

View File

@ -1,151 +0,0 @@
$FreeBSD$
--- Bin/build-perl-modules.pl.orig
+++ Bin/build-perl-modules.pl
@@ -24,14 +24,14 @@
# The list of all the packages needed.
my %packages = (
- 'Compress::Zlib' => 'Compress-Zlib-1.41.tar.gz',
- 'DBI' => 'DBI-1.50.tar.gz',
- '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.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',
+# 'DBI' => 'DBI-1.50.tar.gz',
+# '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.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',
);
@@ -57,6 +57,13 @@
'env' => [qw(DBI-1.50/blib/lib: DBI-1.50/blib/arch)],
},
+
+ 'XML-Parser-2.34' => {
+ 'Makefile.PL' => join(' ', qw(
+ EXPATLIBPATH="%%LOCALBASE%%/lib"
+ EXPATINCPATH="%%LOCALBASE%%/include"
+ )),
+ },
);
sub main {
@@ -73,28 +80,14 @@
print "*** Ignore any warnings about AppConfig. ***\n\n";
- print "Please enter a perl binary to use (defaults to /usr/bin/perl)\n";
- print "This must be the same perl binary that you ran this program with --> ";
- chomp($perlBinary = <STDIN>);
-
- $perlBinary ||= '/usr/bin/perl';
+ $perlBinary = '/usr/bin/perl';
unless (-f $perlBinary && -x $perlBinary) {
die "Couldn't find a perl binary. Exiting.\n";
}
# Where does their slimserver live? Try to guess.
- if (-f 'slimserver.pl' && -d 'CPAN/arch') {
-
- $slimServerPath = cwd();
-
- } else {
-
- print "Please enter the path to your SlimServer directory (ex: /usr/local/slimserver) --> ";
- chomp($slimServerPath = <STDIN>);
- }
-
- $slimServerPath ||= '/usr/local/slimserver';
+ $slimServerPath ||= '%%TMP_SLIMDIR%%';
unless (-d $slimServerPath) {
die "Couldn't find a valid SlimServer path. Exiting.\n";
@@ -109,12 +102,7 @@
# This is where the binaries will end up.
my $cpanDest = "$slimServerPath/CPAN/arch/$version/$archname/auto";
- # Where do they want the downloads to go?
- print "Please enter a directory to download files to --> ";
- chomp($downloadPath = <STDIN>);
-
- # Default to the current directory.
- $downloadPath ||= '.';
+ $downloadPath = '%%CPANWRKDIR%%';
# Remove trailing slash
$downloadPath =~ s|^(.+?)/$|$1|;
@@ -127,30 +115,6 @@
my $pwd = cwd();
- # What do we want to download with?
- eval { require LWP::Simple };
-
- # No LWP - try a command line program.
- if ($@) {
-
- for my $cmd (qw(curl wget)) {
-
- if ($downloadUsing = which($cmd)) {
- last;
- }
- }
-
- } else {
-
- $downloadUsing = 'lwp';
- }
-
- unless ($downloadUsing) {
- die "Couldn't find any valid downloaders - install LWP, wget or curl.\n";
- } else {
- print "Downloads will use $downloadUsing to fetch tarballs.\n";
- }
-
# Only download the packages that were passsed.
my @packages = ();
@@ -189,30 +153,8 @@
chdir($pwd) or die "Couldn't change to $pwd : $!";
- print "\nDownloading $package to: $pwd\n";
-
- # Remove any previous version.
- unlink $package;
-
- if ($downloadUsing eq 'lwp') {
-
- LWP::Simple::getstore("$SOURCE/$package?view=auto", $package);
-
- } elsif ($downloadUsing =~ /curl$/) {
-
- `$downloadUsing --silent -o $package $SOURCE/$package?view=auto`;
-
- } else {
-
- `$downloadUsing -q -O $package $SOURCE/$package?view=auto`;
- }
-
- unless (-r $package) {
- print "Something looks wrong - I couldn't read $pwd/$package, which I just downloaded.\n";
- }
-
- print "Uncompressing..\n";
- `gzip -d < $package | tar xvf -`;
+ print "\nExtracting $package in: $pwd\n";
+ `tar xfvz %%DISTDIR%%/$package`;
unlink $package;

View File

@ -3,20 +3,18 @@ $FreeBSD$
--- Slim/Networking/mDNS.pm.orig
+++ Slim/Networking/mDNS.pm
@@ -100,7 +100,6 @@
@@ -131,11 +131,12 @@
my ($name, $port) = @$data;
+ # mDNSResponderPosix can handle an extra space at the front,
+ # but prints an error if on occurs at the end.
+ print CONF "\n";
print CONF "$name\n";
print CONF "$service\n";
- print CONF "TXT\n";
print CONF "$port\n";
print CONF "\n";
}
@@ -113,7 +112,7 @@
return;
- print CONF "\n";
}
- 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");
close(CONF);

View File

@ -1,14 +0,0 @@
$FreeBSD$
--- Slim/Utils/Misc.pm.orig
+++ Slim/Utils/Misc.pm
@@ -107,7 +107,7 @@
if (Slim::Utils::OSDetect::OS() ne "win") {
- 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 {

View File

@ -0,0 +1,92 @@
$FreeBSD$
--- Slim/Utils/OSDetect.pm.orig
+++ Slim/Utils/OSDetect.pm
@@ -125,7 +125,7 @@
if ($detectedOS ne "win") {
- 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/local/libexec /usr/libexec /sw/bin /usr/sbin));
} else {
@@ -248,6 +248,48 @@
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
+ } elsif (isFreeBSD()) {
+
+ if ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL|lib|Bin)$/) {
+
+ push @dirs, "%%PREFIX%%/squeezecenter/$dir";
+
+ } elsif ($dir eq 'Plugins') {
+ push @dirs, "%%SITE_PERL%%", "%%PREFIX%%/squeezecenter/Plugins";
+
+ } elsif ($dir eq 'strings' || $dir eq 'revision') {
+
+ push @dirs, "%%PREFIX%%/squeezecenter";
+
+ } elsif ($dir eq 'types' || $dir eq 'convert') {
+
+ push @dirs, "%%PREFIX%%/squeezecenter";
+
+ } elsif ($dir eq 'prefs') {
+
+ push @dirs, "%%SLIMDBDIR%%/prefs";
+
+ } elsif ($dir eq 'log') {
+
+ push @dirs, "/var/log/squeezecenter";
+
+ } elsif ($dir eq 'cache') {
+
+ push @dirs, "%%SLIMDBDIR%%/cache";
+
+ } elsif ($dir eq 'MySQL') {
+
+ # Do nothing - use the depended upon MySQL install.
+
+ } elsif ($dir =~ /^(?:music|playlists)$/) {
+
+ push @dirs, '';
+
+ } else {
+
+ warn "dirsFor: Didn't find a match request: [$dir]\n";
+ }
+
# Red Hat/Fedora/SUSE RPM specific paths.
} elsif (isRHorSUSE()) {
@@ -432,6 +474,28 @@
return isReadyNAS();
}
+=head2 isFreeBSD( )
+
+ The FreeBSD package has some specific differences for file locations.
+ This routine needs no args, and returns 1 if FreeBSD is detected, with
+ a clear sign that the port/package has been installed, 0 if not.
+
+=cut
+
+sub isFreeBSD {
+
+ # Initialize
+ my $OS = OS();
+ my $details = details();
+
+ if ($details->{'osName'} eq 'freebsd' && $0 =~ m{^/usr/local/squeezecenter} ) {
+ return 1;
+ }
+
+ return 0;
+}
+
+
sub isRHorSUSE {
# Initialize

View File

@ -3,32 +3,12 @@ $FreeBSD$
--- Slim/Utils/Prefs.pm.orig
+++ Slim/Utils/Prefs.pm
@@ -392,6 +392,10 @@
$path = $Bin . '/Playlists';
+ } elsif (Slim::Utils::OSDetect::OS() eq 'unix') {
+
+ $path = "%%SLIMDBDIR%%/playlists";
+
} else {
$path = '';
@@ -424,7 +428,7 @@
} elsif ($os eq 'unix') {
- $CacheDir = catdir($ENV{'HOME'},'Cache');
+ $CacheDir = "%%SLIMDBDIR%%/cache";
} elsif ($os eq 'win' && Slim::Utils::OSDetect::details->{'osName'} =~ /Vista/) {
@@ -1022,7 +1026,7 @@
$prefsPath = $Bin;
}
} else {
- $prefsPath = $ENV{'HOME'};
+ $prefsPath = "%%SLIMDBDIR%%";
}
$::d_prefs && msg("The default prefs directory is $prefsPath\n");
@@ -235,7 +235,7 @@
],
'titleFormatWeb' => 1,
# Server Settings - UserInterface
- 'skin' => 'Default',
+ 'skin' => '%%DEFAULT_SKIN%%',
'itemsPerPage' => 50,
'refreshRate' => 30,
'coverArt' => '',

View File

@ -0,0 +1,18 @@
$FreeBSD$
--- Slim/Utils/Prefs/OldPrefs.pm.orig
+++ Slim/Utils/Prefs/OldPrefs.pm
@@ -117,7 +117,11 @@
$oldPrefs = catdir($ENV{'HOME'}, 'slimserver.pref');
- } else {
+ } elsif (-r '/var/db/slimserver/slimserver.conf') {
+
+ $oldPrefs = '/var/db/slimserver/slimserver.conf';
+
+ }else {
$log->warn("no old preference file found - using default preferences");

View File

@ -0,0 +1,14 @@
$FreeBSD$
--- Slim/Web/HTTP.pm.orig
+++ Slim/Web/HTTP.pm
@@ -54,7 +54,7 @@
$Template::Config::CONTEXT = 'Slim::Web::Template::Context';
}
-use constant defaultSkin => 'Default';
+use constant defaultSkin => '%%DEFAULT_SKIN%%';
use constant baseSkin => 'EN';
use constant HALFYEAR => 60 * 60 * 24 * 180;

View File

@ -7,11 +7,11 @@ $FreeBSD$
# specific combinations match before wildcards
mov mp3 * *
- [mov123] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r - -
+ [faad] -w -f 2 $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r - -
- [mov123] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
+ [faad] $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
alc mp3 * *
[alac] -r $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ -b $BITRATE$ -r -x - -
[alac] -r $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r -x - -
ogg mp3 * *
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ -r - -
@ -19,7 +19,7 @@ $FreeBSD$
wav mp3 * *
[lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ $FILE$ -
@@ -91,7 +91,7 @@
@@ -88,7 +88,7 @@
-
ogg aif * *
@ -37,16 +37,16 @@ $FreeBSD$
wma wma squeezebox2 *
-
@@ -133,7 +133,7 @@
[shorten] -x $FILE$ - | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -
@@ -130,7 +130,7 @@
[flac] -cs --totally-silent --compression-level-0 --skip=$START$ --until=$END$ -- $FILE$
ogg flc * *
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channel 2 --bps 16 --sample-rate 44100 --sign signed -
+ [oggdec] -Q -o - $FILE$ | [flac] -cs --compression-level-0 --totally-silent --endian big --channel 2 --bps 16 --sample-rate 44100 --sign signed -
- [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channels 2 --bps 16 --sample-rate 44100 --sign signed -
+ [oggdec] -Q -o - $FILE$ | [flac] -cs --compression-level-0 --totally-silent --endian big --channels 2 --bps 16 --sample-rate 44100 --sign signed -
wma flc * *
[wmadec] -r 44100 -b 16 -n 2 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -
@@ -145,7 +145,7 @@
@@ -142,7 +142,7 @@
[mac] $FILE$ - -d | [flac] -cs --totally-silent --compression-level-0 -
mov flc * *

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/audio/squeezecenter/files/Attic/pkg-install.in,v 1.3 2007-07-15 03:47:20 brooks Exp $
# $FreeBSD: /tmp/pcvs/ports/audio/squeezecenter/files/Attic/pkg-install.in,v 1.4 2008-04-02 17:30:27 brooks Exp $
name=slimserver
u=%%SLIMUSER%%
@ -7,17 +7,17 @@ g=%%SLIMGROUP%%
ugid=104
homedir=/nonexistent
shell=/sbin/nologin
comment="Slim Devices SlimServer pseudo-user"
comment="Slim Devices SlimServer/SqueezeCenter pseudo-user"
slimdir="%%PREFIX%%/%%SLIMDIR%%"
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
conffile=${statedir}/slimserver.conf
conffile=${statedir}/squeezecenter.conf
playlistdir=${statedir}/playlists
pidfile=/var/run/${name}.pid
newsyslogfile=/etc/newsyslog.conf
logfile=/var/log/slimserver.log
logcomment="# added by audio/slimserver port"
logline="${logfile} ${u}:${g} 644 3 100 * Z ${pidfile}"
logfile=/var/log/squeezecenter.log
logcomment="# added by audio/squeezecenter port"
logline="${logfile} ${u}:${g} 644 3 100 * J ${pidfile}"
case $2 in
PRE-INSTALL)
@ -53,9 +53,6 @@ POST-INSTALL)
if [ -d ${playlistdir} ]; then
chown -R ${u}:${g} ${playlistdir}
fi
if [ -d /var/run/slimserver ]; then
chown -R ${u}:${g} /var/run/slimserver
fi
if [ -f ${conffile} ]; then
chown ${u}:${g} ${conffile}
fi
@ -65,7 +62,7 @@ POST-INSTALL)
if egrep -q "^${logfile}\>" ${newsyslogfile}; then
echo "Using existing ${newsyslogfile} entry."
else
echo "Adding slimserver log entry to ${newsyslogfile}."
echo "Adding squeezecenter log entry to ${newsyslogfile}."
echo "$logcomment" >> ${newsyslogfile}
echo "$logline" >> ${newsyslogfile}
fi

View File

@ -1,78 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: slimserver
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable slimserver:
#
#slimserver_enable="YES"
#
. %%RC_SUBR%%
name=slimserver
start_precmd="slimserver_start_precmd"
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=%%SLIMDBDIR%%
cachedir=${statedir}/cache
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
slimserver_start_precmd()
{
if [ ! -d ${statedir} ]; then
mkdir -p ${statedir}
chown -R ${u}:${g} ${statedir}
fi
if [ ! -d ${cachedir} ]; then
mkdir -p ${cachedir}
chown -R ${u}:${g} ${cachedir}
fi
if [ ! -d ${playlistdir} ]; then
mkdir -p ${playlistdir}
chown -R ${u}:${g} ${playlistdir}
fi
if [ ! -f ${conffile} ]; then
touch ${conffile}
chown ${u}:${g} ${conffile}
fi
if [ ! -f ${logfile} ]; then
touch ${logfile}
chown ${u}:${g} ${logfile}
fi
}
slimserver_poststop()
{
# 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}
slimserver_enable=${slimserver_enable:-"NO"}
slimserver_flags=${slimserver_flags:-""}
run_rc_command "$1"

View File

@ -3,36 +3,36 @@
# $FreeBSD$
#
# PROVIDE: slimserver
# PROVIDE: squeezecenter
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable slimserver:
# Add the following lines to /etc/rc.conf to enable squeezecenter:
#
#slimserver_enable="YES"
#squeezecenter_enable="YES"
#
. %%RC_SUBR%%
name=slimserver
start_precmd="slimserver_start_precmd"
stop_postcmd="slimserver_poststop"
name=squeezecenter
start_precmd="squeezecenter_start_precmd"
rcvar=`set_rcvar`
command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl
command_interpreter=%%PERL%%
pidfile=/var/run/${name}.pid
logfile=/var/log/slimserver.log
logfile=/var/log/squeezecenter.log
statedir=%%SLIMDBDIR%%
cachedir=${statedir}/cache
prefsdir=${statedir}/prefs
playlistdir=${statedir}/playlists
conffile=${statedir}/slimserver.conf
conffile=${statedir}/squeezecenter.conf
u=%%SLIMUSER%%
g=%%SLIMGROUP%%
command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}"
slimserver_start_precmd()
squeezecenter_start_precmd()
{
if [ ! -d ${statedir} ]; then
mkdir -p ${statedir}
@ -42,6 +42,10 @@ slimserver_start_precmd()
mkdir -p ${cachedir}
chown -R ${u}:${g} ${cachedir}
fi
if [ ! -d ${prefsdir} ]; then
mkdir -p ${prefsdir}
chown -R ${u}:${g} ${prefsdir}
fi
if [ ! -d ${playlistdir} ]; then
mkdir -p ${playlistdir}
chown -R ${u}:${g} ${playlistdir}
@ -56,23 +60,9 @@ slimserver_start_precmd()
fi
}
slimserver_poststop()
{
# 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}
slimserver_enable=${slimserver_enable:-"NO"}
slimserver_flags=${slimserver_flags:-""}
squeezecenter_enable=${squeezecenter_enable:-"NO"}
squeezecenter_flags=${squeezecenter_flags:-""}
run_rc_command "$1"

File diff suppressed because it is too large Load Diff