summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-08-31 19:56:40 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-08-31 19:56:40 +0000
commit5ab8acfba0c23fb178c39cb20b29f4a1e9119ed1 (patch)
treed844df0f7bdae08f08b9b4827e07af1506af304a /media-sound
parentstable on ppc (diff)
downloadgentoo-2-5ab8acfba0c23fb178c39cb20b29f4a1e9119ed1.tar.gz
gentoo-2-5ab8acfba0c23fb178c39cb20b29f4a1e9119ed1.tar.bz2
gentoo-2-5ab8acfba0c23fb178c39cb20b29f4a1e9119ed1.zip
Add new version 7.2.0; remove old ebuilds and files
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/squeezecenter/ChangeLog15
-rw-r--r--media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt25
-rw-r--r--media-sound/squeezecenter/files/avahi-7.0-squeezecenter.service18
-rw-r--r--media-sound/squeezecenter/files/dbcreate-7.0-gentoo.sql6
-rw-r--r--media-sound/squeezecenter/files/dbdrop-7.0-gentoo.sql2
-rw-r--r--media-sound/squeezecenter/files/filepaths-gentoo.patch (renamed from media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch)38
-rw-r--r--media-sound/squeezecenter/files/mDNSResponder-gentoo.patch (renamed from media-sound/squeezecenter/files/mDNSResponder-7.0-gentoo.patch)4
-rwxr-xr-xmedia-sound/squeezecenter/files/squeezecenter-7.0.2.init.d46
-rw-r--r--media-sound/squeezecenter/files/squeezecenter-7.0.conf.d21
-rwxr-xr-xmedia-sound/squeezecenter/files/squeezecenter-7.0.init.d46
-rw-r--r--media-sound/squeezecenter/files/squeezecenter-7.0.logrotate.d11
-rw-r--r--media-sound/squeezecenter/files/squeezecenter-7.0.prefs3
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.2.0.ebuild (renamed from media-sound/squeezecenter/squeezecenter-7.0.1.ebuild)164
13 files changed, 142 insertions, 257 deletions
diff --git a/media-sound/squeezecenter/ChangeLog b/media-sound/squeezecenter/ChangeLog
index 9db5643ea18b..e4a4a0df2410 100644
--- a/media-sound/squeezecenter/ChangeLog
+++ b/media-sound/squeezecenter/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for media-sound/squeezecenter
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v 1.20 2008/08/03 04:35:28 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v 1.21 2008/08/31 19:56:39 lavajoe Exp $
+
+*squeezecenter-7.2.0 (31 Aug 2008)
+
+ 31 Aug 2008; Joe Peterson <lavajoe@gentoo.org>
+ -files/Gentoo-plugins-7.0.2-README.txt,
+ -files/filepaths-7.0.2-gentoo.patch, -files/squeezecenter-7.0.2.init.d,
+ -files/mDNSResponder-7.0-gentoo.patch, -files/dbcreate-7.0-gentoo.sql,
+ -files/dbdrop-7.0-gentoo.sql, -files/avahi-7.0-squeezecenter.service,
+ -files/squeezecenter-7.0.conf.d, -files/squeezecenter-7.0.init.d,
+ -files/squeezecenter-7.0.logrotate.d, -files/squeezecenter-7.0.prefs,
+ +files/filepaths-gentoo.patch, +files/mDNSResponder-gentoo.patch,
+ -squeezecenter-7.0.1.ebuild, +squeezecenter-7.2.0.ebuild:
+ Add new version 7.2.0; remove old ebuilds and files
*squeezecenter-7.1.0 (03 Aug 2008)
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
deleted file mode 100644
index dd14cc682cdd..000000000000
--- a/media-sound/squeezecenter/files/Gentoo-plugins-7.0.2-README.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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/avahi-7.0-squeezecenter.service b/media-sound/squeezecenter/files/avahi-7.0-squeezecenter.service
deleted file mode 100644
index 6643b3fe8d56..000000000000
--- a/media-sound/squeezecenter/files/avahi-7.0-squeezecenter.service
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
-<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
-
-<service-group>
-
- <name>SqueezeCenter</name>
-
- <service>
- <type>_http._tcp</type>
- <port>9000</port>
- </service>
-
- <service>
- <type>_slimhttp._tcp</type>
- <port>9000</port>
- </service>
-
-</service-group>
diff --git a/media-sound/squeezecenter/files/dbcreate-7.0-gentoo.sql b/media-sound/squeezecenter/files/dbcreate-7.0-gentoo.sql
deleted file mode 100644
index 939b75a90bad..000000000000
--- a/media-sound/squeezecenter/files/dbcreate-7.0-gentoo.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-CREATE DATABASE __DATABASE__;
-
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
- ON *.*
- TO '__DBUSER__'@'localhost'
- IDENTIFIED BY '__DBPASSWORD__'
diff --git a/media-sound/squeezecenter/files/dbdrop-7.0-gentoo.sql b/media-sound/squeezecenter/files/dbdrop-7.0-gentoo.sql
deleted file mode 100644
index 1d3bc8d696aa..000000000000
--- a/media-sound/squeezecenter/files/dbdrop-7.0-gentoo.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-DROP DATABASE __DATABASE__;
-DROP USER '__DBUSER__'@'localhost';
diff --git a/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch b/media-sound/squeezecenter/files/filepaths-gentoo.patch
index b500716abed9..c5c00e28f432 100644
--- a/media-sound/squeezecenter/files/filepaths-7.0.2-gentoo.patch
+++ b/media-sound/squeezecenter/files/filepaths-gentoo.patch
@@ -1,6 +1,6 @@
---- Slim/Utils/OSDetect.pm.old 2008-05-23 18:55:39.000000000 +0100
-+++ Slim/Utils/OSDetect.pm 2008-05-26 15:56:10.000000000 +0100
-@@ -248,6 +248,58 @@
+--- Slim/Utils/OSDetect.pm.old 2008-07-22 12:25:34.000000000 +0100
++++ Slim/Utils/OSDetect.pm 2008-07-22 12:27:06.000000000 +0100
+@@ -253,6 +253,58 @@
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
@@ -59,7 +59,7 @@
# Red Hat/Fedora/SUSE RPM specific paths.
} elsif (isRHorSUSE()) {
-@@ -432,6 +484,19 @@
+@@ -465,6 +517,19 @@
return isReadyNAS();
}
@@ -79,7 +79,7 @@
sub isRHorSUSE {
# Initialize
-@@ -553,6 +618,10 @@
+@@ -586,6 +651,10 @@
$osDetails{'osName'} = 'Debian';
@@ -90,7 +90,7 @@
} elsif (-f '/etc/redhat_release' || -f '/etc/redhat-release') {
$osDetails{'osName'} = 'Red Hat';
-@@ -570,7 +639,7 @@
+@@ -603,7 +672,7 @@
$osDetails{'osArch'} = $Config{'myarchname'};
# package specific addition to @INC to cater for plugin locations
@@ -99,21 +99,19 @@
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-30 12:29:57.000000000 +0100
-@@ -143,6 +143,10 @@
+--- Slim/Music/Import.pm.old 2008-07-22 12:24:32.000000000 +0100
++++ Slim/Music/Import.pm 2008-07-22 12:27:06.000000000 +0100
+@@ -128,7 +128,7 @@
- $command = '/usr/sbin/squeezecenter-scanner';
+ $command = '/usr/libexec/squeezecenter-scanner';
-+ } elsif (Slim::Utils::OSDetect::isGentoo()) {
-+
-+ $command = '/usr/sbin/squeezecenter-scanner';
-+
- }
+- } elsif (Slim::Utils::OSDetect::isDebian()) {
++ } elsif (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isGentoo()) {
+
+ $command = '/usr/sbin/squeezecenter-scanner';
- # Bug: 3530 - use the same version of perl we were started with.
---- Slim/bootstrap.pm.old 2008-05-23 21:23:18.000000000 +0100
-+++ Slim/bootstrap.pm 2008-05-26 15:54:12.000000000 +0100
+--- Slim/bootstrap.pm.old 2008-07-22 12:24:09.000000000 +0100
++++ Slim/bootstrap.pm 2008-07-22 12:27:06.000000000 +0100
@@ -97,8 +97,9 @@
my @SlimINC = ();
@@ -141,8 +139,8 @@
$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-26 15:55:55.000000000 +0100
+--- Slim/Utils/MySQLHelper.pm.old 2008-07-22 12:25:31.000000000 +0100
++++ Slim/Utils/MySQLHelper.pm 2008-07-22 12:27:06.000000000 +0100
@@ -152,7 +152,7 @@
# Because we use the system MySQL, we need to point to the right
diff --git a/media-sound/squeezecenter/files/mDNSResponder-7.0-gentoo.patch b/media-sound/squeezecenter/files/mDNSResponder-gentoo.patch
index 54e77488eb74..8a3559ed1ee8 100644
--- a/media-sound/squeezecenter/files/mDNSResponder-7.0-gentoo.patch
+++ b/media-sound/squeezecenter/files/mDNSResponder-gentoo.patch
@@ -1,5 +1,5 @@
---- Slim/Networking/mDNS.pm.old 2007-12-27 22:08:39.000000000 +0000
-+++ Slim/Networking/mDNS.pm 2007-12-27 22:09:58.000000000 +0000
+--- Slim/Networking/mDNS.pm.old 2008-07-22 12:25:06.000000000 +0100
++++ Slim/Networking/mDNS.pm 2008-07-22 12:26:38.000000000 +0100
@@ -131,11 +131,10 @@
my ($name, $port) = @$data;
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d b/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d
deleted file mode 100755
index 9f3ee9de709f..000000000000
--- a/media-sound/squeezecenter/files/squeezecenter-7.0.2.init.d
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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.2 2008/06/03 21:22:03 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
-scname=squeezecenter-server
-
-depend() {
- need net mysql
-}
-
-start() {
- ebegin "Starting SqueezeCenter"
-
- cd /
- /usr/bin/nice --adjustment=${SC_NICENESS:-0} sudo -u ${scuser} \
- start-stop-daemon \
- --start --exec /usr/bin/perl /usr/sbin/${scname} \
- -- \
- --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 --pidfile ${pidfile}
- eend $? "Failed to stop SqueezeCenter"
-}
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.conf.d b/media-sound/squeezecenter/files/squeezecenter-7.0.conf.d
deleted file mode 100644
index d7a70fd79adb..000000000000
--- a/media-sound/squeezecenter/files/squeezecenter-7.0.conf.d
+++ /dev/null
@@ -1,21 +0,0 @@
-# /etc/conf.d/squeezecenter
-
-# Niceness level for the SqueezeCenter process. If not specified then the
-# default is to run at standard priority. Uncomment the following to run at a
-# high priority (in order to try to minimise drop-outs due to audio starvation
-# of the players):
-#SC_NICENESS=-10
-
-# Default path of your music library and playlists. You can leave these
-# undefined and configure them through the web interface instead.
-#SC_MUSIC_DIR=/mnt/media/Music
-#SC_PLAYLISTS_DIR=/mnt/media/Playlists
-
-# The following contains any other options you want to specify, such as default
-# logging options. The example below will prevent the discovery and display of
-# UPNP devices within your players.
-#
-# See "squeezecenter.pl --help" for a full list of possible options, but note
-# that many of them are supplied by /etc/init.d/squeezecenter and so don't need
-# to be present here.
-#SC_OPTS="--noupnp"
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.init.d b/media-sound/squeezecenter/files/squeezecenter-7.0.init.d
deleted file mode 100755
index d7ce479ec3bb..000000000000
--- a/media-sound/squeezecenter/files/squeezecenter-7.0.init.d
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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.init.d,v 1.2 2008/04/20 17:27:13 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
-cachedir=/var/cache/squeezecenter
-prefsdir=${cachedir}/prefs
-prefsfile=/etc/squeezecenter.prefs
-scdir=/opt/squeezecenter
-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 ${scdir}/slimserver.pl -- \
- --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"
-}
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.logrotate.d b/media-sound/squeezecenter/files/squeezecenter-7.0.logrotate.d
deleted file mode 100644
index ff95a284fb5e..000000000000
--- a/media-sound/squeezecenter/files/squeezecenter-7.0.logrotate.d
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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.logrotate.d,v 1.1 2008/01/07 01:33:35 lavajoe Exp $
-
-/var/log/squeezecenter/scanner.log /var/log/squeezecenter/server.log /var/log/squeezecenter/perfmon.log {
- missingok
- notifempty
- copytruncate
- rotate 5
- size 100k
-}
diff --git a/media-sound/squeezecenter/files/squeezecenter-7.0.prefs b/media-sound/squeezecenter/files/squeezecenter-7.0.prefs
deleted file mode 100644
index a14b3fab8375..000000000000
--- a/media-sound/squeezecenter/files/squeezecenter-7.0.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-dbusername: squeezecenter
-dbpassword: TBA
-dbsource: dbi:mysql:database=squeezecenter;mysql_socket=/var/run/mysqld/mysqld.sock
diff --git a/media-sound/squeezecenter/squeezecenter-7.0.1.ebuild b/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild
index 7ffab606d94b..5c99a929e24c 100644
--- a/media-sound/squeezecenter/squeezecenter-7.0.1.ebuild
+++ b/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild
@@ -1,18 +1,17 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0.1.ebuild,v 1.1 2008/05/21 16:24:32 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.2.0.ebuild,v 1.1 2008/08/31 19:56:39 lavajoe Exp $
inherit eutils
MAJOR_VER="${PV:0:3}"
MINOR_VER="${PV:4:1}"
SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}"
-SRC_FILE="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN.tgz"
-MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN"
+MY_P="squeezecenter-${MAJOR_VER}-noCPAN"
DESCRIPTION="Logitech SqueezeCenter music server"
HOMEPAGE="http://www.slimdevices.com/pi_features.html"
-SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${SRC_FILE}"
+SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
@@ -44,10 +43,14 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
+PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs"
+LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs"
+DOCDIR="/usr/share/doc/squeezecenter-${MAJOR_VER}.${MINOR_VER}"
+SHAREDIR="/usr/share/squeezecenter"
+LIBDIR="/usr/lib/squeezecenter"
DBUSER="squeezecenter"
+OLDPLUGINSDIR=/opt/squeezecenter/Plugins
+NEWPLUGINSDIR=/var/lib/squeezecenter/Plugins
pkg_setup() {
# Sox has optional OGG support, so make sure it has been built that way
@@ -60,7 +63,7 @@ pkg_setup() {
# Create the user and group if not already present
enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
+ enewuser squeezecenter -1 -1 "/dev/null" squeezecenter || die
}
src_unpack() {
@@ -68,21 +71,8 @@ src_unpack() {
cd "${S}"
# Apply patches
- epatch "${FILESDIR}/mDNSResponder-${MAJOR_VER}-gentoo.patch"
-
- # Remove bundled binaries that are supplied by other ebuilds
- einfo "Removing binaries provided by other ebuilds ..."
- rm "${S}"/Bin/*/mDNSResponderPosix || die # net-misc/mDNSResponder
- rm "${S}"/Bin/*/alac || die # media-sound/alac_decoder
- rm "${S}"/Bin/*/flac || die # media-libs/flac
- rm "${S}"/Bin/*/sox || die # media-sound/sox
- rm "${S}"/Bin/*/wvunpack || die # media-sound/wavpack
- rm "${S}"/Bin/*/mppdec || die # media-sound/musepack-tools
-
- # Remove bundled MySQL as we depend on an external instance
- einfo "Removing bundled MySQL ..."
- rm -r "${S}"/MySQL || die
- rm "${S}"/Bin/*/mysqld || die # virtual/mysql
+ epatch "${FILESDIR}/mDNSResponder-gentoo.patch"
+ epatch "${FILESDIR}/filepaths-gentoo.patch"
}
src_compile() {
@@ -92,29 +82,76 @@ src_compile() {
}
src_install() {
- # Copy all files.
- dodir "${INSTROOT}/squeezecenter"
- cp -r * "${D}/${INSTROOT}/squeezecenter"
- # Install init scripts.
- newconfd "${FILESDIR}/squeezecenter-${MAJOR_VER}.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-${MAJOR_VER}.init.d" squeezecenter
-
- # Install default preferences.
- insinto /etc
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.prefs" squeezecenter.prefs
-
- # Install the SQL configuration scripts.
- insinto "${INSTROOT}/squeezecenter/SQL/mysql"
- doins "${FILESDIR}/dbdrop-${MAJOR_VER}-gentoo.sql"
- doins "${FILESDIR}/dbcreate-${MAJOR_VER}-gentoo.sql"
-
- # Initialize /var/{cache,run}.
- keepdir /var/{cache,run}/squeezecenter
- fowners squeezecenter:squeezecenter /var/{cache,run}/squeezecenter
- fperms 770 /var/{cache,run}/squeezecenter
-
- # Initialize /var/log.
+ # The main Perl executables
+ exeinto /usr/sbin
+ newexe slimserver.pl squeezecenter-server
+ newexe scanner.pl squeezecenter-scanner
+
+ # Get the Perl package name and version
+ eval `perl '-V:package'`
+ eval `perl '-V:version'`
+
+ # The server Perl modules
+ dodir "/usr/lib/${package}/vendor_perl/${version}"
+ cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}"
+
+ # Various directories of architecture-independent static files
+ dodir "${SHAREDIR}"
+ cp -r Firmware "${D}/${SHAREDIR}"
+ cp -r Graphics "${D}/${SHAREDIR}"
+ cp -r HTML "${D}/${SHAREDIR}"
+ cp -r IR "${D}/${SHAREDIR}"
+ cp -r SQL "${D}/${SHAREDIR}"
+ cp -r CPAN "${D}/${SHAREDIR}"
+
+ # Architecture-dependent static files
+ dodir "${LIBDIR}"
+ cp -r lib/* "${D}/${LIBDIR}"
+
+ # Strings and version identification
+ insinto "${SHAREDIR}"
+ doins strings.txt
+ doins revision.txt
+
+ # Documentation
+ dodoc Changelog*.html
+ dodoc Installation.txt
+ dodoc License*.txt
+ newdoc "${FILESDIR}/Gentoo-plugins-README.txt" Gentoo-plugins-README.txt
+
+ # Configuration files
+ insinto /etc/squeezecenter
+ doins convert.conf
+ doins types.conf
+ doins modules.conf
+
+ # Install init scripts
+ newconfd "${FILESDIR}/squeezecenter.conf.d" squeezecenter
+ newinitd "${FILESDIR}/squeezecenter.init.d" squeezecenter
+
+ # Install default preferences
+ insinto /var/lib/squeezecenter/prefs
+ newins "${FILESDIR}/squeezecenter.prefs" squeezecenter.prefs
+ fowners squeezecenter:squeezecenter /var/lib/squeezecenter/prefs
+ fperms 770 /var/lib/squeezecenter/prefs
+
+ # Install the SQL configuration scripts
+ insinto "${SHAREDIR}/SQL/mysql"
+ doins "${FILESDIR}/dbdrop-gentoo.sql"
+ doins "${FILESDIR}/dbcreate-gentoo.sql"
+
+ # Initialize run directory (where the PID file lives)
+ dodir /var/run/squeezecenter
+ fowners squeezecenter:squeezecenter /var/run/squeezecenter
+ fperms 770 /var/run/squeezecenter
+
+ # Initialize server cache directory
+ dodir /var/lib/squeezecenter/cache
+ fowners squeezecenter:squeezecenter /var/lib/squeezecenter/cache
+ fperms 770 /var/lib/squeezecenter/cache
+
+ # Initialize the log directory
dodir /var/log/squeezecenter
fowners squeezecenter:squeezecenter /var/log/squeezecenter
fperms 770 /var/log/squeezecenter
@@ -125,14 +162,17 @@ src_install() {
fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
- # Install logrotate support.
+ # Initialise the user-installed plugins directory
+ dodir "${NEWPLUGINSDIR}"
+
+ # Install logrotate support
insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
+ newins "${FILESDIR}/squeezecenter.logrotate.d" squeezecenter
- # Install Avahi support (if USE flag is set).
+ # Install Avahi support (if USE flag is set)
if use avahi; then
insinto /etc/avahi/services
- newins "${FILESDIR}/avahi-${MAJOR_VER}-squeezecenter.service" squeezecenter.service
+ newins "${FILESDIR}/avahi-squeezecenter.service" squeezecenter.service
fi
}
@@ -151,7 +191,7 @@ sc_starting_instr() {
# Discover the port number from the preferences, but if it isn't there
# then report the standard one.
- httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${CACHED_PREFS}" 2>/dev/null)
+ httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${LIVE_PREFS}" 2>/dev/null)
elog "You may access and configure SqueezeCenter by browsing to:"
elog "\thttp://localhost:${httpport:-9000}/"
}
@@ -288,23 +328,35 @@ pkg_config() {
# from this as it probably just indicates that the database wasn't
# yet present.
einfo "Dropping old SqueezeCenter database and user ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbdrop-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1
+ 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
# Drop and create the SqueezeCenter user and database.
einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbcreate-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user"
+ 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"
# Remove the existing MySQL preferences from SqueezeCenter (if any).
sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_PREFS}
+ [ -f "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS}
# Insert the external MySQL configuration into the preferences.
sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- [ -f "${CACHED_PREFS}" ] && sc_update_prefs "${CACHED_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
+ [ -f "${LIVE_PREFS}" ] && sc_update_prefs "${LIVE_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- # Phew - all done.
- # Give some tips on what to do now.
+ # Phew - all done. Give some tips on what to do now.
einfo "Database configuration complete."
einfo ""
sc_starting_instr
}
+
+pkg_preinst() {
+ # Warn the user if there are old plugins that he may need to migrate
+ if [ -d "${OLDPLUGINSDIR}" ]; then
+ if [ ! -z "$(ls ${OLDPLUGINSDIR})" ]; then
+ ewarn "Note: It appears that plugins are installed in the old location of:"
+ ewarn "${OLDPLUGINSDIR}"
+ ewarn "If these are to be used then they must be migrated to the new location:"
+ ewarn "${NEWPLUGINSDIR}"
+ ewarn ""
+ fi
+ fi
+}