summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-08-03 04:35:29 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-08-03 04:35:29 +0000
commit25695453b66b3e8c96745a4a43e609cfbc66feab (patch)
treef0dd043a84dbef23367fa2e9c1802c4ad0d79b49
parentsmall purge since it caused problems for people (diff)
downloadgentoo-2-25695453b66b3e8c96745a4a43e609cfbc66feab.tar.gz
gentoo-2-25695453b66b3e8c96745a4a43e609cfbc66feab.tar.bz2
gentoo-2-25695453b66b3e8c96745a4a43e609cfbc66feab.zip
Add version 7.1.0; remove old versions
(Portage version: 2.1.4.4)
-rw-r--r--media-sound/squeezecenter/ChangeLog14
-rw-r--r--media-sound/squeezecenter/files/Gentoo-plugins-README.txt25
-rw-r--r--media-sound/squeezecenter/files/avahi-squeezecenter.service18
-rw-r--r--media-sound/squeezecenter/files/dbcreate-gentoo.sql6
-rw-r--r--media-sound/squeezecenter/files/dbdrop-gentoo.sql2
-rw-r--r--media-sound/squeezecenter/files/filepaths-7.1-gentoo.patch152
-rw-r--r--media-sound/squeezecenter/files/mDNSResponder-7.1-gentoo.patch15
-rw-r--r--media-sound/squeezecenter/files/squeezecenter.conf.d21
-rwxr-xr-xmedia-sound/squeezecenter/files/squeezecenter.init.d46
-rw-r--r--media-sound/squeezecenter/files/squeezecenter.logrotate.d11
-rw-r--r--media-sound/squeezecenter/files/squeezecenter.prefs3
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0-r1.ebuild310
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0.ebuild312
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.1.0.ebuild (renamed from media-sound/squeezecenter/squeezecenter-7.0.2_beta20080530.ebuild)31
14 files changed, 327 insertions, 639 deletions
diff --git a/media-sound/squeezecenter/ChangeLog b/media-sound/squeezecenter/ChangeLog
index 9ea663239571..9db5643ea18b 100644
--- a/media-sound/squeezecenter/ChangeLog
+++ b/media-sound/squeezecenter/ChangeLog
@@ -1,6 +1,18 @@
# 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.19 2008/07/29 22:29:00 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/ChangeLog,v 1.20 2008/08/03 04:35:28 lavajoe Exp $
+
+*squeezecenter-7.1.0 (03 Aug 2008)
+
+ 03 Aug 2008; Joe Peterson <lavajoe@gentoo.org>
+ +files/filepaths-7.1-gentoo.patch, +files/mDNSResponder-7.1-gentoo.patch,
+ +files/Gentoo-plugins-README.txt, +files/avahi-squeezecenter.service,
+ +files/dbcreate-gentoo.sql, +files/dbdrop-gentoo.sql,
+ +files/squeezecenter.conf.d, +files/squeezecenter.init.d,
+ +files/squeezecenter.logrotate.d, +files/squeezecenter.prefs,
+ -squeezecenter-7.0.ebuild, -squeezecenter-7.0-r1.ebuild,
+ -squeezecenter-7.0.2_beta20080530.ebuild, +squeezecenter-7.1.0.ebuild:
+ Add version 7.1.0; remove old versions
29 Jul 2008; Joe Peterson <lavajoe@gentoo.org> metadata.xml:
Add local use flags to metadata
diff --git a/media-sound/squeezecenter/files/Gentoo-plugins-README.txt b/media-sound/squeezecenter/files/Gentoo-plugins-README.txt
new file mode 100644
index 000000000000..fa27cdc20801
--- /dev/null
+++ b/media-sound/squeezecenter/files/Gentoo-plugins-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-README.txt,v 1.1 2008/08/03 04:35:29 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-squeezecenter.service b/media-sound/squeezecenter/files/avahi-squeezecenter.service
new file mode 100644
index 000000000000..6643b3fe8d56
--- /dev/null
+++ b/media-sound/squeezecenter/files/avahi-squeezecenter.service
@@ -0,0 +1,18 @@
+<?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-gentoo.sql b/media-sound/squeezecenter/files/dbcreate-gentoo.sql
new file mode 100644
index 000000000000..939b75a90bad
--- /dev/null
+++ b/media-sound/squeezecenter/files/dbcreate-gentoo.sql
@@ -0,0 +1,6 @@
+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-gentoo.sql b/media-sound/squeezecenter/files/dbdrop-gentoo.sql
new file mode 100644
index 000000000000..1d3bc8d696aa
--- /dev/null
+++ b/media-sound/squeezecenter/files/dbdrop-gentoo.sql
@@ -0,0 +1,2 @@
+DROP DATABASE __DATABASE__;
+DROP USER '__DBUSER__'@'localhost';
diff --git a/media-sound/squeezecenter/files/filepaths-7.1-gentoo.patch b/media-sound/squeezecenter/files/filepaths-7.1-gentoo.patch
new file mode 100644
index 000000000000..c5c00e28f432
--- /dev/null
+++ b/media-sound/squeezecenter/files/filepaths-7.1-gentoo.patch
@@ -0,0 +1,152 @@
+--- 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";
+ }
+
++ } 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()) {
+
+@@ -465,6 +517,19 @@
+ return isReadyNAS();
+ }
+
++sub isGentoo {
++
++ # Initialize
++ my $OS = OS();
++ my $details = details();
++
++ if ($details->{'osName'} eq 'Gentoo') {
++ return 1;
++ }
++
++ return 0;
++}
++
+ sub isRHorSUSE {
+
+ # Initialize
+@@ -586,6 +651,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';
+@@ -603,7 +672,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-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/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-07-22 12:24:09.000000000 +0100
++++ Slim/bootstrap.pm 2008-07-22 12:27:06.000000000 +0100
+@@ -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-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
+ # 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/mDNSResponder-7.1-gentoo.patch b/media-sound/squeezecenter/files/mDNSResponder-7.1-gentoo.patch
new file mode 100644
index 000000000000..8a3559ed1ee8
--- /dev/null
+++ b/media-sound/squeezecenter/files/mDNSResponder-7.1-gentoo.patch
@@ -0,0 +1,15 @@
+--- 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;
+
++ print CONF "\n";
+ print CONF "$name\n";
+ print CONF "$service\n";
+- print CONF "TXT\n";
+ print CONF "$port\n";
+- print CONF "\n";
+ }
+
+ close(CONF);
diff --git a/media-sound/squeezecenter/files/squeezecenter.conf.d b/media-sound/squeezecenter/files/squeezecenter.conf.d
new file mode 100644
index 000000000000..d7a70fd79adb
--- /dev/null
+++ b/media-sound/squeezecenter/files/squeezecenter.conf.d
@@ -0,0 +1,21 @@
+# /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.init.d b/media-sound/squeezecenter/files/squeezecenter.init.d
new file mode 100755
index 000000000000..23717c4ea30a
--- /dev/null
+++ b/media-sound/squeezecenter/files/squeezecenter.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.init.d,v 1.1 2008/08/03 04:35:29 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.logrotate.d b/media-sound/squeezecenter/files/squeezecenter.logrotate.d
new file mode 100644
index 000000000000..8ef9c789e4e9
--- /dev/null
+++ b/media-sound/squeezecenter/files/squeezecenter.logrotate.d
@@ -0,0 +1,11 @@
+# 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.logrotate.d,v 1.1 2008/08/03 04:35:29 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.prefs b/media-sound/squeezecenter/files/squeezecenter.prefs
new file mode 100644
index 000000000000..a14b3fab8375
--- /dev/null
+++ b/media-sound/squeezecenter/files/squeezecenter.prefs
@@ -0,0 +1,3 @@
+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-r1.ebuild b/media-sound/squeezecenter/squeezecenter-7.0-r1.ebuild
deleted file mode 100644
index ee6a3c61099c..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0-r1.ebuild
+++ /dev/null
@@ -1,310 +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/squeezecenter-7.0-r1.ebuild,v 1.2 2008/05/01 13:05:29 lavajoe Exp $
-
-inherit eutils
-
-SVN_VER="17793"
-MAJOR_VER="${PV:0:3}"
-SRC_DIR="SqueezeCenter_v${MAJOR_VER}.0"
-SRC_FILE="squeezecenter-${MAJOR_VER}-noCPAN.tgz"
-MY_P="squeezecenter-${MAJOR_VER}-${SVN_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}"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- 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
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-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.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
-
- # 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
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # 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)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3,"
- ewarn "Receiver or Transporter)."
- ewarn "For maximum flexibility you are recommended to set the 'flac' USE flag".
- ewarn ""
- fi
- if ! use lame; then
- ewarn "'lame' USE flag is not set. Although not essential, LAME is"
- ewarn "required if you want to limit the bandwidth your Squeezebox or"
- ewarn "Transporter uses when streaming audio."
- ewarn "For maximum flexibility you are recommended to set the 'lame' USE flag".
- ewarn ""
- fi
-
- # Album art requires PNG and JPEG support from GD, so if it's not there
- # then warn the user. It's not mandatory as the user may not be using
- # album art.
- if ! built_with_use dev-perl/GD jpeg || \
- ! built_with_use dev-perl/GD png || \
- ! built_with_use media-libs/gd jpeg || \
- ! built_with_use media-libs/gd png; then
- ewarn "For correct operation of album art through SqueezeCenter's web"
- ewarn "interface the GD library and Perl module must be built with PNG"
- ewarn "and JPEG support. If necessary you can add the following lines"
- ewarn "to the file /etc/portage/package.use:"
- ewarn "\tdev-perl/GD jpeg png"
- ewarn "\tmedia-libs/gd jpeg png"
- ewarn "And then rebuild those packages with:"
- ewarn "\temerge --newuse dev-perl/GD media-libs/gd"
- ewarn ""
- fi
-
- # Point user to database configuration step
- elog "If this is a new installation of SqueezeCenter then the database"
- elog "must be configured prior to use. This can be done by running the"
- elog "following command:"
- elog "\temerge --config =${CATEGORY}/${PF}"
-
- # Remind user to configure Avahi if necessary
- if use avahi; then
- elog ""
- elog "Avahi support installed. Remember to edit the folowing file if"
- elog "you run SqueezeCenter's web interface on a port other than 9000:"
- elog "\t/etc/avahi/services/squeezecenter.service"
- fi
-
- elog ""
- sc_starting_instr
-}
-
-sc_remove_db_prefs() {
- MY_PREFS=$1
-
- einfo "Configuring SqueezeCenter database preferences (${MY_PREFS}) ..."
- TMPPREFS="${T}"/squeezecenter-prefs-$$
- touch "${ROOT}${MY_PREFS}"
- sed -e '/^dbusername:/d' -e '/^dbpassword:/d' -e '/^dbsource:/d' < "${ROOT}${MY_PREFS}" > "${TMPPREFS}"
- mv "${TMPPREFS}" "${ROOT}${MY_PREFS}"
- chown squeezecenter:squeezecenter "${ROOT}${MY_PREFS}"
- chmod 660 "${ROOT}${MY_PREFS}"
-}
-
-sc_update_prefs() {
- MY_PREFS=$1
- MY_DBUSER=$2
- MY_DBUSER_PASSWD=$3
-
- echo "dbusername: ${MY_DBUSER}" >> "${ROOT}${MY_PREFS}"
- echo "dbpassword: ${MY_DBUSER_PASSWD}" >> "${ROOT}${MY_PREFS}"
- echo "dbsource: dbi:mysql:database=${MY_DBUSER};mysql_socket=/var/run/mysqld/mysqld.sock" >> "${ROOT}${MY_PREFS}"
-}
-
-pkg_config() {
- einfo "Press ENTER to create the SqueezeCenter database and set proper"
- einfo "permissions on it. You will be prompted for the MySQL 'root' user's"
- einfo "password during this process (note that the MySQL 'root' user is"
- einfo "independent of the Linux 'root' user and so may have a different"
- einfo "password)."
- einfo ""
- einfo "If you already have a SqueezeCenter database set up then this"
- einfo "process will clear the existing database (your music files will not,"
- einfo "however, be affected)."
- einfo ""
- einfo "Alternatively, press Control-C to abort now..."
- read
-
- # Get the MySQL root password from the user (not echoed to the terminal)
- einfo "The MySQL 'root' user password is required to create the"
- einfo "SqueezeCenter user and database."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL root password: " ROOT_PASSWD; echo
- stty echo
- trap ":" EXIT
- echo quit | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # 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
-
- # 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"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_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}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0.ebuild b/media-sound/squeezecenter/squeezecenter-7.0.ebuild
deleted file mode 100644
index c78079975764..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0.ebuild
+++ /dev/null
@@ -1,312 +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/squeezecenter-7.0.ebuild,v 1.3 2008/03/15 17:34:28 nixnut Exp $
-
-inherit eutils
-
-# Although the svn version isn't in the filename, it is in the directory tree
-# of the expanded tarball.
-SVN_VER="17793"
-MAJOR_VER="${PV:0:3}"
-SRC_DIR="SqueezeCenter_v${MAJOR_VER}.0"
-SRC_FILE="squeezecenter-${MAJOR_VER}-noCPAN.tgz"
-MY_P="squeezecenter-${MAJOR_VER}-${SVN_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}"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- 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
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-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.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
-
- # 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
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # 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)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3,"
- ewarn "Receiver or Transporter)."
- ewarn "For maximum flexibility you are recommended to set the 'flac' USE flag".
- ewarn ""
- fi
- if ! use lame; then
- ewarn "'lame' USE flag is not set. Although not essential, LAME is"
- ewarn "required if you want to limit the bandwidth your Squeezebox or"
- ewarn "Transporter uses when streaming audio."
- ewarn "For maximum flexibility you are recommended to set the 'lame' USE flag".
- ewarn ""
- fi
-
- # Album art requires PNG and JPEG support from GD, so if it's not there
- # then warn the user. It's not mandatory as the user may not be using
- # album art.
- if ! built_with_use dev-perl/GD jpeg || \
- ! built_with_use dev-perl/GD png || \
- ! built_with_use media-libs/gd jpeg || \
- ! built_with_use media-libs/gd png; then
- ewarn "For correct operation of album art through SqueezeCenter's web"
- ewarn "interface the GD library and Perl module must be built with PNG"
- ewarn "and JPEG support. If necessary you can add the following lines"
- ewarn "to the file /etc/portage/package.use:"
- ewarn "\tdev-perl/GD jpeg png"
- ewarn "\tmedia-libs/gd jpeg png"
- ewarn "And then rebuild those packages with:"
- ewarn "\temerge --newuse dev-perl/GD media-libs/gd"
- ewarn ""
- fi
-
- # Point user to database configuration step
- elog "If this is a new installation of SqueezeCenter then the database"
- elog "must be configured prior to use. This can be done by running the"
- elog "following command:"
- elog "\temerge --config =${CATEGORY}/${PF}"
-
- # Remind user to configure Avahi if necessary
- if use avahi; then
- elog ""
- elog "Avahi support installed. Remember to edit the folowing file if"
- elog "you run SqueezeCenter's web interface on a port other than 9000:"
- elog "\t/etc/avahi/services/squeezecenter.service"
- fi
-
- elog ""
- sc_starting_instr
-}
-
-sc_remove_db_prefs() {
- MY_PREFS=$1
-
- einfo "Configuring SqueezeCenter database preferences (${MY_PREFS}) ..."
- TMPPREFS="${T}"/squeezecenter-prefs-$$
- touch "${ROOT}${MY_PREFS}"
- sed -e '/^dbusername:/d' -e '/^dbpassword:/d' -e '/^dbsource:/d' < "${ROOT}${MY_PREFS}" > "${TMPPREFS}"
- mv "${TMPPREFS}" "${ROOT}${MY_PREFS}"
- chown squeezecenter:squeezecenter "${ROOT}${MY_PREFS}"
- chmod 660 "${ROOT}${MY_PREFS}"
-}
-
-sc_update_prefs() {
- MY_PREFS=$1
- MY_DBUSER=$2
- MY_DBUSER_PASSWD=$3
-
- echo "dbusername: ${MY_DBUSER}" >> "${ROOT}${MY_PREFS}"
- echo "dbpassword: ${MY_DBUSER_PASSWD}" >> "${ROOT}${MY_PREFS}"
- echo "dbsource: dbi:mysql:database=${MY_DBUSER};mysql_socket=/var/run/mysqld/mysqld.sock" >> "${ROOT}${MY_PREFS}"
-}
-
-pkg_config() {
- einfo "Press ENTER to create the SqueezeCenter database and set proper"
- einfo "permissions on it. You will be prompted for the MySQL 'root' user's"
- einfo "password during this process (note that the MySQL 'root' user is"
- einfo "independent of the Linux 'root' user and so may have a different"
- einfo "password)."
- einfo ""
- einfo "If you already have a SqueezeCenter database set up then this"
- einfo "process will clear the existing database (your music files will not,"
- einfo "however, be affected)."
- einfo ""
- einfo "Alternatively, press Control-C to abort now..."
- read
-
- # Get the MySQL root password from the user (not echoed to the terminal)
- einfo "The MySQL 'root' user password is required to create the"
- einfo "SqueezeCenter user and database."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL root password: " ROOT_PASSWD; echo
- stty echo
- trap ":" EXIT
- echo quit | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # 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
-
- # 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"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_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}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0.2_beta20080530.ebuild b/media-sound/squeezecenter/squeezecenter-7.1.0.ebuild
index e60e9e8305e6..f01a460c1412 100644
--- a/media-sound/squeezecenter/squeezecenter-7.0.2_beta20080530.ebuild
+++ b/media-sound/squeezecenter/squeezecenter-7.1.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.2_beta20080530.ebuild,v 1.1 2008/06/03 21:22:02 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.1.0.ebuild,v 1.1 2008/08/03 04:35:29 lavajoe Exp $
inherit eutils
-SVN_VER="20324"
MAJOR_VER="${PV:0:3}"
MINOR_VER="${PV:4:1}"
-SRC_DIR="SqueezeCenter_7.0_v${PV:10:4}-${PV:14:2}-${PV:16:2}"
-MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-${SVN_VER}-noCPAN"
+SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}"
+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/nightly/${SRC_DIR}/${MY_P}.tgz"
+SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
@@ -73,7 +72,7 @@ src_unpack() {
# Apply patches
epatch "${FILESDIR}/mDNSResponder-${MAJOR_VER}-gentoo.patch"
- epatch "${FILESDIR}/filepaths-${MAJOR_VER}.${MINOR_VER}-gentoo.patch"
+ epatch "${FILESDIR}/filepaths-${MAJOR_VER}-gentoo.patch"
}
src_compile() {
@@ -119,7 +118,7 @@ src_install() {
dodoc Changelog*.html
dodoc Installation.txt
dodoc License*.txt
- newdoc "${FILESDIR}/Gentoo-plugins-7.0.2-README.txt" Gentoo-plugins-README.txt
+ newdoc "${FILESDIR}/Gentoo-plugins-README.txt" Gentoo-plugins-README.txt
# Configuration files
insinto /etc/squeezecenter
@@ -128,19 +127,19 @@ src_install() {
doins modules.conf
# Install init scripts
- newconfd "${FILESDIR}/squeezecenter-${MAJOR_VER}.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-${MAJOR_VER}.${MINOR_VER}.init.d" squeezecenter
+ newconfd "${FILESDIR}/squeezecenter.conf.d" squeezecenter
+ newinitd "${FILESDIR}/squeezecenter.init.d" squeezecenter
# Install default preferences
insinto /var/lib/squeezecenter/prefs
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.prefs" 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-${MAJOR_VER}-gentoo.sql"
- doins "${FILESDIR}/dbcreate-${MAJOR_VER}-gentoo.sql"
+ doins "${FILESDIR}/dbdrop-gentoo.sql"
+ doins "${FILESDIR}/dbcreate-gentoo.sql"
# Initialize run directory (where the PID file lives)
dodir /var/run/squeezecenter
@@ -168,12 +167,12 @@ src_install() {
# 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)
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
}
@@ -329,11 +328,11 @@ 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}/" < "${SHAREDIR}/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}/" < "${SHAREDIR}/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}"