diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-07-26 15:11:44 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-07-26 15:11:44 +0000 |
commit | 455194a7d8595493d265e05e841c89cfdfcdc360 (patch) | |
tree | 5bd9d54eb9de6555d6a28ed36edfa37f326fd46f /media-sound/squeezecenter | |
parent | Add parallel-build patch, bug 278364 (only a workaround). (diff) | |
download | historical-455194a7d8595493d265e05e841c89cfdfcdc360.tar.gz historical-455194a7d8595493d265e05e841c89cfdfcdc360.tar.bz2 historical-455194a7d8595493d265e05e841c89cfdfcdc360.zip |
old
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'media-sound/squeezecenter')
-rw-r--r-- | media-sound/squeezecenter/Manifest | 21 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.2.0-r1.ebuild | 369 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.2.1.ebuild | 386 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.3.1.ebuild | 457 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.3.2-r1.ebuild | 469 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.3.2-r2.ebuild | 469 | ||||
-rw-r--r-- | media-sound/squeezecenter/squeezecenter-7.3.3.ebuild | 473 |
7 files changed, 0 insertions, 2644 deletions
diff --git a/media-sound/squeezecenter/Manifest b/media-sound/squeezecenter/Manifest index 6684f23e3ceb..abb644c869a5 100644 --- a/media-sound/squeezecenter/Manifest +++ b/media-sound/squeezecenter/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX Gentoo-plugins-README.txt 981 RMD160 d5efb4a5d704ff6b4c3de49b7143cbb9bc132445 SHA1 c3aedb74c3f5b7a54a3bad278750ed1632241e1d SHA256 6f84ab8159022447d3f434afb6403947ae9514fec55f33c9e74257ff75735428 AUX avahi-squeezecenter.service 326 RMD160 174b4a900bea817b3b1995449c1c0a0f3f96cacb SHA1 b84fa32fc82c84cb749d8aed2cc4f1367937a4bc SHA256 868102c1b4eb5e497e8a0f899c794023643018b66e8f3855b772908647b59b2d AUX dbcreate-gentoo.sql 165 RMD160 36fe87c398aee02890710f970245032488b857bb SHA1 e86a26c73addb4b74c345ec70155f2b9d079075b SHA256 d8cf85879e74dc1e429251f5bd4ae7f99e2a460fa668c0abde2c2725b90f10a1 @@ -32,7 +29,6 @@ AUX squeezecenter.init.d 1338 RMD160 8d97de1146151cad44844146f390ac44edf4bc03 SH AUX squeezecenter.logrotate.d 407 RMD160 5a6045321cf1f180ee2ce671d5395cd08379accd SHA1 e1f4c03e9bae354ba44c7fdc59721696c643eb64 SHA256 a98dcb6a95d8711632d6913b7dab221decf35f70858618529b7ae8c103b20a01 AUX squeezecenter.prefs 126 RMD160 b715267b10e2bc63eaa7da5aa9dd3177dc0e46ee SHA1 3354ce16a5dd453d71c475a8487b43fec34084c2 SHA256 19c74a3838f78c6a076220e749c236564d085c4ef095fa0f77bbb1be74532b2d DIST SqueezeCenter-AutoXS-Header-0.03.tar.gz 2497 RMD160 91ae4b03d47d3773747f2f69c992c54a1e6ff2bb SHA1 f6f106412fb603abefefec8a640ce4713a50a1f7 SHA256 59ee972bf0ea3e85fbcb619863e2cd47ad5646a849409c9a65123fffdb77519a -DIST SqueezeCenter-Class-C3-XS-0.08.tar.gz 28241 RMD160 3b035744b0fc06ab59ab5ce6885531ad3303e189 SHA1 8fa1a01ff3bb90499327f378048e103722b5c59c SHA256 29665bf106dab0c3b91eb2dc8ddab03244483500621c7c52a9d0d8fb26698a20 DIST SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz 44525 RMD160 3800eae26da22c479c91065bc4c193a56ece1df5 SHA1 de132a75173f286401057f04fcb5e7f79f14d61e SHA256 5d34f1180306e9cc3bcacf8b383267c08da1aa86cd8c033f1d258c7fc41bdb30 DIST SqueezeCenter-Compress-Zlib-1.41.tar.gz 151972 RMD160 78a331550e953221d6e741dc581f24a7e0c9dc5d SHA1 0a0aea0fe460956d71db0a0f571d67078ca1dc94 SHA256 3ec80ba4a43dc6462e5fa4da2e9773b3934c0b502a1648b553b09766046000c3 DIST SqueezeCenter-DBD-mysql-3.0002.tar.gz 130077 RMD160 f566f1a968b9f4f1fd0210080456de5f31601b35 SHA1 2be3348a20ad95b1761dd8fe399b5d0b8d82cb7c SHA256 90f3f767a25b692aa2775bf919886df48fe1146acf1f885a84eeb14909cbf12f @@ -47,27 +43,10 @@ DIST SqueezeCenter-Time-HiRes-1.86.tar.gz 68950 RMD160 a653a3c792c8df3d85e2b5a4e DIST SqueezeCenter-XML-Parser-2.34.tar.gz 230102 RMD160 0cb18e70e0266f150af7a095559aa1e485fe7aad SHA1 4d843b874acf4fad0425657d15c0d374c0e1c911 SHA256 c81099114908da2e91377f8351f406a48542f8f0a767985b0c565d782ea5ae01 DIST SqueezeCenter-YAML-Syck-0.64.tar.gz 128255 RMD160 07045a46e23e12125c586248fd9de0b12b2168a9 SHA1 0e5b8caadfb46f75d8b2590d05c77c7e65abb2c1 SHA256 70ff201165020c7aeadeb4bd1a6233462994a07a7153c8f5570a3698b0207e07 DIST squeezecenter-7.1-noCPAN.tgz 18785895 RMD160 6826dcdb906f343c5221ab8ff55ac3fe560fd4cc SHA1 6e51608286c238970a4facb26fc1acb3adb6ed07 SHA256 6229d6c96f290ab360351ea993733b2bb6bba352ca97e62d40d1b1f802f0afa8 -DIST squeezecenter-7.2-noCPAN.tgz 22652662 RMD160 e7fdafdb0a91dcde7df403e458bba63f50692122 SHA1 e4b5d2bcb4cbeeb033710a380d121a4927e025f9 SHA256 306c68e427b4ee88babea353b6d00491dceb1d48f8db3c4bbeecd38342fe663c -DIST squeezecenter-7.2.1-noCPAN.tgz 22681495 RMD160 ed7ee0f27b15edc307a6fa2b8ec49abb7731e10a SHA1 a954510933928a1a98d8f1c8bbf21d48c9ffd202 SHA256 d603f9d4affad68a537230bf66cb170f691919d4696873b41452a88ba77480ae DIST squeezecenter-7.3-noCPAN.tgz 23756416 RMD160 648b396be2ff7c64c1e13874141ceb326211dfb3 SHA1 e54402cf016ca9f068ffcf2cafcebc5412843aca SHA256 bc91344af84505f04298d4a8f1f519c42ead1a4d61d33645dc1fe71ec98258f7 -DIST squeezecenter-7.3.1-noCPAN.tgz 23765464 RMD160 d114c4fcf5bee255d9f20e7a685f0763e3ef8f7f SHA1 f6160aa467f1c479a25403b65524c494e22d9715 SHA256 7d4fceb8b0b87e10a849cc08237addec910e135e15094e911da6386036302cea -DIST squeezecenter-7.3.2-noCPAN.tgz 25322353 RMD160 80c06cb53fe0bded3801b27e9528b595f84ce7b6 SHA1 9d88cd99fc260736d2c6eebca2aeb9cde81c29ac SHA256 42be2af96fd0924df3fb69bb6cbeb3d73304608bd865cb7f2c505c254f8d664d DIST squeezecenter-7.3.3-noCPAN.tgz 25491195 RMD160 e2205e4de9ad95ce1e41518347256320bc2a08d6 SHA1 3d9b0f7973474e20be06fb3e76b2e47ec93fa553 SHA256 1aaa6b3867657f6c35a1ebadf3e0aa3e0bfaa519d26eb0f35fdbb32a0f4ff533 EBUILD squeezecenter-7.1.0-r1.ebuild 13058 RMD160 25e1d30268ddb1e03dc8b281455e3de9c894ca7e SHA1 8952f15b62700d17b4de626decc5725f5fd9513f SHA256 3141c32deaafe93a7e0331abd28b9d58b2eaa2be7cd9f0af01af0113d9084ea0 -EBUILD squeezecenter-7.2.0-r1.ebuild 13035 RMD160 aa0cf2b49a9233e7c4d3c3716d925b76f4313b77 SHA1 c351aebb1dd2a0dfdf545de007211394c10b4a41 SHA256 4bf15144a2306578cd12b5c58b49b60747e124873862200e1c250af303d747ee -EBUILD squeezecenter-7.2.1.ebuild 13961 RMD160 8f802a67f54d1133ec1cc21158f13721535ea7ce SHA1 b14be451495598bdbabd13f0366e5905572c9099 SHA256 88cb6d94da31da63862f28f576857a7adaff239a9c9a61b81f7de3215250a7cc EBUILD squeezecenter-7.3.0.ebuild 14591 RMD160 7410b6a8d2dfcf7785dce5c7a369a407e025206c SHA1 96bba779f163e864a87acb9626754b0d41060279 SHA256 801205f4364f8cbcccd0176683a0dde9438ccfaec056482f069d94370b7eae97 -EBUILD squeezecenter-7.3.1.ebuild 15745 RMD160 4f6ea78452c5b3c6f58210368de7371a0cb28f46 SHA1 cfa3fb0182f290a9e923be3f33ececa1ec145169 SHA256 71b60165ffc720da777e7c1f8d802da3a92bb16d264f6b7d200493e295511ea0 -EBUILD squeezecenter-7.3.2-r1.ebuild 16033 RMD160 69ebd35e65254130a025f3bb5d5e85e64b2510fa SHA1 7abad5e74e2ff3a6f8bb254bea4e3e815d360854 SHA256 50eee8ab6e7404a9fed09478f45f63af09fdb20348a5bc4a0f947d899365afd0 -EBUILD squeezecenter-7.3.2-r2.ebuild 16034 RMD160 e928dfd4b2e33ba38d08474f6e0675c294448234 SHA1 19a8b40a3659f2e70136cabbf72d0dd34763da25 SHA256 7cb4030c461ffb15ab362b346c618d6a6eca4f5e987c08ed6704438c2fb96948 EBUILD squeezecenter-7.3.3-r1.ebuild 16458 RMD160 372635ab7d49a3a4504dd087d0f84790a466fa0d SHA1 724cb33b882f683dd857aa20f4bafe5f49c2b3a1 SHA256 9bb63d9bcfe12777f0e465fae1468ed3439f5ad4e8275152963e2e0fc3438530 -EBUILD squeezecenter-7.3.3.ebuild 16250 RMD160 44beced0a19971de8ff497dbc1f6c79ec0ca1ea0 SHA1 0b5dcca5ee708597f2f1100a54103404721f68bc SHA256 68492fb365cf672551fea4c32c12db4f65e96a59ee4d60201d3a3a4d033352d2 MISC ChangeLog 9799 RMD160 d4e27b15804cf2c27590f9467f8dc3569e8bfe50 SHA1 ef332c4efac68005483ec775c7de9521932fa9fd SHA256 50c7005821be096feb1f7d094b6f27c7a1e85ef6617537cebc99bf3bc5572a71 MISC metadata.xml 1111 RMD160 09bbcc60edfa73e0b04a509c43a9e3a38396c9a5 SHA1 091e7172538d6f37f885752a2ab72d1cbf40334a SHA256 3f92fd179e06f52bd8af1caf6d160bacadb9b5ad90e3d34c98255379e075e1fe ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) - -iEYEARECAAYFAkpjXf4ACgkQV3J2n04EauxfYQCeK3K65HP9L8illSm8Xf715w6W -+b4AnRZs2BFo3uBcOHUIMkYuKkNy9PDh -=g60L ------END PGP SIGNATURE----- diff --git a/media-sound/squeezecenter/squeezecenter-7.2.0-r1.ebuild b/media-sound/squeezecenter/squeezecenter-7.2.0-r1.ebuild deleted file mode 100644 index 11ca47f6a5db..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.2.0-r1.ebuild +++ /dev/null @@ -1,369 +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.2.0-r1.ebuild,v 1.2 2008/11/18 16:15:29 tove Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -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/${SRC_DIR}/${MY_P}.tgz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi" - -# Note: virtual/perl-Module-Build necessary because of SC bug#5882 -# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). -DEPEND=" - dev-perl/File-Which - virtual/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}" - -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 - 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 - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/filepaths-gentoo.patch" - - # Prune GD from the SqueezeCenter local CPAN. This is due to - # SC bug#5882 which means we need to bring in Portage's version of GD, - # which will fail if it is different to the version in the local CPAN - # tree. SqueezeCenter will then use the system-installed dev-perl/GD. - # (This fixes Gentoo bug #237548) - rm -r CPAN/GD.pm CPAN/GD || die "Unable to remove local CPAN GD" -} - -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() { - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} diff --git a/media-sound/squeezecenter/squeezecenter-7.2.1.ebuild b/media-sound/squeezecenter/squeezecenter-7.2.1.ebuild deleted file mode 100644 index cabb887199df..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.2.1.ebuild +++ /dev/null @@ -1,386 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.2.1.ebuild,v 1.3 2009/04/10 05:41:46 lavajoe Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" -MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN" - -DESCRIPTION="Logitech SqueezeCenter music server" -HOMEPAGE="http://www.slimdevices.com/pi_features.html" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi" - -# @@TOOD - add vendor-src tarballs to this. -SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz - mirror://gentoo/SqueezeCenter-AutoXS-Header-0.03.tar.gz - mirror://gentoo/SqueezeCenter-Class-C3-XS-0.08.tar.gz - mirror://gentoo/SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz - mirror://gentoo/SqueezeCenter-Compress-Zlib-1.41.tar.gz - mirror://gentoo/SqueezeCenter-DBD-mysql-3.0002.tar.gz - mirror://gentoo/SqueezeCenter-DBI-1.604.tar.gz - mirror://gentoo/SqueezeCenter-Digest-SHA1-2.11.tar.gz - mirror://gentoo/SqueezeCenter-Encode-Detect-1.00.tar.gz - mirror://gentoo/SqueezeCenter-HTML-Parser-3.48.tar.gz - mirror://gentoo/SqueezeCenter-JSON-XS-1.5.tar.gz - mirror://gentoo/SqueezeCenter-POE-XS-Queue-Array-0.002.tar.gz - mirror://gentoo/SqueezeCenter-Template-Toolkit-2.15.tar.gz - mirror://gentoo/SqueezeCenter-Time-HiRes-1.86.tar.gz - mirror://gentoo/SqueezeCenter-XML-Parser-2.34.tar.gz - mirror://gentoo/SqueezeCenter-YAML-Syck-0.64.tar.gz" - -# Note: virtual/perl-Module-Build necessary because of SC bug#5882 -# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). -DEPEND=" - dev-perl/File-Which - virtual/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}" - -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 - 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 - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/filepaths-gentoo.patch" - epatch "${FILESDIR}/${P}-build-perl-modules-gentoo.patch" - - # Prune GD from the SqueezeCenter local CPAN. This is due to - # SC bug#5882 which means we need to bring in Portage's version of GD, - # which will fail if it is different to the version in the local CPAN - # tree. SqueezeCenter will then use the system-installed dev-perl/GD. - # (This fixes Gentoo bug #237548) - rm -r CPAN/GD.pm CPAN/GD || die "Unable to remove local CPAN GD" -} - -src_compile() { - einfo "Building required Perl modules (some warnings are normal here) ..." - echo -e "\n${S}\n${WORKDIR}" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" -} - -src_install() { - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} diff --git a/media-sound/squeezecenter/squeezecenter-7.3.1.ebuild b/media-sound/squeezecenter/squeezecenter-7.3.1.ebuild deleted file mode 100644 index 7226941c2a8f..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.3.1.ebuild +++ /dev/null @@ -1,457 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.3.1.ebuild,v 1.2 2009/07/19 17:54:59 tove Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" -MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN" - -DESCRIPTION="Logitech SqueezeCenter music server" -HOMEPAGE="http://www.slimdevices.com/pi_features.html" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi aac" - -SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz - mirror://gentoo/SqueezeCenter-AutoXS-Header-0.03.tar.gz - mirror://gentoo/SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz - mirror://gentoo/SqueezeCenter-POE-XS-Queue-Array-0.002.tar.gz" - -# 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 - virtual/perl-Module-Build - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - " -# 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 - >=app-admin/sudo-1.6.8 - >=dev-perl/GD-2.35 - >=virtual/perl-IO-Compress-2.015 - >=dev-perl/YAML-Syck-1.05 - >=dev-perl/DBD-mysql-4.00.5 - >=dev-perl/DBI-1.607 - >=dev-perl/Digest-SHA1-2.11 - >=dev-perl/Encode-Detect-1.01 - >=dev-perl/HTML-Parser-3.56 - >=dev-perl/JSON-XS-2.2.3.1 - >=dev-perl/Template-Toolkit-2.19 - >=virtual/perl-Time-HiRes-1.97.15 - >=dev-perl/XML-Parser-2.36 - >=dev-perl/Cache-Cache-1.04 - >=dev-perl/Class-Data-Inheritable-0.08 - >=dev-perl/Class-Inspector-1.23 - >=dev-perl/File-Next-1.02 - >=virtual/perl-File-Temp-0.20 - >=dev-perl/File-Which-0.05 - >=perl-core/i18n-langtags-0.35 - >=dev-perl/IO-String-1.08 - >=dev-perl/Log-Log4perl-1.13 - >=dev-perl/libwww-perl-5.805 - >=perl-core/CGI-3.29 - >=dev-perl/TimeDate-1.16 - >=dev-perl/Math-VecStat-0.08 - >=dev-perl/Net-DNS-0.63 - >=dev-perl/Net-IP-1.25 - >=dev-perl/Path-Class-0.16 - >=dev-perl/SQL-Abstract-1.22 - >=dev-perl/SQL-Abstract-Limit-0.12 - >=dev-perl/TimeDate-1.16 - >=dev-perl/URI-1.35 - >=dev-perl/XML-Simple-2.18 - >=perl-core/version-0.76 - >=dev-perl/Carp-Clan-5.9 - >=dev-perl/Readonly-1.03 - >=dev-perl/Carp-Assert-0.20 - >=dev-perl/Class-Virtual-0.06 - >=dev-perl/File-Slurp-9999.13 - >=dev-perl/Exporter-Lite-0.02 - >=dev-perl/Tie-IxHash-1.21 - >=virtual/perl-Module-Pluggable-3.6 - >=dev-perl/Archive-Zip-1.23 - lame? ( media-sound/lame ) - alac? ( media-sound/alac_decoder ) - wavpack? ( media-sound/wavpack ) - bonjour? ( net-misc/mDNSResponder ) - flac? ( media-libs/flac ) - musepack? ( media-sound/musepack-tools ) - ogg? ( media-sound/sox ) - aac? ( media-libs/faad2 ) - " - -S="${WORKDIR}/${MY_P}" - -# Selected contents of SqueezeCenter's local CPAN collection that we include -# in the installation. This removes duplication of CPAN modules. (See Gentoo -# bug #251494). -CPANKEEP=" - Class/XSAccessor/Array.pm - POE/XS/Queue/Array.pm - - JSON/XS/VersionOneAndTwo.pm - Class/Accessor/ - Class/Accessor.pm - Class/C3.pm - Class/Data/Accessor.pm - Algorithm/C3.pm - Data/ - DBIx/ - File/BOM.pm - Net/UPnP/ - Net/UPnP.pm - POE/Queue/Array.pm - Proc/Background/ - Proc/Background.pm - Text/Unidecode/ - Text/Unidecode.pm - Tie/Cache/LRU/ - Tie/Cache/LRU.pm - Tie/LLHash.pm - Tie/RegexpHash.pm - URI/Find.pm - PAR/ - PAR.pm - enum.pm - " - -PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs" -LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs" -DOCDIR="/usr/share/doc/squeezecenter-${PV}" -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 - 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 - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/${P}-build-perl-modules-gentoo.patch" - epatch "${FILESDIR}/${P}-aac-transcode-gentoo.patch" - epatch "${FILESDIR}/${P}-json-xs-gentoo.patch" -} - -src_compile() { - einfo "Building required Perl modules (some warnings are normal here) ..." - echo -e "\n${S}\n${WORKDIR}" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" -} - -src_install() { - - # The main Perl executables - exeinto /usr/sbin - newexe slimserver.pl squeezecenter-server - newexe scanner.pl squeezecenter-scanner - newexe cleanup.pl squeezecenter-cleanup - - # Get the Perl package name and version - eval `perl '-V:package'` - eval `perl '-V:version'` - - # 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" - - # The server Perl modules - dodir "/usr/lib/${package}/vendor_perl/${version}" - cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" || die "Unable to install server Perl modules" - - # Compiled CPAN module go under lib as they are arch-specific - dodir "/usr/lib/squeezecenter/CPAN" - cp -r CPAN/arch "${D}/usr/lib/squeezecenter/CPAN" || die "Unable to install compiled CPAN modules" - - # Preseve some of the SqueezeCenter-packaged CPAN modules that Gentoo - # doesn't provide ebuilds for. - for ITEM in ${CPANKEEP}; do - dodir "/usr/lib/squeezecenter/CPAN/$(dirname ${ITEM})" - cp -r "CPAN/${ITEM}" "${D}/usr/lib/squeezecenter/CPAN/${ITEM}" || die "Unable to preserve CPAN item ${ITEM}" - done - - # Various directories of architecture-independent static files - dodir "${SHAREDIR}" - cp -r Firmware "${D}/${SHAREDIR}" || die "Unable to install firmware" - cp -r Graphics "${D}/${SHAREDIR}" || die "Unable to install Graphics" - cp -r HTML "${D}/${SHAREDIR}" || die "Unable to install HTML" - cp -r IR "${D}/${SHAREDIR}" || die "Unable to install IR" - cp -r SQL "${D}/${SHAREDIR}" || die "Unable to install SQL" - - # Architecture-dependent static files - dodir "${LIBDIR}" - cp -r lib/* "${D}/${LIBDIR}" || die "Unable to install architecture-dependent files" - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} diff --git a/media-sound/squeezecenter/squeezecenter-7.3.2-r1.ebuild b/media-sound/squeezecenter/squeezecenter-7.3.2-r1.ebuild deleted file mode 100644 index abd961553819..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.3.2-r1.ebuild +++ /dev/null @@ -1,469 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.3.2-r1.ebuild,v 1.2 2009/07/19 17:54:59 tove Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" -MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN" - -DESCRIPTION="Logitech SqueezeCenter music server" -HOMEPAGE="http://www.slimdevices.com/pi_features.html" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi aac" - -SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz - mirror://gentoo/SqueezeCenter-AutoXS-Header-0.03.tar.gz - mirror://gentoo/SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz - mirror://gentoo/SqueezeCenter-POE-XS-Queue-Array-0.002.tar.gz" - -# Note: virtual/perl-Module-Build necessary because of SC bug#5882 -# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). -DEPEND=" - dev-perl/File-Which - virtual/perl-Module-Build - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - " -# Note: dev-perl/GD necessary because of SC bug#6143 -# (http://bugs.slimdevices.com/show_bug.cgi?id=6143). -RDEPEND=" - dev-perl/File-Which - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - >=dev-lang/perl-5.8.8 - >=dev-perl/GD-2.35 - >=virtual/perl-IO-Compress-2.015 - >=dev-perl/YAML-Syck-1.05 - >=dev-perl/DBD-mysql-4.00.5 - >=dev-perl/DBI-1.607 - >=dev-perl/Digest-SHA1-2.11 - >=dev-perl/Encode-Detect-1.01 - >=dev-perl/HTML-Parser-3.56 - >=dev-perl/JSON-XS-2.2.3.1 - >=dev-perl/Template-Toolkit-2.19 - >=virtual/perl-Time-HiRes-1.97.15 - >=dev-perl/XML-Parser-2.36 - >=dev-perl/Cache-Cache-1.04 - >=dev-perl/Class-Data-Inheritable-0.08 - >=dev-perl/Class-Inspector-1.23 - >=dev-perl/File-Next-1.02 - >=virtual/perl-File-Temp-0.20 - >=dev-perl/File-Which-0.05 - >=perl-core/i18n-langtags-0.35 - >=dev-perl/IO-String-1.08 - >=dev-perl/Log-Log4perl-1.13 - >=dev-perl/libwww-perl-5.805 - >=perl-core/CGI-3.29 - >=dev-perl/TimeDate-1.16 - >=dev-perl/Math-VecStat-0.08 - >=dev-perl/Net-DNS-0.63 - >=dev-perl/Net-IP-1.25 - >=dev-perl/Path-Class-0.16 - >=dev-perl/SQL-Abstract-1.22 - >=dev-perl/SQL-Abstract-Limit-0.12 - >=dev-perl/URI-1.35 - >=dev-perl/XML-Simple-2.18 - >=perl-core/version-0.76 - >=dev-perl/Carp-Clan-5.9 - >=dev-perl/Readonly-1.03 - >=dev-perl/Carp-Assert-0.20 - >=dev-perl/Class-Virtual-0.06 - >=dev-perl/File-Slurp-9999.13 - >=dev-perl/Exporter-Lite-0.02 - >=dev-perl/Tie-IxHash-1.21 - >=virtual/perl-Module-Pluggable-3.6 - >=dev-perl/Archive-Zip-1.23 - lame? ( media-sound/lame ) - alac? ( media-sound/alac_decoder ) - wavpack? ( media-sound/wavpack ) - bonjour? ( net-misc/mDNSResponder ) - flac? ( - media-libs/flac - media-sound/sox - ) - musepack? ( media-sound/musepack-tools ) - ogg? ( media-sound/sox ) - aac? ( media-libs/faad2 ) - " - -S="${WORKDIR}/${MY_P}" - -# Selected contents of SqueezeCenter's local CPAN collection that we include -# in the installation. This removes duplication of CPAN modules. (See Gentoo -# bug #251494). -CPANKEEP=" - Class/XSAccessor/Array.pm - POE/XS/Queue/Array.pm - - JSON/XS/VersionOneAndTwo.pm - Class/Accessor/ - Class/Accessor.pm - Class/C3.pm - Class/Data/Accessor.pm - Algorithm/C3.pm - Data/ - DBIx/ - File/BOM.pm - Net/UPnP/ - Net/UPnP.pm - POE/Queue/Array.pm - Proc/Background/ - Proc/Background.pm - Text/Unidecode/ - Text/Unidecode.pm - Tie/Cache/LRU/ - Tie/Cache/LRU.pm - Tie/LLHash.pm - Tie/RegexpHash.pm - URI/Find.pm - PAR/ - PAR.pm - enum.pm - " - -PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs" -LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs" -DOCDIR="/usr/share/doc/squeezecenter-${PV}" -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 and FLAC support, so make sure it has that included - # if required - if use ogg; then - if ! built_with_use media-sound/sox ogg; then - eerror "media-sound/sox not built with USE=ogg" - die "SqueezeCenter needs media-sound/sox to be built with USE=ogg" - fi - fi - if use flac; then - if ! built_with_use media-sound/sox flac; then - eerror "media-sound/sox not built with USE=flac" - die "SqueezeCenter needs media-sound/sox to be built with USE=flac" - fi - fi - - # Create the user and group if not already present - enewgroup squeezecenter - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/${P}-build-perl-modules-gentoo.patch" - epatch "${FILESDIR}/${P}-aac-transcode-gentoo.patch" - epatch "${FILESDIR}/${P}-json-xs-gentoo.patch" -} - -src_compile() { - einfo "Building required Perl modules (some warnings are normal here) ..." - echo -e "\n${S}\n${WORKDIR}" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" -} - -src_install() { - - # The main Perl executables - exeinto /usr/sbin - newexe slimserver.pl squeezecenter-server - newexe scanner.pl squeezecenter-scanner - newexe cleanup.pl squeezecenter-cleanup - - # Get the Perl package name and version - eval `perl '-V:package'` - eval `perl '-V:version'` - - # 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" - - # The server Perl modules - dodir "/usr/lib/${package}/vendor_perl/${version}" - cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" || die "Unable to install server Perl modules" - - # Compiled CPAN module go under lib as they are arch-specific - dodir "/usr/lib/squeezecenter/CPAN" - cp -r CPAN/arch "${D}/usr/lib/squeezecenter/CPAN" || die "Unable to install compiled CPAN modules" - - # Preseve some of the SqueezeCenter-packaged CPAN modules that Gentoo - # doesn't provide ebuilds for. - for ITEM in ${CPANKEEP}; do - dodir "/usr/lib/squeezecenter/CPAN/$(dirname ${ITEM})" - cp -r "CPAN/${ITEM}" "${D}/usr/lib/squeezecenter/CPAN/${ITEM}" || die "Unable to preserve CPAN item ${ITEM}" - done - - # Various directories of architecture-independent static files - dodir "${SHAREDIR}" - cp -r Firmware "${D}/${SHAREDIR}" || die "Unable to install firmware" - cp -r Graphics "${D}/${SHAREDIR}" || die "Unable to install Graphics" - cp -r HTML "${D}/${SHAREDIR}" || die "Unable to install HTML" - cp -r IR "${D}/${SHAREDIR}" || die "Unable to install IR" - cp -r SQL "${D}/${SHAREDIR}" || die "Unable to install SQL" - - # Architecture-dependent static files - dodir "${LIBDIR}" - cp -r lib/* "${D}/${LIBDIR}" || die "Unable to install architecture-dependent files" - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} diff --git a/media-sound/squeezecenter/squeezecenter-7.3.2-r2.ebuild b/media-sound/squeezecenter/squeezecenter-7.3.2-r2.ebuild deleted file mode 100644 index 5f7bd55ab28e..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.3.2-r2.ebuild +++ /dev/null @@ -1,469 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.3.2-r2.ebuild,v 1.2 2009/07/19 17:54:59 tove Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" -MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN" - -DESCRIPTION="Logitech SqueezeCenter music server" -HOMEPAGE="http://www.slimdevices.com/pi_features.html" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi aac" - -SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz - mirror://gentoo/SqueezeCenter-AutoXS-Header-0.03.tar.gz - mirror://gentoo/SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz - mirror://gentoo/SqueezeCenter-POE-XS-Queue-Array-0.002.tar.gz" - -# Note: virtual/perl-Module-Build necessary because of SC bug#5882 -# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). -DEPEND=" - dev-perl/File-Which - virtual/perl-Module-Build - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - " -# Note: dev-perl/GD necessary because of SC bug#6143 -# (http://bugs.slimdevices.com/show_bug.cgi?id=6143). -RDEPEND=" - dev-perl/File-Which - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - >=dev-lang/perl-5.8.8 - >=dev-perl/GD-2.35 - >=virtual/perl-IO-Compress-2.015 - >=dev-perl/YAML-Syck-1.05 - >=dev-perl/DBD-mysql-4.00.5 - >=dev-perl/DBI-1.607 - >=dev-perl/Digest-SHA1-2.11 - >=dev-perl/Encode-Detect-1.01 - >=dev-perl/HTML-Parser-3.56 - >=dev-perl/JSON-XS-2.2.3.1 - >=dev-perl/Template-Toolkit-2.19 - >=virtual/perl-Time-HiRes-1.97.15 - >=dev-perl/XML-Parser-2.36 - >=dev-perl/Cache-Cache-1.04 - >=dev-perl/Class-Data-Inheritable-0.08 - >=dev-perl/Class-Inspector-1.23 - >=dev-perl/File-Next-1.02 - >=virtual/perl-File-Temp-0.20 - >=dev-perl/File-Which-0.05 - >=perl-core/i18n-langtags-0.35 - >=dev-perl/IO-String-1.08 - >=dev-perl/Log-Log4perl-1.13 - >=dev-perl/libwww-perl-5.805 - >=perl-core/CGI-3.29 - >=dev-perl/TimeDate-1.16 - >=dev-perl/Math-VecStat-0.08 - >=dev-perl/Net-DNS-0.63 - >=dev-perl/Net-IP-1.25 - >=dev-perl/Path-Class-0.16 - >=dev-perl/SQL-Abstract-1.22 - >=dev-perl/SQL-Abstract-Limit-0.12 - >=dev-perl/URI-1.35 - >=dev-perl/XML-Simple-2.18 - >=perl-core/version-0.76 - >=dev-perl/Carp-Clan-5.9 - >=dev-perl/Readonly-1.03 - >=dev-perl/Carp-Assert-0.20 - >=dev-perl/Class-Virtual-0.06 - >=dev-perl/File-Slurp-9999.13 - >=dev-perl/Exporter-Lite-0.02 - >=dev-perl/Tie-IxHash-1.21 - >=virtual/perl-Module-Pluggable-3.6 - >=dev-perl/Archive-Zip-1.23 - lame? ( media-sound/lame ) - alac? ( media-sound/alac_decoder ) - wavpack? ( media-sound/wavpack ) - bonjour? ( net-misc/mDNSResponder ) - flac? ( - media-libs/flac - media-sound/sox - ) - musepack? ( media-sound/musepack-tools ) - ogg? ( media-sound/sox ) - aac? ( media-libs/faad2 ) - " - -S="${WORKDIR}/${MY_P}" - -# Selected contents of SqueezeCenter's local CPAN collection that we include -# in the installation. This removes duplication of CPAN modules. (See Gentoo -# bug #251494). -CPANKEEP=" - Class/XSAccessor/Array.pm - POE/XS/Queue/Array.pm - - JSON/XS/VersionOneAndTwo.pm - Class/Accessor/ - Class/Accessor.pm - Class/C3.pm - Class/Data/Accessor.pm - Algorithm/C3.pm - Data/ - DBIx/ - File/BOM.pm - Net/UPnP/ - Net/UPnP.pm - POE/Queue/Array.pm - Proc/Background/ - Proc/Background.pm - Text/Unidecode/ - Text/Unidecode.pm - Tie/Cache/LRU/ - Tie/Cache/LRU.pm - Tie/LLHash.pm - Tie/RegexpHash.pm - URI/Find.pm - PAR/ - PAR.pm - enum.pm - " - -PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs" -LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs" -DOCDIR="/usr/share/doc/squeezecenter-${PV}" -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 and FLAC support, so make sure it has that included - # if required - if use ogg; then - if ! built_with_use media-sound/sox ogg; then - eerror "media-sound/sox not built with USE=ogg" - die "SqueezeCenter needs media-sound/sox to be built with USE=ogg" - fi - fi - if use flac; then - if ! built_with_use media-sound/sox flac; then - eerror "media-sound/sox not built with USE=flac" - die "SqueezeCenter needs media-sound/sox to be built with USE=flac" - fi - fi - - # Create the user and group if not already present - enewgroup squeezecenter - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/${P}-build-perl-modules-gentoo.patch" - epatch "${FILESDIR}/${P}-aac-transcode-gentoo.patch" - epatch "${FILESDIR}/${PF}-json-xs-gentoo.patch" -} - -src_compile() { - einfo "Building required Perl modules (some warnings are normal here) ..." - echo -e "\n${S}\n${WORKDIR}" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" -} - -src_install() { - - # The main Perl executables - exeinto /usr/sbin - newexe slimserver.pl squeezecenter-server - newexe scanner.pl squeezecenter-scanner - newexe cleanup.pl squeezecenter-cleanup - - # Get the Perl package name and version - eval `perl '-V:package'` - eval `perl '-V:version'` - - # 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" - - # The server Perl modules - dodir "/usr/lib/${package}/vendor_perl/${version}" - cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" || die "Unable to install server Perl modules" - - # Compiled CPAN module go under lib as they are arch-specific - dodir "/usr/lib/squeezecenter/CPAN" - cp -r CPAN/arch "${D}/usr/lib/squeezecenter/CPAN" || die "Unable to install compiled CPAN modules" - - # Preseve some of the SqueezeCenter-packaged CPAN modules that Gentoo - # doesn't provide ebuilds for. - for ITEM in ${CPANKEEP}; do - dodir "/usr/lib/squeezecenter/CPAN/$(dirname ${ITEM})" - cp -r "CPAN/${ITEM}" "${D}/usr/lib/squeezecenter/CPAN/${ITEM}" || die "Unable to preserve CPAN item ${ITEM}" - done - - # Various directories of architecture-independent static files - dodir "${SHAREDIR}" - cp -r Firmware "${D}/${SHAREDIR}" || die "Unable to install firmware" - cp -r Graphics "${D}/${SHAREDIR}" || die "Unable to install Graphics" - cp -r HTML "${D}/${SHAREDIR}" || die "Unable to install HTML" - cp -r IR "${D}/${SHAREDIR}" || die "Unable to install IR" - cp -r SQL "${D}/${SHAREDIR}" || die "Unable to install SQL" - - # Architecture-dependent static files - dodir "${LIBDIR}" - cp -r lib/* "${D}/${LIBDIR}" || die "Unable to install architecture-dependent files" - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} diff --git a/media-sound/squeezecenter/squeezecenter-7.3.3.ebuild b/media-sound/squeezecenter/squeezecenter-7.3.3.ebuild deleted file mode 100644 index bae34ed372af..000000000000 --- a/media-sound/squeezecenter/squeezecenter-7.3.3.ebuild +++ /dev/null @@ -1,473 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.3.3.ebuild,v 1.2 2009/07/19 17:54:59 tove Exp $ - -inherit eutils - -MAJOR_VER="${PV:0:3}" -MINOR_VER="${PV:4:1}" -SRC_DIR="SqueezeCenter_v${MAJOR_VER}.${MINOR_VER}" -MY_P="squeezecenter-${MAJOR_VER}.${MINOR_VER}-noCPAN" - -DESCRIPTION="Logitech SqueezeCenter music server" -HOMEPAGE="http://www.slimdevices.com/pi_features.html" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="lame wavpack musepack alac ogg bonjour flac avahi aac" - -#SRC_URI="http://www.slimdevices.com/downloads/${SRC_DIR}/${MY_P}.tgz -SRC_URI="http://downloads.slimdevices.com/${SRC_DIR}/${MY_P}.tgz - mirror://gentoo/SqueezeCenter-AutoXS-Header-0.03.tar.gz - mirror://gentoo/SqueezeCenter-Class-XSAccessor-Array-0.05.tar.gz - mirror://gentoo/SqueezeCenter-POE-XS-Queue-Array-0.002.tar.gz" - -# Note: virtual/perl-Module-Build necessary because of SC bug#5882 -# (http://bugs.slimdevices.com/show_bug.cgi?id=5882). -DEPEND=" - dev-perl/File-Which - virtual/perl-Module-Build - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - " -# Note: dev-perl/GD necessary because of SC bug#6143 -# (http://bugs.slimdevices.com/show_bug.cgi?id=6143). -RDEPEND=" - dev-perl/File-Which - virtual/logger - virtual/mysql - avahi? ( net-dns/avahi ) - >=dev-lang/perl-5.8.8 - >=dev-perl/GD-2.35 - >=virtual/perl-IO-Compress-2.015 - >=dev-perl/YAML-Syck-1.05 - >=dev-perl/DBD-mysql-4.00.5 - >=dev-perl/DBI-1.607 - >=dev-perl/Digest-SHA1-2.11 - >=dev-perl/Encode-Detect-1.01 - >=dev-perl/HTML-Parser-3.56 - >=dev-perl/JSON-XS-2.2.3.1 - >=dev-perl/Template-Toolkit-2.19 - >=virtual/perl-Time-HiRes-1.97.15 - >=dev-perl/XML-Parser-2.36 - >=dev-perl/Cache-Cache-1.04 - >=dev-perl/Class-Data-Inheritable-0.08 - >=dev-perl/Class-Inspector-1.23 - >=dev-perl/File-Next-1.02 - >=virtual/perl-File-Temp-0.20 - >=dev-perl/File-Which-0.05 - >=perl-core/i18n-langtags-0.35 - >=dev-perl/IO-String-1.08 - >=dev-perl/Log-Log4perl-1.13 - >=dev-perl/libwww-perl-5.805 - >=perl-core/CGI-3.29 - >=dev-perl/TimeDate-1.16 - >=dev-perl/Math-VecStat-0.08 - >=dev-perl/Net-DNS-0.63 - >=dev-perl/Net-IP-1.25 - >=dev-perl/Path-Class-0.16 - >=dev-perl/SQL-Abstract-1.22 - >=dev-perl/SQL-Abstract-Limit-0.12 - >=dev-perl/URI-1.35 - >=dev-perl/XML-Simple-2.18 - >=perl-core/version-0.76 - >=dev-perl/Carp-Clan-5.9 - >=dev-perl/Readonly-1.03 - >=dev-perl/Carp-Assert-0.20 - >=dev-perl/Class-Virtual-0.06 - >=dev-perl/File-Slurp-9999.13 - >=dev-perl/Exporter-Lite-0.02 - >=dev-perl/Tie-IxHash-1.21 - >=virtual/perl-Module-Pluggable-3.6 - >=dev-perl/Archive-Zip-1.23 - lame? ( media-sound/lame ) - alac? ( media-sound/alac_decoder ) - wavpack? ( media-sound/wavpack ) - bonjour? ( net-misc/mDNSResponder ) - flac? ( - media-libs/flac - media-sound/sox - ) - musepack? ( media-sound/musepack-tools ) - ogg? ( media-sound/sox ) - aac? ( media-libs/faad2 ) - " - -S="${WORKDIR}/${MY_P}" - -# Selected contents of SqueezeCenter's local CPAN collection that we include -# in the installation. This removes duplication of CPAN modules. (See Gentoo -# bug #251494). -CPANKEEP=" - Class/XSAccessor/Array.pm - POE/XS/Queue/Array.pm - - JSON/XS/VersionOneAndTwo.pm - Class/Accessor/ - Class/Accessor.pm - Class/C3.pm - Class/Data/Accessor.pm - Algorithm/C3.pm - Data/ - DBIx/ - File/BOM.pm - Net/UPnP/ - Net/UPnP.pm - POE/Queue/Array.pm - Proc/Background/ - Proc/Background.pm - Text/Unidecode/ - Text/Unidecode.pm - Tie/Cache/LRU/ - Tie/Cache/LRU.pm - Tie/LLHash.pm - Tie/RegexpHash.pm - URI/Find.pm - PAR/ - PAR.pm - enum.pm - " - -PREFS="/var/lib/squeezecenter/prefs/squeezecenter.prefs" -LIVE_PREFS="/var/lib/squeezecenter/prefs/server.prefs" -DOCDIR="/usr/share/doc/squeezecenter-${PV}" -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 and FLAC support, so make sure it has that included - # if required - if use ogg; then - if ! built_with_use media-sound/sox ogg; then - eerror "media-sound/sox not built with USE=ogg" - die "SqueezeCenter needs media-sound/sox to be built with USE=ogg" - fi - fi - if use flac; then - if ! built_with_use media-sound/sox flac; then - eerror "media-sound/sox not built with USE=flac" - die "SqueezeCenter needs media-sound/sox to be built with USE=flac" - fi - fi - - # Create the user and group if not already present - enewgroup squeezecenter - enewuser squeezecenter -1 -1 "/dev/null" squeezecenter -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Apply patches - epatch "${FILESDIR}/${PF}-mDNSResponder-gentoo.patch" - epatch "${FILESDIR}/${PF}-build-perl-modules-gentoo.patch" - epatch "${FILESDIR}/${PF}-aac-transcode-gentoo.patch" - epatch "${FILESDIR}/${PF}-json-xs-gentoo.patch" - epatch "${FILESDIR}/${PF}-squeezeslave.patch" - epatch "${FILESDIR}/${PF}-squeezeslave-2.patch" - epatch "${FILESDIR}/${PF}-squeezeslave-3.patch" -} - -src_compile() { - einfo "Building required Perl modules (some warnings are normal here) ..." - echo -e "\n${S}\n${WORKDIR}" | Bin/build-perl-modules.pl || die "Unable to build Perl modules" -} - -src_install() { - - # The main Perl executables - exeinto /usr/sbin - newexe slimserver.pl squeezecenter-server - newexe scanner.pl squeezecenter-scanner - newexe cleanup.pl squeezecenter-cleanup - - # Get the Perl package name and version - eval `perl '-V:package'` - eval `perl '-V:version'` - - # 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" - - # The server Perl modules - dodir "/usr/lib/${package}/vendor_perl/${version}" - cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" || die "Unable to install server Perl modules" - - # Compiled CPAN module go under lib as they are arch-specific - dodir "/usr/lib/squeezecenter/CPAN" - cp -r CPAN/arch "${D}/usr/lib/squeezecenter/CPAN" || die "Unable to install compiled CPAN modules" - - # Preseve some of the SqueezeCenter-packaged CPAN modules that Gentoo - # doesn't provide ebuilds for. - for ITEM in ${CPANKEEP}; do - dodir "/usr/lib/squeezecenter/CPAN/$(dirname ${ITEM})" - cp -r "CPAN/${ITEM}" "${D}/usr/lib/squeezecenter/CPAN/${ITEM}" || die "Unable to preserve CPAN item ${ITEM}" - done - - # Various directories of architecture-independent static files - dodir "${SHAREDIR}" - cp -r Firmware "${D}/${SHAREDIR}" || die "Unable to install firmware" - cp -r Graphics "${D}/${SHAREDIR}" || die "Unable to install Graphics" - cp -r HTML "${D}/${SHAREDIR}" || die "Unable to install HTML" - cp -r IR "${D}/${SHAREDIR}" || die "Unable to install IR" - cp -r SQL "${D}/${SHAREDIR}" || die "Unable to install SQL" - - # Architecture-dependent static files - dodir "${LIBDIR}" - cp -r lib/* "${D}/${LIBDIR}" || die "Unable to install architecture-dependent files" - - # 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 - 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 - - # Initialise the user-installed plugins directory - dodir "${NEWPLUGINSDIR}" - - # Install logrotate support - insinto /etc/logrotate.d - 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-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}${LIVE_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}/" < "${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-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 "${LIVE_PREFS}" ] && sc_remove_db_prefs ${LIVE_PREFS} - - # Insert the external MySQL configuration into the preferences. - sc_update_prefs "${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. - 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 -} |