1 |
lavajoe 08/08/31 19:56:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: squeezecenter-7.2.0.ebuild |
5 |
Removed: squeezecenter-7.0.1.ebuild |
6 |
Log: |
7 |
Add new version 7.2.0; remove old ebuilds and files |
8 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686) |
9 |
|
10 |
Revision Changes Path |
11 |
1.21 media-sound/squeezecenter/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/ChangeLog?rev=1.21&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/ChangeLog?rev=1.21&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/ChangeLog?r1=1.20&r2=1.21 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v |
20 |
retrieving revision 1.20 |
21 |
retrieving revision 1.21 |
22 |
diff -u -r1.20 -r1.21 |
23 |
--- ChangeLog 3 Aug 2008 04:35:28 -0000 1.20 |
24 |
+++ ChangeLog 31 Aug 2008 19:56:39 -0000 1.21 |
25 |
@@ -1,6 +1,19 @@ |
26 |
# ChangeLog for media-sound/squeezecenter |
27 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v 1.20 2008/08/03 04:35:28 lavajoe Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v 1.21 2008/08/31 19:56:39 lavajoe Exp $ |
30 |
+ |
31 |
+*squeezecenter-7.2.0 (31 Aug 2008) |
32 |
+ |
33 |
+ 31 Aug 2008; Joe Peterson <lavajoe@g.o> |
34 |
+ -files/Gentoo-plugins-7.0.2-README.txt, |
35 |
+ -files/filepaths-7.0.2-gentoo.patch, -files/squeezecenter-7.0.2.init.d, |
36 |
+ -files/mDNSResponder-7.0-gentoo.patch, -files/dbcreate-7.0-gentoo.sql, |
37 |
+ -files/dbdrop-7.0-gentoo.sql, -files/avahi-7.0-squeezecenter.service, |
38 |
+ -files/squeezecenter-7.0.conf.d, -files/squeezecenter-7.0.init.d, |
39 |
+ -files/squeezecenter-7.0.logrotate.d, -files/squeezecenter-7.0.prefs, |
40 |
+ +files/filepaths-gentoo.patch, +files/mDNSResponder-gentoo.patch, |
41 |
+ -squeezecenter-7.0.1.ebuild, +squeezecenter-7.2.0.ebuild: |
42 |
+ Add new version 7.2.0; remove old ebuilds and files |
43 |
|
44 |
*squeezecenter-7.1.0 (03 Aug 2008) |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
1.1 media-sound/squeezecenter/squeezecenter-7.2.0.ebuild |
50 |
|
51 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild?rev=1.1&view=markup |
52 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild?rev=1.1&content-type=text/plain |
53 |
|
54 |
Index: squeezecenter-7.2.0.ebuild |
55 |
=================================================================== |
56 |
# Copyright 1999-2008 Gentoo Foundation |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild,v 1.1 2008/08/31 19:56:39 lavajoe Exp $ |
59 |
|
60 |
inherit eutils |
61 |
|
62 |
MAJOR_VER="${PV:0:3}" |
63 |
MINOR_VER="${PV:4:1}" |
64 |
SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" |
65 |
MY_P="squeezecenter-${MAJOR_VER}-noCPAN" |
66 |
|
67 |
DESCRIPTION="Logitech SqueezeCenter music server" |
68 |
HOMEPAGE="http://www.slimdevices.com/pi_features.html" |
69 |
SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz" |
70 |
LICENSE="GPL-2" |
71 |
SLOT="0" |
72 |
KEYWORDS="~amd64 ~ppc ~x86" |
73 |
IUSE="lame wavpack musepack alac ogg bonjour flac avahi" |
74 |
|
75 |
# Note: dev-perl/module-build necessary because of SC bug#5882 |
76 |
# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). |
77 |
DEPEND=" |
78 |
dev-perl/File-Which |
79 |
dev-perl/module-build |
80 |
virtual/logger |
81 |
virtual/mysql |
82 |
avahi? ( net-dns/avahi ) |
83 |
ogg? ( media-sound/sox ) |
84 |
" |
85 |
# Note: dev-perl/GD necessary because of SC bug#6143 |
86 |
# (http://bugs.slimdevices.com/show_bug.cgi?id=6143). |
87 |
RDEPEND="${DEPEND} |
88 |
>=dev-lang/perl-5.8.8 |
89 |
>=dev-perl/GD-2.35 |
90 |
>=app-admin/sudo-1.6.8 |
91 |
alac? ( media-sound/alac_decoder ) |
92 |
lame? ( media-sound/lame ) |
93 |
wavpack? ( media-sound/wavpack ) |
94 |
bonjour? ( net-misc/mDNSResponder ) |
95 |
flac? ( media-libs/flac ) |
96 |
musepack? ( media-sound/musepack-tools ) |
97 |
" |
98 |
|
99 |
S="${WORKDIR}/${MY_P}" |
100 |
|
101 |
PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs" |
102 |
LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs" |
103 |
DOCDIR="/usr/share/doc/squeezecenter-${MAJOR_VER}.${MINOR_VER}" |
104 |
SHAREDIR="/usr/share/squeezecenter" |
105 |
LIBDIR="/usr/lib/squeezecenter" |
106 |
DBUSER="squeezecenter" |
107 |
OLDPLUGINSDIR=/opt/squeezecenter/Plugins |
108 |
NEWPLUGINSDIR=/var/lib/squeezecenter/Plugins |
109 |
|
110 |
pkg_setup() { |
111 |
# Sox has optional OGG support, so make sure it has been built that way |
112 |
if use ogg; then |
113 |
if ! built_with_use media-sound/sox ogg; then |
114 |
eerror "media-sound/sox not built with USE=ogg" |
115 |
die "media-sound/sox not built with USE=ogg" |
116 |
fi |
117 |
fi |
118 |
|
119 |
# Create the user and group if not already present |
120 |
enewgroup squeezecenter || die |
121 |
enewuser squeezecenter -1 -1 "/dev/null" squeezecenter || die |
122 |
} |
123 |
|
124 |
src_unpack() { |
125 |
unpack ${A} |
126 |
cd "${S}" |
127 |
|
128 |
# Apply patches |
129 |
epatch "${FILESDIR}/mDNSResponder-gentoo.patch" |
130 |
epatch "${FILESDIR}/filepaths-gentoo.patch" |
131 |
} |
132 |
|
133 |
src_compile() { |
134 |
einfo "Building required Perl modules (some warnings are normal here) ..." |
135 |
mkdir "${T}/sc_compile" |
136 |
echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" |
137 |
} |
138 |
|
139 |
src_install() { |
140 |
|
141 |
# The main Perl executables |
142 |
exeinto /usr/sbin |
143 |
newexe slimserver.pl squeezecenter-server |
144 |
newexe scanner.pl squeezecenter-scanner |
145 |
|
146 |
# Get the Perl package name and version |
147 |
eval `perl '-V:package'` |
148 |
eval `perl '-V:version'` |
149 |
|
150 |
# The server Perl modules |
151 |
dodir "/usr/lib/${package}/vendor_perl/${version}" |
152 |
cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" |
153 |
|
154 |
# Various directories of architecture-independent static files |
155 |
dodir "${SHAREDIR}" |
156 |
cp -r Firmware "${D}/${SHAREDIR}" |
157 |
cp -r Graphics "${D}/${SHAREDIR}" |
158 |
cp -r HTML "${D}/${SHAREDIR}" |
159 |
cp -r IR "${D}/${SHAREDIR}" |
160 |
cp -r SQL "${D}/${SHAREDIR}" |
161 |
cp -r CPAN "${D}/${SHAREDIR}" |
162 |
|
163 |
# Architecture-dependent static files |
164 |
dodir "${LIBDIR}" |
165 |
cp -r lib/* "${D}/${LIBDIR}" |
166 |
|
167 |
# Strings and version identification |
168 |
insinto "${SHAREDIR}" |
169 |
doins strings.txt |
170 |
doins revision.txt |
171 |
|
172 |
# Documentation |
173 |
dodoc Changelog*.html |
174 |
dodoc Installation.txt |
175 |
dodoc License*.txt |
176 |
newdoc "${FILESDIR}/Gentoo-plugins-README.txt" Gentoo-plugins-README.txt |
177 |
|
178 |
# Configuration files |
179 |
insinto /etc/squeezecenter |
180 |
doins convert.conf |
181 |
doins types.conf |
182 |
doins modules.conf |
183 |
|
184 |
# Install init scripts |
185 |
newconfd "${FILESDIR}/squeezecenter.conf.d" squeezecenter |
186 |
newinitd "${FILESDIR}/squeezecenter.init.d" squeezecenter |
187 |
|
188 |
# Install default preferences |
189 |
insinto /var/lib/squeezecenter/prefs |
190 |
newins "${FILESDIR}/squeezecenter.prefs" squeezecenter.prefs |
191 |
fowners squeezecenter:squeezecenter /var/lib/squeezecenter/prefs |
192 |
fperms 770 /var/lib/squeezecenter/prefs |
193 |
|
194 |
# Install the SQL configuration scripts |
195 |
insinto "${SHAREDIR}/SQL/mysql" |
196 |
doins "${FILESDIR}/dbdrop-gentoo.sql" |
197 |
doins "${FILESDIR}/dbcreate-gentoo.sql" |
198 |
|
199 |
# Initialize run directory (where the PID file lives) |
200 |
dodir /var/run/squeezecenter |
201 |
fowners squeezecenter:squeezecenter /var/run/squeezecenter |
202 |
fperms 770 /var/run/squeezecenter |
203 |
|
204 |
# Initialize server cache directory |
205 |
dodir /var/lib/squeezecenter/cache |
206 |
fowners squeezecenter:squeezecenter /var/lib/squeezecenter/cache |
207 |
fperms 770 /var/lib/squeezecenter/cache |
208 |
|
209 |
# Initialize the log directory |
210 |
dodir /var/log/squeezecenter |
211 |
fowners squeezecenter:squeezecenter /var/log/squeezecenter |
212 |
fperms 770 /var/log/squeezecenter |
213 |
touch "${D}/var/log/squeezecenter/server.log" |
214 |
touch "${D}/var/log/squeezecenter/scanner.log" |
215 |
touch "${D}/var/log/squeezecenter/perfmon.log" |
216 |
fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log |
217 |
fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log |
218 |
fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log |
219 |
|
220 |
# Initialise the user-installed plugins directory |
221 |
dodir "${NEWPLUGINSDIR}" |
222 |
|
223 |
# Install logrotate support |
224 |
insinto /etc/logrotate.d |
225 |
newins "${FILESDIR}/squeezecenter.logrotate.d" squeezecenter |
226 |
|
227 |
# Install Avahi support (if USE flag is set) |
228 |
if use avahi; then |
229 |
insinto /etc/avahi/services |
230 |
newins "${FILESDIR}/avahi-squeezecenter.service" squeezecenter.service |
231 |
fi |
232 |
} |
233 |
|
234 |
sc_starting_instr() { |
235 |
elog "SqueezeCenter can be started with the following command:" |
236 |
elog "\t/etc/init.d/squeezecenter start" |
237 |
elog "" |
238 |
elog "SqueezeCenter can be automatically started on each boot with the" |
239 |
elog "following command:" |
240 |
elog "\trc-update add squeezecenter default" |
241 |
elog "" |
242 |
elog "You might want to examine and modify the following configuration" |
243 |
elog "file before starting SqueezeCenter:" |
244 |
elog "\t/etc/conf.d/squeezecenter" |
245 |
elog "" |
246 |
|
247 |
# Discover the port number from the preferences, but if it isn't there |
248 |
# then report the standard one. |
249 |
httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${LIVE_PREFS}" 2>/dev/null) |
250 |
elog "You may access and configure SqueezeCenter by browsing to:" |
251 |
elog "\thttp://localhost:${httpport:-9000}/" |
252 |
} |
253 |
|
254 |
pkg_postinst() { |
255 |
# FLAC and LAME are quite useful (but not essential) for SqueezeCenter - |
256 |
# if they're not enabled then make sure the user understands that. |
257 |
if ! use flac; then |
258 |
ewarn "'flac' USE flag is not set. Although not essential, FLAC is required" |
259 |
ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for" |
260 |
ewarn "playing other less common file types (if you have a Squeezebox 2, 3," |
261 |
ewarn "Receiver or Transporter)." |
262 |
ewarn "For maximum flexibility you are recommended to set the 'flac' USE flag". |
263 |
ewarn "" |
264 |
fi |
265 |
if ! use lame; then |
266 |
ewarn "'lame' USE flag is not set. Although not essential, LAME is" |
267 |
ewarn "required if you want to limit the bandwidth your Squeezebox or" |
268 |
ewarn "Transporter uses when streaming audio." |
269 |
ewarn "For maximum flexibility you are recommended to set the 'lame' USE flag". |
270 |
ewarn "" |
271 |
fi |
272 |
|
273 |
# Album art requires PNG and JPEG support from GD, so if it's not there |
274 |
# then warn the user. It's not mandatory as the user may not be using |
275 |
# album art. |
276 |
if ! built_with_use dev-perl/GD jpeg || \ |
277 |
! built_with_use dev-perl/GD png || \ |
278 |
! built_with_use media-libs/gd jpeg || \ |
279 |
! built_with_use media-libs/gd png; then |
280 |
ewarn "For correct operation of album art through SqueezeCenter's web" |
281 |
ewarn "interface the GD library and Perl module must be built with PNG" |
282 |
ewarn "and JPEG support. If necessary you can add the following lines" |
283 |
ewarn "to the file /etc/portage/package.use:" |
284 |
ewarn "\tdev-perl/GD jpeg png" |
285 |
ewarn "\tmedia-libs/gd jpeg png" |
286 |
ewarn "And then rebuild those packages with:" |
287 |
ewarn "\temerge --newuse dev-perl/GD media-libs/gd" |
288 |
ewarn "" |
289 |
fi |
290 |
|
291 |
# Point user to database configuration step |
292 |
elog "If this is a new installation of SqueezeCenter then the database" |
293 |
elog "must be configured prior to use. This can be done by running the" |
294 |
elog "following command:" |
295 |
elog "\temerge --config =${CATEGORY}/${PF}" |
296 |
|
297 |
# Remind user to configure Avahi if necessary |
298 |
if use avahi; then |
299 |
elog "" |
300 |
elog "Avahi support installed. Remember to edit the folowing file if" |
301 |
elog "you run SqueezeCenter's web interface on a port other than 9000:" |
302 |
elog "\t/etc/avahi/services/squeezecenter.service" |
303 |
fi |
304 |
|
305 |
elog "" |
306 |
sc_starting_instr |
307 |
} |
308 |
|
309 |
sc_remove_db_prefs() { |
310 |
MY_PREFS=$1 |
311 |
|
312 |
einfo "Configuring SqueezeCenter database preferences (${MY_PREFS}) ..." |
313 |
TMPPREFS="${T}"/squeezecenter-prefs-$$ |
314 |
touch "${ROOT}${MY_PREFS}" |
315 |
sed -e '/^dbusername:/d' -e '/^dbpassword:/d' -e '/^dbsource:/d' < "${ROOT}${MY_PREFS}" > "${TMPPREFS}" |
316 |
mv "${TMPPREFS}" "${ROOT}${MY_PREFS}" |
317 |
chown squeezecenter:squeezecenter "${ROOT}${MY_PREFS}" |
318 |
chmod 660 "${ROOT}${MY_PREFS}" |
319 |
} |
320 |
|
321 |
sc_update_prefs() { |
322 |
MY_PREFS=$1 |
323 |
MY_DBUSER=$2 |
324 |
MY_DBUSER_PASSWD=$3 |
325 |
|
326 |
echo "dbusername: ${MY_DBUSER}" >> "${ROOT}${MY_PREFS}" |
327 |
echo "dbpassword: ${MY_DBUSER_PASSWD}" >> "${ROOT}${MY_PREFS}" |
328 |
echo "dbsource: dbi:mysql:database=${MY_DBUSER};mysql_socket=/var/run/mysqld/mysqld.sock" >> "${ROOT}${MY_PREFS}" |
329 |
} |
330 |
|
331 |
pkg_config() { |
332 |
einfo "Press ENTER to create the SqueezeCenter database and set proper" |
333 |
einfo "permissions on it. You will be prompted for the MySQL 'root' user's" |
334 |
einfo "password during this process (note that the MySQL 'root' user is" |
335 |
einfo "independent of the Linux 'root' user and so may have a different" |
336 |
einfo "password)." |
337 |
einfo "" |
338 |
einfo "If you already have a SqueezeCenter database set up then this" |
339 |
einfo "process will clear the existing database (your music files will not," |
340 |
einfo "however, be affected)." |
341 |
einfo "" |
342 |
einfo "Alternatively, press Control-C to abort now..." |
343 |
read |
344 |
|
345 |
# Get the MySQL root password from the user (not echoed to the terminal) |
346 |
einfo "The MySQL 'root' user password is required to create the" |
347 |
einfo "SqueezeCenter user and database." |
348 |
DONE=0 |
349 |
while [ $DONE -eq 0 ]; do |
350 |
trap "stty echo; echo" EXIT |
351 |
stty -echo |
352 |
read -p "MySQL root password: " ROOT_PASSWD; echo |
353 |
stty echo |
354 |
trap ":" EXIT |
355 |
echo quit | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1 && DONE=1 |
356 |
if [ $DONE -eq 0 ]; then |
357 |
eerror "Incorrect MySQL root password, or MySQL is not running" |
358 |
fi |
359 |
done |
360 |
|
361 |
# Get the new password for the SqueezeCenter MySQL database user, and |
362 |
# have it re-entered to confirm it. We should trivially check it's not |
363 |
# the same as the MySQL root password. |
364 |
einfo "A new MySQL user will be added to own the SqueezeCenter database." |
365 |
einfo "Please enter the password for this new user (${DBUSER})." |
366 |
DONE=0 |
367 |
while [ $DONE -eq 0 ]; do |
368 |
trap "stty echo; echo" EXIT |
369 |
stty -echo |
370 |
read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo |
371 |
stty echo |
372 |
trap ":" EXIT |
373 |
if [ -z "$DBUSER_PASSWD" ]; then |
374 |
eerror "The password should not be blank; try again." |
375 |
elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then |
376 |
eerror "The ${DBUSER} password should be different to the root password" |
377 |
else |
378 |
DONE=1 |
379 |
fi |
380 |
done |
381 |
|
382 |
# Drop the existing database and user - note we don't care about errors |
383 |
# from this as it probably just indicates that the database wasn't |
384 |
# yet present. |
385 |
einfo "Dropping old SqueezeCenter database and user ..." |
386 |
sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${SHAREDIR}/SQL/mysql/dbdrop-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1 |
387 |
|
388 |
# Drop and create the SqueezeCenter user and database. |
389 |
einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..." |
390 |
sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${SHAREDIR}/SQL/mysql/dbcreate-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user" |
391 |
|
392 |
# Remove the existing MySQL preferences from SqueezeCenter (if any). |
393 |
sc_remove_db_prefs "${PREFS}" |
394 |
[ -f "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} |
395 |
|
396 |
# Insert the external MySQL configuration into the preferences. |
397 |
sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}" |
398 |
[ -f "${LIVE_PREFS}" ] && sc_update_prefs "${LIVE_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}" |
399 |
|
400 |
# Phew - all done. Give some tips on what to do now. |
401 |
einfo "Database configuration complete." |
402 |
einfo "" |
403 |
sc_starting_instr |
404 |
} |
405 |
|
406 |
pkg_preinst() { |
407 |
# Warn the user if there are old plugins that he may need to migrate |
408 |
if [ -d "${OLDPLUGINSDIR}" ]; then |
409 |
if [ ! -z "$(ls ${OLDPLUGINSDIR})" ]; then |
410 |
ewarn "Note: It appears that plugins are installed in the old location of:" |
411 |
ewarn "${OLDPLUGINSDIR}" |
412 |
ewarn "If these are to be used then they must be migrated to the new location:" |
413 |
ewarn "${NEWPLUGINSDIR}" |
414 |
ewarn "" |
415 |
fi |
416 |
fi |
417 |
} |