blob: ebc245b152bde024de8781a3efedea781d563ab0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
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%%/squeezecenter/$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%%/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 =~ /^(?:libpath|mysql-language)$/) {
# Do nothing - use the depended upon MySQL install.
} elsif ($dir eq 'oldprefs') {
if (-r '/var/db/slimserver/slimserver.conf') {
push @dirs, '/var/db/slimserver/slimserver.conf';
}
} else {
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
return wantarray() ? @dirs : $dirs[0];
}
1;
|