summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-05-26 00:18:37 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-05-26 00:18:37 +0000
commit6f7503c6d8c8e0365ef43230ffba504ba7ce6ef6 (patch)
treef15a1d4f085bb6cf5f3dff80139061d115bf0a7e /media-sound/squeezecenter/files
parentsec-policy: bump selinux policy (diff)
downloadgentoo-2-6f7503c6d8c8e0365ef43230ffba504ba7ce6ef6.tar.gz
gentoo-2-6f7503c6d8c8e0365ef43230ffba504ba7ce6ef6.tar.bz2
gentoo-2-6f7503c6d8c8e0365ef43230ffba504ba7ce6ef6.zip
Add 7.0.2 beta nightly for 2008-05-24; introduce new file layout
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-sound/squeezecenter/files')
-rw-r--r--media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt25
-rw-r--r--media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch176
-rwxr-xr-xmedia-sound/squeezecenter/files/squeezecenter-7.0.2.init.d46
3 files changed, 247 insertions, 0 deletions
diff --git a/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt b/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt
new file mode 100644
index 000000000000..dd14cc682cdd
--- /dev/null
+++ b/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt
@@ -0,0 +1,25 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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 $
+
+The standard SqueezeCenter package is installed differently on Gentoo in order
+that the installation complies with Gentoo's filesystem layout. These notes
+are provided to give guidance for installing plugins within this modified
+layout.
+
+INSTALLING PLUGINS
+
+The installation instructions of plugins should be followed but with the
+following Gentoo specifics:
+
+* Plugins should be installed into the directory:
+ /var/lib/squeezecenter/Plugins
+* Extension binaries (which sometimes accompany plugins) should be installed
+ into the directory:
+ /usr/lib/squeezecenter/Bin
+
+BACKGROUND
+
+Those interested can refer to the following for details of Gentoo's filesystem
+standard:
+http://devmanual.gentoo.org/general-concepts/filesystem/index.html
diff --git a/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch b/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch
new file mode 100644
index 000000000000..5d529afb8a13
--- /dev/null
+++ b/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch
@@ -0,0 +1,176 @@
+--- Slim/Utils/OSDetect.pm.old 2008-05-23 18:55:39.000000000 +0100
++++ Slim/Utils/OSDetect.pm 2008-05-25 20:21:54.000000000 +0100
+@@ -1,6 +1,6 @@
+ package Slim::Utils::OSDetect;
+
+-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
++# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
+
+ # SqueezeCenter Copyright 2001-2007 Logitech.
+ # This program is free software; you can redistribute it and/or
+@@ -248,6 +248,58 @@
+ warn "dirsFor: Didn't find a match request: [$dir]\n";
+ }
+
++ } elsif (isGentoo()) {
++
++ if ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL)$/) {
++
++ push @dirs, "/usr/share/squeezecenter/$dir";
++
++ } elsif ($dir =~ /^(?:lib)$/) {
++
++ push @dirs, "/usr/lib/squeezecenter";
++
++ } elsif ($dir eq 'UserPluginRoot') {
++
++ push @dirs, "/var/lib/squeezecenter";
++
++ } elsif ($dir eq 'Plugins') {
++
++ push @dirs, "/var/lib/squeezecenter/Plugins";
++ push @dirs, "/usr/lib/" . $Config{'package'} . "/vendor_perl/" . $Config{'version'} . "/Slim/Plugin"
++
++ } elsif ($dir eq 'strings' || $dir eq 'revision') {
++
++ push @dirs, "/usr/share/squeezecenter";
++
++ } elsif ($dir =~ /^(?:types|convert)$/) {
++
++ push @dirs, "/etc/squeezecenter";
++
++ } elsif ($dir =~ /^(?:prefs)$/) {
++
++ push @dirs, "/var/lib/squeezecenter/prefs";
++
++ } elsif ($dir eq 'log') {
++
++ push @dirs, "/var/log/squeezecenter";
++
++ } elsif ($dir eq 'cache') {
++
++ push @dirs, "/var/lib/squeezecenter/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 +484,19 @@
+ return isReadyNAS();
+ }
+
++sub isGentoo {
++
++ # Initialize
++ my $OS = OS();
++ my $details = details();
++
++ if ($details->{'osName'} eq 'Gentoo') {
++ return 1;
++ }
++
++ return 0;
++}
++
+ sub isRHorSUSE {
+
+ # Initialize
+@@ -553,6 +618,10 @@
+
+ $osDetails{'osName'} = 'Debian';
+
++ } elsif (-f '/etc/gentoo-release') {
++
++ $osDetails{'osName'} = 'Gentoo';
++
+ } elsif (-f '/etc/redhat_release' || -f '/etc/redhat-release') {
+
+ $osDetails{'osName'} = 'Red Hat';
+@@ -570,7 +639,7 @@
+ $osDetails{'osArch'} = $Config{'myarchname'};
+
+ # package specific addition to @INC to cater for plugin locations
+- if (isDebian()) {
++ if (isDebian() || isGentoo()) {
+
+ unshift @INC, '/usr/share/squeezecenter';
+ unshift @INC, '/usr/share/squeezecenter/CPAN';
+--- Slim/Music/Import.pm.old 2008-05-23 21:57:18.000000000 +0100
++++ Slim/Music/Import.pm 2008-05-23 21:57:59.000000000 +0100
+@@ -139,7 +139,7 @@
+
+ $command = '/usr/libexec/squeezecenter-scanner';
+
+- } elsif (Slim::Utils::OSDetect::isDebian()) {
++ } elsif (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isGentoo()) {
+
+ $command = '/usr/sbin/squeezecenter-scanner';
+
+--- Slim/bootstrap.pm.old 2008-05-23 21:23:18.000000000 +0100
++++ Slim/bootstrap.pm 2008-05-24 17:01:16.000000000 +0100
+@@ -1,6 +1,6 @@
+ package Slim::bootstrap;
+
+-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
++# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
+ #
+ # SqueezeCenter Copyright 2001-2007 Logitech.
+ # This program is free software; you can redistribute it and/or
+@@ -97,8 +97,9 @@
+
+ my @SlimINC = ();
+
+- if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE()) {
+- # On Debian, RH and SUSE, our CPAN directory is located in the same dir as strings.txt
++ if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE() || Slim::Utils::OSDetect::isGentoo()) {
++ # On Debian, Gentoo, RH and SUSE, our CPAN directory is located in the
++ # same dir as strings.txt
+ $libPath = Slim::Utils::OSDetect::dirsFor('strings');
+ }
+
+@@ -125,6 +126,14 @@
+ $libPath,
+ );
+
++ if (Slim::Utils::OSDetect::isGentoo()) {
++ # On Gentoo, the lib directory is located separately to the CPAN
++ # directory as it's not architecture-independent, and make sure we
++ # also look at the separate user plugins directory.
++ push @SlimINC, Slim::Utils::OSDetect::dirsFor('lib');
++ push @SlimINC, Slim::Utils::OSDetect::dirsFor('UserPluginRoot');
++ }
++
+ $d_startup && printf("Got \@INC containing:\n%s\n\n", join("\n", @INC));
+
+ # This works like 'use lib'
+--- Slim/Utils/MySQLHelper.pm.old 2008-05-24 13:21:24.000000000 +0100
++++ Slim/Utils/MySQLHelper.pm 2008-05-24 17:01:16.000000000 +0100
+@@ -1,6 +1,6 @@
+ package Slim::Utils::MySQLHelper;
+
+-# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
++# $Id: filepaths-7.0.2-gentoo.patch,v 1.1 2008/05/26 00:18:37 lavajoe Exp $
+
+ =head1 NAME
+
+@@ -152,7 +152,7 @@
+
+ # Because we use the system MySQL, we need to point to the right
+ # directory for the errmsg. files. Default to english.
+- if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE()) {
++ if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHorSUSE() || Slim::Utils::OSDetect::isGentoo()) {
+
+ $config{'language'} = '/usr/share/mysql/english';
+ }
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d b/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d
new file mode 100755
index 000000000000..e81616e9e183
--- /dev/null
+++ b/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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 $
+
+# These fit the SqueezeCenter ebuild and so shouldn't need to be changed;
+# user-servicable parts go in /etc/conf.d/squeezecenter.
+pidfile=/var/run/squeezecenter/squeezecenter.pid
+logdir=/var/log/squeezecenter
+varlibdir=/var/lib/squeezecenter
+prefsdir=${varlibdir}/prefs
+cachedir=${varlibdir}/cache
+prefsfile=${prefsdir}/squeezecenter.prefs
+scuser=squeezecenter
+
+depend() {
+ need net mysql
+}
+
+start() {
+ ebegin "Starting SqueezeCenter"
+
+ cd /
+ /usr/bin/nice --adjustment=${SC_NICENESS:-0} sudo -u ${scuser} \
+ start-stop-daemon \
+ --start --quiet \
+ --name slimserver.pl \
+ --exec /usr/sbin/squeezecenter-server -- \
+ --quiet --daemon \
+ --pidfile=${pidfile} \
+ --cachedir=${cachedir} \
+ --prefsfile=${prefsfile} \
+ --prefsdir=${prefsdir} \
+ --logdir=${logdir} \
+ --audiodir=${SC_MUSIC_DIR} \
+ --playlistdir=${SC_PLAYLISTS_DIR} \
+ ${SC_OPTS}
+
+ eend $? "Failed to start SqueezeCenter"
+}
+
+stop() {
+ ebegin "Stopping SqueezeCenter"
+ start-stop-daemon -o --stop --quiet --pidfile ${pidfile}
+ eend $? "Failed to stop SqueezeCenter"
+}