freebsd-ports/audio/logitechmediaserver/files/Custom.pm.in
Ben Woods 9ecc2f4ce0 Move audio/squeezeboxserver to audio/logitechmediaserver
audio/squeezeboxserver:
- Move to audio/logitechmediaserver
- Update to 7.9.0 pre-release (git commit from 7.9 branch on 2016.09.30)
- Change default install and database locations to suit new PORTNAME
- Remove softsqueeze.sh as it is no longer bundled with the server
- Add /usr/local/etc/newsyslog.conf.d/, don't edit /etc/newsyslog.conf
- Add LICENSE details
- Update maintainer (previous maintainer timeout)
- Use customized perl modules provided in distfile and slimserver-vendor
  GitHub repo, rather than using perl dependencies from ports
- Changed install method to now copy directly to stagedir instead of an
  intermediate step to TMP_SLIMDIR

audio/squeezeboxserver-dynamicplaylist:
- Move to audio/logitechmediaserver-dynamicplaylist
- Update to 2.9.3853
- Fix MASTER_SITES
- Add LICENSE details
- Update maintainer

audio/squeezeboxserver-lazysearch:
- Move to audio/logitechmediaserver-lazysearch
- Add LICENSE details
- Update maintainer

audio/squeezeboxserver-sqlplaylist:
- Move to audio/logitechmediaserver-sqlplaylist
- Update to 2.5.3859
- Fix MASTER_SITES
- Add LICENSE details
- Update maintainer

audio/squeezeboxserver-superdatetime:
- Move to audio/logitechmediaserver-superdatetime
- Add LICENSE details
- Update maintainer

audio/squeezeboxserver-trackstat:
- Move to audio/logitechmediaserver-trackstat
- Update to 3.2.3951
- Fix MASTER_SITES
- Add LICENSE details
- Update maintainer

PR:		180034
PR:		203266
Submitted by:	woodsb02, mark@tranquillussoftware.co.uk (new maintainer)
Reported by:	david@dawninglight.net, amdmi3
Approved by:	markk@knigma.org (maintainer timeout), tdb (maintainer), adamw (mentor)
Differential Revision:	https://reviews.freebsd.org/D6483
2016-10-05 22:50:25 +00:00

88 lines
1.7 KiB
Perl

package Slim::Utils::OS::Custom;
#package Slim::Utils::OS::FreeBSD;
use strict;
use base qw(Slim::Utils::OS::Unix);
use Config;
sub initDetails {
my $class = shift;
$class->{osDetails} = $class->SUPER::initDetails();
$class->{osDetails}->{'os'} = 'FreeBSD';
$class->{osDetails}->{osName} = 'FreeBSD';
return $class->{osDetails};
}
sub initSearchPath {
my $class = shift;
$class->SUPER::initSearchPath();
my @extra_paths = qw(/usr/local/libexec);
Slim::Utils::Misc::addFindBinPaths(@extra_paths);
}
sub dirsFor {
my ($class, $dir) = @_;
my @dirs;
if ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL|lib|Bin)$/) {
push @dirs, "%%PREFIX%%/%%SLIMDIR%%/$dir";
} elsif ($dir eq 'Plugins') {
push @dirs, "%%SITE_PERL%%", "%%PREFIX%%/%%SLIMDIR%%/Plugins", "%%PREFIX%%/%%SLIMDIR%%/Slim/Plugin", "%%SLIMDBDIR%%/cache/InstalledPlugins/Plugins";
} elsif ($dir eq 'strings' || $dir eq 'revision') {
push @dirs, "%%PREFIX%%/%%SLIMDIR%%";
} elsif ($dir eq 'types' || $dir eq 'convert') {
push @dirs, "%%PREFIX%%/%%SLIMDIR%%";
} elsif ($dir eq 'prefs') {
push @dirs, "%%SLIMDBDIR%%/prefs";
} elsif ($dir eq 'log') {
push @dirs, "/var/log/%%PORTNAME%%";
} elsif ($dir eq 'cache' || $dir eq 'updates' || $dir eq 'oldprefs') {
push @dirs, "%%SLIMDBDIR%%/cache";
} elsif ($dir =~ /^(?:libpath|mysql-language)$/) {
# Do nothing - use the depended upon MySQL install.
} elsif ($dir eq 'scprefs') {
if (-r '%%SLIMDBDIR%%/prefs/server.prefs') {
push @dirs, '%%SLIMDBDIR%%/prefs';
}
} elsif ($dir =~ /^(?:music|playlists|videos|pictures)$/) {
push @dirs, '';
} else {
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
return wantarray() ? @dirs : $dirs[0];
}
1;