summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/logitechmediaserver-bin/Manifest5
-rw-r--r--media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-client-playlists-gentoo.patch11
-rw-r--r--media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-uuid-gentoo.patch14
-rw-r--r--media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.9.0_pre20140928.ebuild12
-rw-r--r--media-sound/logitechmediaserver-bin/logitechmediaserver-bin-9999.ebuild270
5 files changed, 308 insertions, 4 deletions
diff --git a/media-sound/logitechmediaserver-bin/Manifest b/media-sound/logitechmediaserver-bin/Manifest
index e0baae1..522922e 100644
--- a/media-sound/logitechmediaserver-bin/Manifest
+++ b/media-sound/logitechmediaserver-bin/Manifest
@@ -15,6 +15,8 @@ AUX logitechmediaserver-bin-7.8.1_pre20140927-fix-transition-sample-rates2.patch
AUX logitechmediaserver-bin-7.8.1_pre20140927-uuid-gentoo.patch 525 SHA256 032f9edec613661f691797934cf73191c8ac94269cff59773c365f20603f01c4 SHA512 4c8a65893842aa9c0be21b3ad59fcf9f350e4c1b169099f4ffafe18b298ee7860693d529a3a7d81d7f4251bad5904f975e26e5fc2a33312003354bdda3e4bb87 WHIRLPOOL e74772fec480bc46d73073d5ce11e6052758ef20f636e99a74498ae3fe624b96241f3df7d36f63a94b34dbfc3017385872ada16698c6ff6c6f4c33e471c88348
AUX logitechmediaserver-bin-7.9.0_pre20140928-client-playlists-gentoo.patch 395 SHA256 6ffa1ba22f6e519c02abafd4ae16055a4cb555af113bbac25f3a30d0a85f8845 SHA512 45ee8ee475b5dc798081608c95a8c0fffa4e4f5e4b03c53f38288fc534bf9818d6c7b8829fbbef2e5e5d8790922a7f77b557277ffda863ba20c937c795fefc4a WHIRLPOOL 481f9451a125119edf92e9e5f413628b3bdfb698b27271ccc36d033f91c538f1ac0796f5dc0117cfcb80ae0bfbbc6d8b3fea62985fcce1a1900ae0f8e631be4b
AUX logitechmediaserver-bin-7.9.0_pre20140928-uuid-gentoo.patch 525 SHA256 032f9edec613661f691797934cf73191c8ac94269cff59773c365f20603f01c4 SHA512 4c8a65893842aa9c0be21b3ad59fcf9f350e4c1b169099f4ffafe18b298ee7860693d529a3a7d81d7f4251bad5904f975e26e5fc2a33312003354bdda3e4bb87 WHIRLPOOL e74772fec480bc46d73073d5ce11e6052758ef20f636e99a74498ae3fe624b96241f3df7d36f63a94b34dbfc3017385872ada16698c6ff6c6f4c33e471c88348
+AUX logitechmediaserver-bin-9999-client-playlists-gentoo.patch 395 SHA256 6ffa1ba22f6e519c02abafd4ae16055a4cb555af113bbac25f3a30d0a85f8845 SHA512 45ee8ee475b5dc798081608c95a8c0fffa4e4f5e4b03c53f38288fc534bf9818d6c7b8829fbbef2e5e5d8790922a7f77b557277ffda863ba20c937c795fefc4a WHIRLPOOL 481f9451a125119edf92e9e5f413628b3bdfb698b27271ccc36d033f91c538f1ac0796f5dc0117cfcb80ae0bfbbc6d8b3fea62985fcce1a1900ae0f8e631be4b
+AUX logitechmediaserver-bin-9999-uuid-gentoo.patch 525 SHA256 032f9edec613661f691797934cf73191c8ac94269cff59773c365f20603f01c4 SHA512 4c8a65893842aa9c0be21b3ad59fcf9f350e4c1b169099f4ffafe18b298ee7860693d529a3a7d81d7f4251bad5904f975e26e5fc2a33312003354bdda3e4bb87 WHIRLPOOL e74772fec480bc46d73073d5ce11e6052758ef20f636e99a74498ae3fe624b96241f3df7d36f63a94b34dbfc3017385872ada16698c6ff6c6f4c33e471c88348
AUX logitechmediaserver.conf.d 477 SHA256 4a2a77f66f35e6ea9867784de04c7552cfe36d9d583bf423ab2e871f85606713 SHA512 686c00e7a28df15369aad74d46700d5a943bf539a57828f83e313d82014c8610c41481aff2678908f90f6bf702c0ac5408bfc7909b155c21ddc5fec21fccac28 WHIRLPOOL 615d2acdeb804507082fe858925a16c228e7d07199ead5443219a5a78c891ae035b7e9046e9a4487e8c838f288d8421fd3cc642a38a0ee21ed3d919c3f673df3
AUX logitechmediaserver.init.d 1137 SHA256 e4b6730b87ebafb71aa88d54df10ef6b58826bb3f1cb6f63def7df5cdee02066 SHA512 821b4f86d5adb5de425419ce69648787c20fef684b7475111da42b1705609cb1d775a41151188c4e7b0d4ede969dde9de4ae56ac2a073e0b20a98cfb3ea064a1 WHIRLPOOL e037a88bd293a72a18a432922470737349ddc282f518dcde40f28e7dd1e39e054a55868977e30cb63f1379edb7f14f8bb318c0d74818c6d54e5b52674485c5d2
AUX logitechmediaserver.logrotate.d 347 SHA256 82fd4cdb8537b610ec220545afc606c4b39481d449c08215073732fa27a247d0 SHA512 5787166d7318e494c574e965f47f6074805371283f5fd33955e02302ba43ffc64b2aa18f1c5a081d23ba49fb76cf512cfd966e5d68496fa54c05f911bab422b6 WHIRLPOOL 297329d107bc41846a4cc617c5cb05983e2839372b2684801d01ecea171d7a31603659d539e19b31559338de1702334d053c174acab697eda3d5f09e01c0efc5
@@ -26,6 +28,7 @@ DIST logitechmediaserver-7.8.0.tgz 122208430 SHA256 57dd70095538c35f6bbd1eac2d2b
EBUILD logitechmediaserver-bin-7.7.3.ebuild 51755 SHA256 7363b3a454fbe45fd2e51f502b4eef05a24e6263ddfc3c1757efad735b5a2015 SHA512 8ef24ae14dd766c4f7313f81f47583f3d0497fbd7b711dd933a894c6d0f4d2376b54c2544a4fbfa3c833858cdb6090c5f3a32a4de0b6fb05bee84e3276643fd5 WHIRLPOOL 6185e095d61de8344b42cb33615c76b5a835394fceca3931045a078aa4210165d0e86ef694905914a08bfcef54d7b4abf0d25cf79fd01be0abec26058c99207d
EBUILD logitechmediaserver-bin-7.8.0.ebuild 59386 SHA256 144a6b787dca8dfede89bbf49da886c19a4cf74be84b09aaf32c8c1f7b6a39a7 SHA512 a08acb18f364b04610002a03c6e0c177beefaaef53282f14ebf955ff96c1634dbf4c14d6eca9c65158162a06d9727ae6b44231e76b7dd7a7c4c4f5f43eb7bb48 WHIRLPOOL d3b0b8c2facaf6928b4342b53688744a163da211193d30167489c4c24fbe1f4a301269f1eec3581044d14735df322ab3429b8499e2f54ebd998fb8ef8e381da4
EBUILD logitechmediaserver-bin-7.8.1_pre20140927.ebuild 62107 SHA256 957effdd84c53c92ca69ac33ecb385d16cb0f78bfb1dca674bc0507af668d480 SHA512 9a466c576582d226bc90b9f793000aaf317e42654a871cff6d2fd8bf149471a0fb728b866103489cab4fdcf536dbd94e1e496eb78512cb196246d6e754f74cb4 WHIRLPOOL 2d1c237193a5386e70c029d3fce55cdc8063c32d37f8b273689d2a34ba0a251750e611828a9db646d878dd709825422b0f0861ba36cc52891a0e11bad8209fbf
-EBUILD logitechmediaserver-bin-7.9.0_pre20140928.ebuild 63722 SHA256 b03ce559aacea11a27894b0ffc346139694761f399c5f97d681313a09e5138e8 SHA512 96b64368731ae84212b26105f5d8f00a5e2d3aacf623a6d00e9b1cf8c5c4d992c23716b8722d5fdb7d798044ef477ebec61433b60a21ee8588db54d38c868f44 WHIRLPOOL 7ff02d3fbe7d5694ac1d7c5c1675ed15d8cff536a8e4dba9594dea1a66954c966806dcc61714693c967ee30476425106a43ed67503fb15838730faa56d809317
+EBUILD logitechmediaserver-bin-7.9.0_pre20140928.ebuild 63964 SHA256 9ac8647bbb34c6f7e30131a543b8894ca1e2e208f420d052663433328c664fb6 SHA512 e7b9f1b2c3e32db76cdaa410f336ad1a69d987c8fbfa8be38fab02f7115fc3f965f06d59f10ae1a3b8aa028b58d919e8c650fd62ee1be5a363af12eb0d30cb3b WHIRLPOOL 7193a31bf70e4cd8a57077cb0750f9b006c5b6af85034658c9733df301667844c7c9039aa3af4f1357c9fe24d689fb916d290d1aba922aa90e2ed769424bfdb6
+EBUILD logitechmediaserver-bin-9999.ebuild 8742 SHA256 d5d2c02096a20ad5717d6b639b7ec0931d7317a8a90455b732875512a7ac1a94 SHA512 8f1f2d2d51587b444ba0a2fc49af8e499ff1f2b41b54a1025003fe34c5bae23e8e995094df9ae39e22aac739a47cdc503ae66744bd0ba6a1063824ce6cc53cfc WHIRLPOOL 532f0f4797a1af88e8d880625e7486c128785a8df7d730ea2bc124c7edcafdda34d791733e4f9171b2bc6d7023276a65cbb027014c632baf2060ed3e65c55a1e
MISC ChangeLog 6532 SHA256 39d8500af4327ddd59c50b19800278314d3313d7c8c08382cc51c0185717fdd4 SHA512 b349bb8b79193b514966920c6a9d0dd206005810328b5bd24083ccab7f777837595395a26600794c6ef2e845ef0c7c2be8f7b7caef168e980960c4268270c650 WHIRLPOOL c536665238057559306d79574c81b71037f7055eb87948fc28a65dac57a8f59c5ce0507556236e83131d8959c5f0f4ac078cf0a8d99483061e090dfcd71bda56
MISC metadata.xml 696 SHA256 fbdc4cc9be99f9293be5c7527ea8f5662c87e79d8f2408d53b5137e340edf763 SHA512 50a24dec62483c8ab21de63397a113b7ae218ea3fb5f454aecb7c647ecf336dfc0e4d276f594e5dd036f8851fad9a28c2077bf10f94ee0de591cafbb9f3a80e2 WHIRLPOOL c569ea771de1dacfc99c2495d8a4872ac95ede6e75b593fe2f893cbcf476d32d5daedeec9685ad7c84734fb1bbf421523ecd1ac9d8e1500886275ea90179dbb7
diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-client-playlists-gentoo.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-client-playlists-gentoo.patch
new file mode 100644
index 0000000..b906595
--- /dev/null
+++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-client-playlists-gentoo.patch
@@ -0,0 +1,11 @@
+--- Slim/Player/Playlist.pm.orig 2012-05-29 13:43:52.700212318 +0100
++++ Slim/Player/Playlist.pm 2012-05-29 13:43:52.692212037 +0100
+@@ -1042,7 +1042,7 @@
+ $id =~ s/://g;
+
+ return Slim::Utils::Misc::fileURLFromPath(
+- catfile(Slim::Utils::OSDetect::dirsFor('prefs'), "clientplaylist_$id.m3u")
++ catfile(Slim::Utils::OSDetect::dirsFor('ClientPlaylists'), "clientplaylist_$id.m3u")
+ );
+ }
+
diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-uuid-gentoo.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-uuid-gentoo.patch
new file mode 100644
index 0000000..c94aef8
--- /dev/null
+++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-9999-uuid-gentoo.patch
@@ -0,0 +1,14 @@
+--- slimserver.pl.orig 2012-05-29 13:43:52.700212318 +0100
++++ slimserver.pl 2012-04-01 22:00:00.111597353 +0100
+@@ -440,8 +440,9 @@
+
+ # Generate a UUID for this SC instance on first-run
+ if ( !$prefs->get('server_uuid') ) {
+- require UUID::Tiny;
+- $prefs->set( server_uuid => UUID::Tiny::create_UUID_as_string( UUID::Tiny::UUID_V4() ) );
++ require Data::UUID;
++ my $ug = new Data::UUID;
++ $prefs->set( server_uuid => lc $ug->create_str() );
+ }
+
+ main::INFOLOG && $log->info("Server binary search path init...");
diff --git a/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.9.0_pre20140928.ebuild b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.9.0_pre20140928.ebuild
index 1e63834..2da8ceb 100644
--- a/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.9.0_pre20140928.ebuild
+++ b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.9.0_pre20140928.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header$
-EAPI="3"
+EAPI="5"
MY_PN="${PN/-bin}"
@@ -12,6 +12,13 @@ if [[ ${PV} == *_pre* ]] ; then
HOMEPAGE="http://github.com/Logitech/slimserver"
S="${WORKDIR}/slimserver-${GIT_COMMIT}"
INHERIT_VCS=""
+ KEYWORDS="~amd64 ~x86"
+elif [[ ${PV} == "9999" ]] ; then
+ EGIT_BRANCH="public/7.9"
+ EGIT_REPO_URI="https://github.com/Logitech/slimserver.git"
+ HOMEPAGE="http://github.com/Logitech/slimserver"
+ S="${WORKDIR}/slimserver"
+ INHERIT_VCS="git-2"
else
SRC_DIR="LogitechMediaServer_v${PV}"
SRC_URI="http://downloads.slimdevices.com/${SRC_DIR}/${MY_P}.tgz"
@@ -22,12 +29,11 @@ else
MY_P="${MY_PN}-${MY_PV}"
S="${WORKDIR}/${MY_P_BUILD_NUM}"
INHERIT_VCS=""
+ KEYWORDS="~amd64 ~x86"
fi
inherit ${INHERIT_VCS} eutils user systemd
-KEYWORDS="~amd64 ~x86"
-
DESCRIPTION="Logitech Media Server (streaming audio server)"
LICENSE="${PN}"
RESTRICT="bindist mirror"
diff --git a/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-9999.ebuild b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-9999.ebuild
new file mode 100644
index 0000000..1f74107
--- /dev/null
+++ b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-9999.ebuild
@@ -0,0 +1,270 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+EAPI="5"
+
+MY_PN="${PN/-bin}"
+
+if [[ ${PV} == *_pre* ]] ; then
+ GIT_COMMIT="c05d9360b3d2141eaa2083237243777f8dd1cb42"
+ SRC_URI="https://github.com/Logitech/slimserver/archive/${GIT_COMMIT}.zip"
+ HOMEPAGE="http://github.com/Logitech/slimserver"
+ S="${WORKDIR}/slimserver-${GIT_COMMIT}"
+ INHERIT_VCS=""
+ KEYWORDS="~amd64 ~x86"
+elif [[ ${PV} == "9999" ]] ; then
+ EGIT_BRANCH="public/7.9"
+ EGIT_REPO_URI="https://github.com/Logitech/slimserver.git"
+ HOMEPAGE="http://github.com/Logitech/slimserver"
+ S="${WORKDIR}/slimserver"
+ INHERIT_VCS="git-2"
+else
+ SRC_DIR="LogitechMediaServer_v${PV}"
+ SRC_URI="http://downloads.slimdevices.com/${SRC_DIR}/${MY_P}.tgz"
+ HOMEPAGE="http://www.mysqueezebox.com/download"
+ BUILD_NUM="1375965195"
+ MY_PV="${PV/_*}"
+ MY_P_BUILD_NUM="${MY_PN}-${MY_PV}-${BUILD_NUM}"
+ MY_P="${MY_PN}-${MY_PV}"
+ S="${WORKDIR}/${MY_P_BUILD_NUM}"
+ INHERIT_VCS=""
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit ${INHERIT_VCS} eutils user systemd
+
+DESCRIPTION="Logitech Media Server (streaming audio server)"
+LICENSE="${PN}"
+RESTRICT="bindist mirror"
+SLOT="0"
+IUSE=""
+
+# Installation dependencies.
+DEPEND="
+ !media-sound/squeezecenter
+ !media-sound/squeezeboxserver
+ app-arch/unzip
+ "
+
+# Runtime dependencies.
+RDEPEND="
+ !prefix? ( >=sys-apps/baselayout-2.0.0 )
+ !prefix? ( virtual/logger )
+ >=dev-lang/perl-5.8.8[ithreads]
+ x86? ( <dev-lang/perl-5.19[ithreads] )
+ amd64? ( <dev-lang/perl-5.21[ithreads] )
+ >=dev-perl/Data-UUID-1.202
+ "
+
+# This is a binary package and contains prebuilt executable and library
+# files. We need to identify those to suppress the QA warnings during
+# installation.
+QA_PREBUILT="
+*
+"
+
+RUN_UID=logitechmediaserver
+RUN_GID=logitechmediaserver
+
+# Installation locations
+OPTDIR="/opt/${MY_PN}"
+VARDIR="/var/lib/${MY_PN}"
+CACHEDIR="${VARDIR}/cache"
+USRPLUGINSDIR="${VARDIR}/Plugins"
+SVRPLUGINSDIR="${CACHEDIR}/InstalledPlugins"
+CLIENTPLAYLISTSDIR="${VARDIR}/ClientPlaylists"
+PREFSDIR="/etc/${MY_PN}"
+LOGDIR="/var/log/${MY_PN}"
+SVRPREFS="${PREFSDIR}/server.prefs"
+
+# Old Squeezebox Server file locations
+SBS_PREFSDIR='/etc/squeezeboxserver/prefs'
+SBS_SVRPREFS="${SBS_PREFSDIR}/server.prefs"
+SBS_VARLIBDIR='/var/lib/squeezeboxserver'
+SBS_SVRPLUGINSDIR="${SBS_VARLIBDIR}/cache/InstalledPlugins"
+SBS_USRPLUGINSDIR="${SBS_VARLIBDIR}/Plugins"
+
+pkg_setup() {
+ # Create the user and group if not already present
+ enewgroup ${RUN_GID}
+ enewuser ${RUN_UID} -1 -1 "/dev/null" ${RUN_GID}
+}
+
+src_prepare() {
+ # Apply patches to make LMS work on Gentoo.
+ epatch "${FILESDIR}/${P}-uuid-gentoo.patch"
+ epatch "${FILESDIR}/${P}-client-playlists-gentoo.patch"
+}
+
+src_install() {
+
+ # The custom OS module for Gentoo - provides OS-specific path details
+ cp "${FILESDIR}/gentoo-filepaths.pm" "Slim/Utils/OS/Custom.pm" || die "Unable to install Gentoo custom OS module"
+
+ # Everthing into our package in the /opt hierarchy (LHS)
+ dodir "${OPTDIR}"
+ cp -aR "${S}"/* "${ED}${OPTDIR}" || die "Unable to install package files"
+
+ # Documentation
+ dodoc Changelog*.html
+ dodoc Installation.txt
+ dodoc License*.txt
+ dodoc "${FILESDIR}/Gentoo-plugins-README.txt"
+ dodoc "${FILESDIR}/Gentoo-detailed-changelog.txt"
+
+ # Preferences directory
+ dodir "${PREFSDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${PREFSDIR}"
+ fperms 770 "${PREFSDIR}"
+
+ # Install init scripts (OpenRC)
+ newconfd "${FILESDIR}/logitechmediaserver.conf.d" "${MY_PN}"
+ newinitd "${FILESDIR}/logitechmediaserver.init.d" "${MY_PN}"
+
+ # Install unit file (systemd)
+ systemd_dounit "${FILESDIR}/${MY_PN}.service"
+
+ # Initialize server cache directory
+ dodir "${CACHEDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${CACHEDIR}"
+ fperms 770 "${CACHEDIR}"
+
+ # Initialize the log directory
+ dodir "${LOGDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}"
+ fperms 770 "${LOGDIR}"
+ touch "${ED}/${LOGDIR}/server.log"
+ touch "${ED}/${LOGDIR}/scanner.log"
+ touch "${ED}/${LOGDIR}/perfmon.log"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}/server.log"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}/scanner.log"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}/perfmon.log"
+
+ # Initialise the user-installed plugins directory
+ dodir "${USRPLUGINSDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${USRPLUGINSDIR}"
+ fperms 770 "${USRPLUGINSDIR}"
+
+ # Initialise the client playlists directory
+ dodir "${CLIENTPLAYLISTSDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${CLIENTPLAYLISTSDIR}"
+ fperms 770 "${CLIENTPLAYLISTSDIR}"
+
+ # Install logrotate support
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logitechmediaserver.logrotate.d" "${MY_PN}"
+}
+
+lms_starting_instr() {
+ elog "Logitech Media Server can be started with the following command (OpenRC):"
+ elog "\t/etc/init.d/logitechmediaserver start"
+ elog "or (systemd):"
+ elog "\tsystemctl start logitechmediaserver"
+ elog ""
+ elog "Logitech Media Server can be automatically started on each boot"
+ elog "with the following command (OpenRC):"
+ elog "\trc-update add logitechmediaserver default"
+ elog "or (systemd):"
+ elog "\tsystemctl enable logitechmediaserver"
+ elog ""
+ elog "You might want to examine and modify the following configuration"
+ elog "file before starting Logitech Media Server:"
+ elog "\t/etc/conf.d/logitechmediaserver"
+ 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}${SVRPREFS}" 2>/dev/null)
+ elog "You may access and configure Logitech Media Server by browsing to:"
+ elog "\thttp://localhost:${httpport:-9000}/"
+ elog ""
+}
+
+pkg_postinst() {
+
+ # Point user to database configuration step, if an old installation
+ # of SBS is found.
+ if [ -f "${SBS_SVRPREFS}" ]; then
+ elog "If this is a new installation of Logitech Media Server and you"
+ elog "previously used Squeezebox Server (media-sound/squeezeboxserver)"
+ elog "then you may migrate your previous preferences and plugins by"
+ elog "running the following command (note that this will overwrite any"
+ elog "current preferences and plugins):"
+ elog "\temerge --config =${CATEGORY}/${PF}"
+ elog ""
+ fi
+
+ # Tell use user where they should put any manually-installed plugins.
+ elog "Manually installed plugins should be placed in the following"
+ elog "directory:"
+ elog "\t${USRPLUGINSDIR}"
+ elog ""
+
+ # Show some instructions on starting and accessing the server.
+ lms_starting_instr
+}
+
+lms_remove_db_prefs() {
+ MY_PREFS=$1
+
+ einfo "Correcting database connection configuration:"
+ einfo "\t${MY_PREFS}"
+ TMPPREFS="${T}"/lmsserver-prefs-$$
+ touch "${EROOT}${MY_PREFS}"
+ sed -e '/^dbusername:/d' -e '/^dbpassword:/d' -e '/^dbsource:/d' < "${EROOT}${MY_PREFS}" > "${TMPPREFS}"
+ mv "${TMPPREFS}" "${EROOT}${MY_PREFS}"
+ chown ${RUN_UID}:${RUN_GID} "${EROOT}${MY_PREFS}"
+ chmod 660 "${EROOT}${MY_PREFS}"
+}
+
+pkg_config() {
+ einfo "Press ENTER to migrate any preferences from a previous installation of"
+ einfo "Squeezebox Server (media-sound/squeezeboxserver) to this installation"
+ einfo "of Logitech Media Server."
+ einfo ""
+ einfo "Note that this will remove any current preferences and plugins and"
+ einfo "therefore you should take a backup if you wish to preseve any files"
+ einfo "from this current Logitech Media Server installation."
+ einfo ""
+ einfo "Alternatively, press Control-C to abort now..."
+ read
+
+ # Preferences.
+ einfo "Migrating previous Squeezebox Server configuration:"
+ if [ -f "${SBS_SVRPREFS}" ]; then
+ [ -d "${EROOT}${PREFSDIR}" ] && rm -rf "${EROOT}${PREFSDIR}"
+ einfo "\tPreferences (${SBS_PREFSDIR})"
+ cp -r "${EROOT}${SBS_PREFSDIR}" "${EROOT}${PREFSDIR}"
+ chown -R ${RUN_UID}:${RUN_GID} "${EROOT}${PREFSDIR}"
+ chmod -R u+w,g+w "${EROOT}${PREFSDIR}"
+ chmod 770 "${EROOT}${PREFSDIR}"
+ fi
+
+ # Plugins installed through the built-in extension manager.
+ if [ -d "${EROOT}${SBS_SVRPLUGINSDIR}" ]; then
+ einfo "\tServer plugins (${SBS_SVRPLUGINSDIR})"
+ [ -d "${EROOT}${SVRPLUGINSDIR}" ] && rm -rf "${EROOT}${SVRPLUGINSDIR}"
+ cp -r "${EROOT}${SBS_SVRPLUGINSDIR}" "${EROOT}${SVRPLUGINSDIR}"
+ chown -R ${RUN_UID}:${RUN_GID} "${EROOT}${SVRPLUGINSDIR}"
+ chmod -R u+w,g+w "${EROOT}${SVRPLUGINSDIR}"
+ chmod 770 "${EROOT}${SVRPLUGINSDIR}"
+ fi
+
+ # Plugins manually installed by the user.
+ if [ -d "${EROOT}${SBS_USRPLUGINSDIR}" ]; then
+ einfo "\tUser plugins (${SBS_USRPLUGINSDIR})"
+ [ -d "${EROOT}${USRPLUGINSDIR}" ] && rm -rf "${EROOT}${USRPLUGINSDIR}"
+ cp -r "${EROOT}${SBS_USRPLUGINSDIR}" "${EROOT}${USRPLUGINSDIR}"
+ chown -R ${RUN_UID}:${RUN_GID} "${EROOT}${USRPLUGINSDIR}"
+ chmod -R u+w,g+w "${EROOT}${USRPLUGINSDIR}"
+ chmod 770 "${EROOT}${USRPLUGINSDIR}"
+ fi
+
+ # Remove the existing MySQL preferences from Squeezebox Server (if any).
+ lms_remove_db_prefs "${SVRPREFS}"
+
+ # Phew - all done. Give some tips on what to do now.
+ einfo "Done."
+ einfo ""
+}