1 |
lavajoe 08/05/26 00:18:37 |
2 |
|
3 |
Added: squeezecenter-7.0.2.init.d |
4 |
filepaths-7.0.2-gentoo.patch |
5 |
Gentoo-plugins-7.0.2-README.txt |
6 |
Log: |
7 |
Add 7.0.2 beta nightly for 2008-05-24; introduce new file layout |
8 |
(Portage version: 2.1.4.4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: squeezecenter-7.0.2.init.d |
17 |
=================================================================== |
18 |
#!/sbin/runscript |
19 |
# Copyright 1999-2008 Gentoo Foundation |
20 |
# Distributed under the terms of the GNU General Public License v2 |
21 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
22 |
|
23 |
# These fit the SqueezeCenter ebuild and so shouldn't need to be changed; |
24 |
# user-servicable parts go in /etc/conf.d/squeezecenter. |
25 |
pidfile=/var/run/squeezecenter/squeezecenter.pid |
26 |
logdir=/var/log/squeezecenter |
27 |
varlibdir=/var/lib/squeezecenter |
28 |
prefsdir=${varlibdir}/prefs |
29 |
cachedir=${varlibdir}/cache |
30 |
prefsfile=${prefsdir}/squeezecenter.prefs |
31 |
scuser=squeezecenter |
32 |
|
33 |
depend() { |
34 |
need net mysql |
35 |
} |
36 |
|
37 |
start() { |
38 |
ebegin "Starting SqueezeCenter" |
39 |
|
40 |
cd / |
41 |
/usr/bin/nice --adjustment=${SC_NICENESS:-0} sudo -u ${scuser} \ |
42 |
start-stop-daemon \ |
43 |
--start --quiet \ |
44 |
--name slimserver.pl \ |
45 |
--exec /usr/sbin/squeezecenter-server -- \ |
46 |
--quiet --daemon \ |
47 |
--pidfile=${pidfile} \ |
48 |
--cachedir=${cachedir} \ |
49 |
--prefsfile=${prefsfile} \ |
50 |
--prefsdir=${prefsdir} \ |
51 |
--logdir=${logdir} \ |
52 |
--audiodir=${SC_MUSIC_DIR} \ |
53 |
--playlistdir=${SC_PLAYLISTS_DIR} \ |
54 |
${SC_OPTS} |
55 |
|
56 |
eend $? "Failed to start SqueezeCenter" |
57 |
} |
58 |
|
59 |
stop() { |
60 |
ebegin "Stopping SqueezeCenter" |
61 |
start-stop-daemon -o --stop --quiet --pidfile ${pidfile} |
62 |
eend $? "Failed to stop SqueezeCenter" |
63 |
} |
64 |
|
65 |
|
66 |
|
67 |
1.1 media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch |
68 |
|
69 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch?rev=1.1&view=markup |
70 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch?rev=1.1&content-type=text/plain |
71 |
|
72 |
Index: filepaths-7.0.2-gentoo.patch |
73 |
=================================================================== |
74 |
--- Slim/Utils/OSDetect.pm.old 2008-05-23 18:55:39.000000000 +0100 |
75 |
+++ Slim/Utils/OSDetect.pm 2008-05-25 20:21:54.000000000 +0100 |
76 |
@@ -1,6 +1,6 @@ |
77 |
package Slim::Utils::OSDetect; |
78 |
|
79 |
-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
80 |
+# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
81 |
|
82 |
# SqueezeCenter Copyright 2001-2007 Logitech. |
83 |
# This program is free software; you can redistribute it and/or |
84 |
@@ -248,6 +248,58 @@ |
85 |
warn "dirsFor: Didn't find a match request: [$dir]\n"; |
86 |
} |
87 |
|
88 |
+ } elsif (isGentoo()) { |
89 |
+ |
90 |
+ if ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL)$/) { |
91 |
+ |
92 |
+ push @dirs, "/usr/share/squeezecenter/$dir"; |
93 |
+ |
94 |
+ } elsif ($dir =~ /^(?:lib)$/) { |
95 |
+ |
96 |
+ push @dirs, "/usr/lib/squeezecenter"; |
97 |
+ |
98 |
+ } elsif ($dir eq 'UserPluginRoot') { |
99 |
+ |
100 |
+ push @dirs, "/var/lib/squeezecenter"; |
101 |
+ |
102 |
+ } elsif ($dir eq 'Plugins') { |
103 |
+ |
104 |
+ push @dirs, "/var/lib/squeezecenter/Plugins"; |
105 |
+ push @dirs, "/usr/lib/" . $Config{'package'} . "/vendor_perl/" . $Config{'version'} . "/Slim/Plugin" |
106 |
+ |
107 |
+ } elsif ($dir eq 'strings' || $dir eq 'revision') { |
108 |
+ |
109 |
+ push @dirs, "/usr/share/squeezecenter"; |
110 |
+ |
111 |
+ } elsif ($dir =~ /^(?:types|convert)$/) { |
112 |
+ |
113 |
+ push @dirs, "/etc/squeezecenter"; |
114 |
+ |
115 |
+ } elsif ($dir =~ /^(?:prefs)$/) { |
116 |
+ |
117 |
+ push @dirs, "/var/lib/squeezecenter/prefs"; |
118 |
+ |
119 |
+ } elsif ($dir eq 'log') { |
120 |
+ |
121 |
+ push @dirs, "/var/log/squeezecenter"; |
122 |
+ |
123 |
+ } elsif ($dir eq 'cache') { |
124 |
+ |
125 |
+ push @dirs, "/var/lib/squeezecenter/cache"; |
126 |
+ |
127 |
+ } elsif ($dir eq 'MySQL') { |
128 |
+ |
129 |
+ # Do nothing - use the depended upon MySQL install. |
130 |
+ |
131 |
+ } elsif ($dir =~ /^(?:music|playlists)$/) { |
132 |
+ |
133 |
+ push @dirs, ''; |
134 |
+ |
135 |
+ } else { |
136 |
+ |
137 |
+ warn "dirsFor: Didn't find a match request: [$dir]\n"; |
138 |
+ } |
139 |
+ |
140 |
# Red Hat/Fedora/SUSE RPM specific paths. |
141 |
} elsif (isRHorSUSE()) { |
142 |
|
143 |
@@ -432,6 +484,19 @@ |
144 |
return isReadyNAS(); |
145 |
} |
146 |
|
147 |
+sub isGentoo { |
148 |
+ |
149 |
+ # Initialize |
150 |
+ my $OS = OS(); |
151 |
+ my $details = details(); |
152 |
+ |
153 |
+ if ($details->{'osName'} eq 'Gentoo') { |
154 |
+ return 1; |
155 |
+ } |
156 |
+ |
157 |
+ return 0; |
158 |
+} |
159 |
+ |
160 |
sub isRHorSUSE { |
161 |
|
162 |
# Initialize |
163 |
@@ -553,6 +618,10 @@ |
164 |
|
165 |
$osDetails{'osName'} = 'Debian'; |
166 |
|
167 |
+ } elsif (-f '/etc/gentoo-release') { |
168 |
+ |
169 |
+ $osDetails{'osName'} = 'Gentoo'; |
170 |
+ |
171 |
} elsif (-f '/etc/redhat_release' || -f '/etc/redhat-release') { |
172 |
|
173 |
$osDetails{'osName'} = 'Red Hat'; |
174 |
@@ -570,7 +639,7 @@ |
175 |
$osDetails{'osArch'} = $Config{'myarchname'}; |
176 |
|
177 |
# package specific addition to @INC to cater for plugin locations |
178 |
- if (isDebian()) { |
179 |
+ if (isDebian() || isGentoo()) { |
180 |
|
181 |
unshift @INC, '/usr/share/squeezecenter'; |
182 |
unshift @INC, '/usr/share/squeezecenter/CPAN'; |
183 |
--- Slim/Music/Import.pm.old 2008-05-23 21:57:18.000000000 +0100 |
184 |
+++ Slim/Music/Import.pm 2008-05-23 21:57:59.000000000 +0100 |
185 |
@@ -139,7 +139,7 @@ |
186 |
|
187 |
$command = '/usr/libexec/squeezecenter-scanner'; |
188 |
|
189 |
- } elsif (Slim::Utils::OSDetect::isDebian()) { |
190 |
+ } elsif (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isGentoo()) { |
191 |
|
192 |
$command = '/usr/sbin/squeezecenter-scanner'; |
193 |
|
194 |
--- Slim/bootstrap.pm.old 2008-05-23 21:23:18.000000000 +0100 |
195 |
+++ Slim/bootstrap.pm 2008-05-24 17:01:16.000000000 +0100 |
196 |
@@ -1,6 +1,6 @@ |
197 |
package Slim::bootstrap; |
198 |
|
199 |
-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
200 |
+# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
201 |
# |
202 |
# SqueezeCenter Copyright 2001-2007 Logitech. |
203 |
# This program is free software; you can redistribute it and/or |
204 |
@@ -97,8 +97,9 @@ |
205 |
|
206 |
my @SlimINC = (); |
207 |
|
208 |
- if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE()) { |
209 |
- # On Debian, RH and SUSE, our CPAN directory is located in the same dir as strings.txt |
210 |
+ if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE() || Slim::Utils::OSDetect::isGentoo()) { |
211 |
+ # On Debian, Gentoo, RH and SUSE, our CPAN directory is located in the |
212 |
+ # same dir as strings.txt |
213 |
$libPath = Slim::Utils::OSDetect::dirsFor('strings'); |
214 |
} |
215 |
|
216 |
@@ -125,6 +126,14 @@ |
217 |
$libPath, |
218 |
); |
219 |
|
220 |
+ if (Slim::Utils::OSDetect::isGentoo()) { |
221 |
+ # On Gentoo, the lib directory is located separately to the CPAN |
222 |
+ # directory as it's not architecture-independent, and make sure we |
223 |
+ # also look at the separate user plugins directory. |
224 |
+ push @SlimINC, Slim::Utils::OSDetect::dirsFor('lib'); |
225 |
+ push @SlimINC, Slim::Utils::OSDetect::dirsFor('UserPluginRoot'); |
226 |
+ } |
227 |
+ |
228 |
$d_startup && printf("Got \@INC containing:\n%s\n\n", join("\n", @INC)); |
229 |
|
230 |
# This works like 'use lib' |
231 |
--- Slim/Utils/MySQLHelper.pm.old 2008-05-24 13:21:24.000000000 +0100 |
232 |
+++ Slim/Utils/MySQLHelper.pm 2008-05-24 17:01:16.000000000 +0100 |
233 |
@@ -1,6 +1,6 @@ |
234 |
package Slim::Utils::MySQLHelper; |
235 |
|
236 |
-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
237 |
+# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
238 |
|
239 |
=head1 NAME |
240 |
|
241 |
@@ -152,7 +152,7 @@ |
242 |
|
243 |
# Because we use the system MySQL, we need to point to the right |
244 |
# directory for the errmsg. files. Default to english. |
245 |
- if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE()) { |
246 |
+ if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE() || Slim::Utils::OSDetect::isGentoo()) { |
247 |
|
248 |
$config{'language'} = '/usr/share/mysql/english'; |
249 |
} |
250 |
|
251 |
|
252 |
|
253 |
1.1 media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt |
254 |
|
255 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt?rev=1.1&view=markup |
256 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt?rev=1.1&content-type=text/plain |
257 |
|
258 |
Index: Gentoo-plugins-7.0.2-README.txt |
259 |
=================================================================== |
260 |
# Copyright 1999-2008 Gentoo Foundation |
261 |
# Distributed under the terms of the GNU General Public License v2 |
262 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt,v 1.1 2008/05/26 00:18:37 lavajoe Exp $ |
263 |
|
264 |
The standard SqueezeCenter package is installed differently on Gentoo in order |
265 |
that the installation complies with Gentoo's filesystem layout. These notes |
266 |
are provided to give guidance for installing plugins within this modified |
267 |
layout. |
268 |
|
269 |
INSTALLING PLUGINS |
270 |
|
271 |
The installation instructions of plugins should be followed but with the |
272 |
following Gentoo specifics: |
273 |
|
274 |
* Plugins should be installed into the directory: |
275 |
/var/lib/squeezecenter/Plugins |
276 |
* Extension binaries (which sometimes accompany plugins) should be installed |
277 |
into the directory: |
278 |
/usr/lib/squeezecenter/Bin |
279 |
|
280 |
BACKGROUND |
281 |
|
282 |
Those interested can refer to the following for details of Gentoo's filesystem |
283 |
standard: |
284 |
http://devmanual.gentoo.org/general-concepts/filesystem/index.html |
285 |
|
286 |
|
287 |
|
288 |
-- |
289 |
gentoo-commits@l.g.o mailing list |