summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-02-19 03:43:15 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-02-19 03:43:15 +0000
commit21121a8ec85c60ae988b72b72edfd0566f8a7a23 (patch)
treec7421ba01307fb4dacf9f1ff409d50cf827683dd /media-sound/squeezecenter
parentThis shouldn't have been removed. (diff)
downloadgentoo-2-21121a8ec85c60ae988b72b72edfd0566f8a7a23.tar.gz
gentoo-2-21121a8ec85c60ae988b72b72edfd0566f8a7a23.tar.bz2
gentoo-2-21121a8ec85c60ae988b72b72edfd0566f8a7a23.zip
Add nightly for 2008-02-17; remove old January versions
(Portage version: 2.1.3.19)
Diffstat (limited to 'media-sound/squeezecenter')
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0_beta20080102.ebuild305
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0_beta20080108.ebuild307
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0_beta20080115.ebuild307
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0_beta20080119.ebuild307
-rw-r--r--media-sound/squeezecenter/squeezecenter-7.0_beta20080217.ebuild (renamed from media-sound/squeezecenter/squeezecenter-7.0_beta20080126.ebuild)10
5 files changed, 5 insertions, 1231 deletions
diff --git a/media-sound/squeezecenter/squeezecenter-7.0_beta20080102.ebuild b/media-sound/squeezecenter/squeezecenter-7.0_beta20080102.ebuild
deleted file mode 100644
index 752a0d4fe3a7..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0_beta20080102.ebuild
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080102.ebuild,v 1.1 2008/01/07 19:26:59 lavajoe Exp $
-
-inherit eutils
-
-MY_PV="${PV:8:4}-${PV:12:2}-${PV:14:2}"
-MY_P="SqueezeCenter_trunk_v${MY_PV}"
-
-DESCRIPTION="Logitech SqueezeCenter music server"
-HOMEPAGE="http://www.slimdevices.com/pi_features.html"
-SRC_URI="http://www.slimdevices.com/downloads/nightly/SqueezeCenter_v${MY_PV}/${MY_P}.no-cpan-arch.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Apply patches
- epatch "${FILESDIR}/mDNSResponder-7.0-gentoo.patch"
-
- # Remove bundled binaries that are supplied by other ebuilds
- einfo "Removing binaries provided by other ebuilds ..."
- rm "${S}"/Bin/*/mDNSResponderPosix || die # net-misc/mDNSResponder
- rm "${S}"/Bin/*/alac || die # media-sound/alac_decoder
- rm "${S}"/Bin/*/flac || die # media-libs/flac
- rm "${S}"/Bin/*/sox || die # media-sound/sox
- rm "${S}"/Bin/*/wvunpack || die # media-sound/wavpack
- rm "${S}"/Bin/*/mppdec || die # media-sound/musepack-tools
-
- # Remove bundled MySQL as we depend on an external instance
- einfo "Removing bundled MySQL ..."
- rm -r "${S}"/MySQL || die
- rm "${S}"/Bin/*/mysqld || die # virtual/mysql
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-src_install() {
- # Copy all files.
- dodir "${INSTROOT}/squeezecenter"
- cp -r * "${D}/${INSTROOT}/squeezecenter"
-
- # Install init scripts.
- newconfd "${FILESDIR}/squeezecenter-7.0.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-7.0.init.d" squeezecenter
-
- # Install default preferences.
- insinto /etc
- newins "${FILESDIR}/squeezecenter-7.0.prefs" squeezecenter.prefs
-
- # Install the SQL configuration scripts.
- insinto "${INSTROOT}/squeezecenter/SQL/mysql"
- doins "${FILESDIR}/dbdrop-7.0-gentoo.sql"
- doins "${FILESDIR}/dbcreate-7.0-gentoo.sql"
-
- # Initialize /var/{cache,run}.
- keepdir /var/{cache,run}/squeezecenter
- fowners squeezecenter:squeezecenter /var/{cache,run}/squeezecenter
- fperms 770 /var/{cache,run}/squeezecenter
-
- # Initialize /var/log.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-7.0.logrotate.d" squeezecenter
-
- # Install Avahi support (if USE flag is set).
- if use avahi; then
- insinto /etc/avahi/services
- newins "${FILESDIR}/avahi-7.0-squeezecenter.service" squeezecenter.service
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # Discover the port number from the preferences, but if it isn't there
- # then report the standard one.
- httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${CACHED_PREFS}" 2>/dev/null)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3"
- ewarn "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 ""
- 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
- mysql --user=root --password="${ROOT_PASSWD}" </dev/null >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # from this as it probably just indicates that the database wasn't
- # yet present.
- einfo "Dropping old SqueezeCenter database and user ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbdrop-7.0-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1
-
- # Drop and create the SqueezeCenter user and database.
- einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbcreate-7.0-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_PREFS}
-
- # Insert the external MySQL configuration into the preferences.
- sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- [ -f "${CACHED_PREFS}" ] && sc_update_prefs "${CACHED_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0_beta20080108.ebuild b/media-sound/squeezecenter/squeezecenter-7.0_beta20080108.ebuild
deleted file mode 100644
index 962526b3e85d..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0_beta20080108.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080108.ebuild,v 1.1 2008/01/09 03:12:25 lavajoe Exp $
-
-inherit eutils
-
-SVN_VER="16019"
-MAJOR_VER="${PV:0:3}"
-MY_SRC_DIR="SqueezeCenter_v${PV:8:4}-${PV:12:2}-${PV:14:2}"
-MY_P="squeezecenter-${MAJOR_VER}-${SVN_VER}-noCPAN"
-
-DESCRIPTION="Logitech SqueezeCenter music server"
-HOMEPAGE="http://www.slimdevices.com/pi_features.html"
-SRC_URI="http://www.slimdevices.com/downloads/nightly/${MY_SRC_DIR}/${MY_P}.tgz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Apply patches
- epatch "${FILESDIR}/mDNSResponder-${MAJOR_VER}-gentoo.patch"
-
- # Remove bundled binaries that are supplied by other ebuilds
- einfo "Removing binaries provided by other ebuilds ..."
- rm "${S}"/Bin/*/mDNSResponderPosix || die # net-misc/mDNSResponder
- rm "${S}"/Bin/*/alac || die # media-sound/alac_decoder
- rm "${S}"/Bin/*/flac || die # media-libs/flac
- rm "${S}"/Bin/*/sox || die # media-sound/sox
- rm "${S}"/Bin/*/wvunpack || die # media-sound/wavpack
- rm "${S}"/Bin/*/mppdec || die # media-sound/musepack-tools
-
- # Remove bundled MySQL as we depend on an external instance
- einfo "Removing bundled MySQL ..."
- rm -r "${S}"/MySQL || die
- rm "${S}"/Bin/*/mysqld || die # virtual/mysql
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-src_install() {
- # Copy all files.
- dodir "${INSTROOT}/squeezecenter"
- cp -r * "${D}/${INSTROOT}/squeezecenter"
-
- # Install init scripts.
- newconfd "${FILESDIR}/squeezecenter-${MAJOR_VER}.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-${MAJOR_VER}.init.d" squeezecenter
-
- # Install default preferences.
- insinto /etc
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.prefs" squeezecenter.prefs
-
- # Install the SQL configuration scripts.
- insinto "${INSTROOT}/squeezecenter/SQL/mysql"
- doins "${FILESDIR}/dbdrop-${MAJOR_VER}-gentoo.sql"
- doins "${FILESDIR}/dbcreate-${MAJOR_VER}-gentoo.sql"
-
- # Initialize /var/{cache,run}.
- keepdir /var/{cache,run}/squeezecenter
- fowners squeezecenter:squeezecenter /var/{cache,run}/squeezecenter
- fperms 770 /var/{cache,run}/squeezecenter
-
- # Initialize /var/log.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
-
- # Install Avahi support (if USE flag is set).
- if use avahi; then
- insinto /etc/avahi/services
- newins "${FILESDIR}/avahi-${MAJOR_VER}-squeezecenter.service" squeezecenter.service
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # Discover the port number from the preferences, but if it isn't there
- # then report the standard one.
- httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${CACHED_PREFS}" 2>/dev/null)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3"
- ewarn "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 ""
- 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
- mysql --user=root --password="${ROOT_PASSWD}" </dev/null >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # from this as it probably just indicates that the database wasn't
- # yet present.
- einfo "Dropping old SqueezeCenter database and user ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbdrop-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1
-
- # Drop and create the SqueezeCenter user and database.
- einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbcreate-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_PREFS}
-
- # Insert the external MySQL configuration into the preferences.
- sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- [ -f "${CACHED_PREFS}" ] && sc_update_prefs "${CACHED_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0_beta20080115.ebuild b/media-sound/squeezecenter/squeezecenter-7.0_beta20080115.ebuild
deleted file mode 100644
index c19f6b5efa42..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0_beta20080115.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080115.ebuild,v 1.1 2008/01/16 18:04:44 lavajoe Exp $
-
-inherit eutils
-
-SVN_VER="16284"
-MAJOR_VER="${PV:0:3}"
-MY_SRC_DIR="SqueezeCenter_v${PV:8:4}-${PV:12:2}-${PV:14:2}"
-MY_P="squeezecenter-${MAJOR_VER}-${SVN_VER}-noCPAN"
-
-DESCRIPTION="Logitech SqueezeCenter music server"
-HOMEPAGE="http://www.slimdevices.com/pi_features.html"
-SRC_URI="http://www.slimdevices.com/downloads/nightly/${MY_SRC_DIR}/${MY_P}.tgz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Apply patches
- epatch "${FILESDIR}/mDNSResponder-${MAJOR_VER}-gentoo.patch"
-
- # Remove bundled binaries that are supplied by other ebuilds
- einfo "Removing binaries provided by other ebuilds ..."
- rm "${S}"/Bin/*/mDNSResponderPosix || die # net-misc/mDNSResponder
- rm "${S}"/Bin/*/alac || die # media-sound/alac_decoder
- rm "${S}"/Bin/*/flac || die # media-libs/flac
- rm "${S}"/Bin/*/sox || die # media-sound/sox
- rm "${S}"/Bin/*/wvunpack || die # media-sound/wavpack
- rm "${S}"/Bin/*/mppdec || die # media-sound/musepack-tools
-
- # Remove bundled MySQL as we depend on an external instance
- einfo "Removing bundled MySQL ..."
- rm -r "${S}"/MySQL || die
- rm "${S}"/Bin/*/mysqld || die # virtual/mysql
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-src_install() {
- # Copy all files.
- dodir "${INSTROOT}/squeezecenter"
- cp -r * "${D}/${INSTROOT}/squeezecenter"
-
- # Install init scripts.
- newconfd "${FILESDIR}/squeezecenter-${MAJOR_VER}.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-${MAJOR_VER}.init.d" squeezecenter
-
- # Install default preferences.
- insinto /etc
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.prefs" squeezecenter.prefs
-
- # Install the SQL configuration scripts.
- insinto "${INSTROOT}/squeezecenter/SQL/mysql"
- doins "${FILESDIR}/dbdrop-${MAJOR_VER}-gentoo.sql"
- doins "${FILESDIR}/dbcreate-${MAJOR_VER}-gentoo.sql"
-
- # Initialize /var/{cache,run}.
- keepdir /var/{cache,run}/squeezecenter
- fowners squeezecenter:squeezecenter /var/{cache,run}/squeezecenter
- fperms 770 /var/{cache,run}/squeezecenter
-
- # Initialize /var/log.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
-
- # Install Avahi support (if USE flag is set).
- if use avahi; then
- insinto /etc/avahi/services
- newins "${FILESDIR}/avahi-${MAJOR_VER}-squeezecenter.service" squeezecenter.service
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # Discover the port number from the preferences, but if it isn't there
- # then report the standard one.
- httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${CACHED_PREFS}" 2>/dev/null)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3"
- ewarn "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 ""
- 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
- mysql --user=root --password="${ROOT_PASSWD}" </dev/null >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # from this as it probably just indicates that the database wasn't
- # yet present.
- einfo "Dropping old SqueezeCenter database and user ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbdrop-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1
-
- # Drop and create the SqueezeCenter user and database.
- einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbcreate-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_PREFS}
-
- # Insert the external MySQL configuration into the preferences.
- sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- [ -f "${CACHED_PREFS}" ] && sc_update_prefs "${CACHED_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0_beta20080119.ebuild b/media-sound/squeezecenter/squeezecenter-7.0_beta20080119.ebuild
deleted file mode 100644
index c19fe6b4c51f..000000000000
--- a/media-sound/squeezecenter/squeezecenter-7.0_beta20080119.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080119.ebuild,v 1.1 2008/01/21 04:49:24 lavajoe Exp $
-
-inherit eutils
-
-SVN_VER="16473"
-MAJOR_VER="${PV:0:3}"
-MY_SRC_DIR="SqueezeCenter_v${PV:8:4}-${PV:12:2}-${PV:14:2}"
-MY_P="squeezecenter-${MAJOR_VER}-${SVN_VER}-noCPAN"
-
-DESCRIPTION="Logitech SqueezeCenter music server"
-HOMEPAGE="http://www.slimdevices.com/pi_features.html"
-SRC_URI="http://www.slimdevices.com/downloads/nightly/${MY_SRC_DIR}/${MY_P}.tgz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="lame wavpack musepack alac ogg bonjour flac avahi"
-
-# Note: dev-perl/module-build necessary because of SC bug#5882
-# (http://bugs.slimdevices.com/show_bug.cgi?id=5882).
-DEPEND="
- dev-perl/File-Which
- dev-perl/module-build
- virtual/logger
- virtual/mysql
- avahi? ( net-dns/avahi )
- ogg? ( media-sound/sox )
- "
-# Note: dev-perl/GD necessary because of SC bug#6143
-# (http://bugs.slimdevices.com/show_bug.cgi?id=6143).
-RDEPEND="${DEPEND}
- >=dev-lang/perl-5.8.8
- >=dev-perl/GD-2.35
- >=app-admin/sudo-1.6.8
- alac? ( media-sound/alac_decoder )
- lame? ( media-sound/lame )
- wavpack? ( media-sound/wavpack )
- bonjour? ( net-misc/mDNSResponder )
- flac? ( media-libs/flac )
- musepack? ( media-sound/musepack-tools )
- "
-
-S="${WORKDIR}/${MY_P}"
-
-INSTROOT="/opt"
-PREFS="/etc/squeezecenter.prefs"
-CACHED_PREFS="/var/cache/squeezecenter/prefs/server.prefs"
-DBUSER="squeezecenter"
-
-pkg_setup() {
- # Sox has optional OGG support, so make sure it has been built that way
- if use ogg; then
- if ! built_with_use media-sound/sox ogg; then
- eerror "media-sound/sox not built with USE=ogg"
- die "media-sound/sox not built with USE=ogg"
- fi
- fi
-
- # Create the user and group if not already present
- enewgroup squeezecenter || die
- enewuser squeezecenter -1 -1 "${INSTROOT}/squeezecenter" squeezecenter || die
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Apply patches
- epatch "${FILESDIR}/mDNSResponder-${MAJOR_VER}-gentoo.patch"
-
- # Remove bundled binaries that are supplied by other ebuilds
- einfo "Removing binaries provided by other ebuilds ..."
- rm "${S}"/Bin/*/mDNSResponderPosix || die # net-misc/mDNSResponder
- rm "${S}"/Bin/*/alac || die # media-sound/alac_decoder
- rm "${S}"/Bin/*/flac || die # media-libs/flac
- rm "${S}"/Bin/*/sox || die # media-sound/sox
- rm "${S}"/Bin/*/wvunpack || die # media-sound/wavpack
- rm "${S}"/Bin/*/mppdec || die # media-sound/musepack-tools
-
- # Remove bundled MySQL as we depend on an external instance
- einfo "Removing bundled MySQL ..."
- rm -r "${S}"/MySQL || die
- rm "${S}"/Bin/*/mysqld || die # virtual/mysql
-}
-
-src_compile() {
- einfo "Building required Perl modules (some warnings are normal here) ..."
- mkdir "${T}/sc_compile"
- echo -e "\n${S}\n${T}/sc_compile" | Bin/build-perl-modules.pl || die "Unable to build Perl modules"
-}
-
-src_install() {
- # Copy all files.
- dodir "${INSTROOT}/squeezecenter"
- cp -r * "${D}/${INSTROOT}/squeezecenter"
-
- # Install init scripts.
- newconfd "${FILESDIR}/squeezecenter-${MAJOR_VER}.conf.d" squeezecenter
- newinitd "${FILESDIR}/squeezecenter-${MAJOR_VER}.init.d" squeezecenter
-
- # Install default preferences.
- insinto /etc
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.prefs" squeezecenter.prefs
-
- # Install the SQL configuration scripts.
- insinto "${INSTROOT}/squeezecenter/SQL/mysql"
- doins "${FILESDIR}/dbdrop-${MAJOR_VER}-gentoo.sql"
- doins "${FILESDIR}/dbcreate-${MAJOR_VER}-gentoo.sql"
-
- # Initialize /var/{cache,run}.
- keepdir /var/{cache,run}/squeezecenter
- fowners squeezecenter:squeezecenter /var/{cache,run}/squeezecenter
- fperms 770 /var/{cache,run}/squeezecenter
-
- # Initialize /var/log.
- dodir /var/log/squeezecenter
- fowners squeezecenter:squeezecenter /var/log/squeezecenter
- fperms 770 /var/log/squeezecenter
- touch "${D}/var/log/squeezecenter/server.log"
- touch "${D}/var/log/squeezecenter/scanner.log"
- touch "${D}/var/log/squeezecenter/perfmon.log"
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/server.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/scanner.log
- fowners squeezecenter:squeezecenter /var/log/squeezecenter/perfmon.log
-
- # Install logrotate support.
- insinto /etc/logrotate.d
- newins "${FILESDIR}/squeezecenter-${MAJOR_VER}.logrotate.d" squeezecenter
-
- # Install Avahi support (if USE flag is set).
- if use avahi; then
- insinto /etc/avahi/services
- newins "${FILESDIR}/avahi-${MAJOR_VER}-squeezecenter.service" squeezecenter.service
- fi
-}
-
-sc_starting_instr() {
- elog "SqueezeCenter can be started with the following command:"
- elog "\t/etc/init.d/squeezecenter start"
- elog ""
- elog "SqueezeCenter can be automatically started on each boot with the"
- elog "following command:"
- elog "\trc-update add squeezecenter default"
- elog ""
- elog "You might want to examine and modify the following configuration"
- elog "file before starting SqueezeCenter:"
- elog "\t/etc/conf.d/squeezecenter"
- elog ""
-
- # Discover the port number from the preferences, but if it isn't there
- # then report the standard one.
- httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${CACHED_PREFS}" 2>/dev/null)
- elog "You may access and configure SqueezeCenter by browsing to:"
- elog "\thttp://localhost:${httpport:-9000}/"
-}
-
-pkg_postinst() {
- # FLAC and LAME are quite useful (but not essential) for SqueezeCenter -
- # if they're not enabled then make sure the user understands that.
- if ! use flac; then
- ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
- ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
- ewarn "playing other less common file types (if you have a Squeezebox 2, 3"
- ewarn "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 ""
- 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
- mysql --user=root --password="${ROOT_PASSWD}" </dev/null >/dev/null 2>&1 && DONE=1
- if [ $DONE -eq 0 ]; then
- eerror "Incorrect MySQL root password, or MySQL is not running"
- fi
- done
-
- # Get the new password for the SqueezeCenter MySQL database user, and
- # have it re-entered to confirm it. We should trivially check it's not
- # the same as the MySQL root password.
- einfo "A new MySQL user will be added to own the SqueezeCenter database."
- einfo "Please enter the password for this new user (${DBUSER})."
- DONE=0
- while [ $DONE -eq 0 ]; do
- trap "stty echo; echo" EXIT
- stty -echo
- read -p "MySQL ${DBUSER} password: " DBUSER_PASSWD; echo
- stty echo
- trap ":" EXIT
- if [ -z "$DBUSER_PASSWD" ]; then
- eerror "The password should not be blank; try again."
- elif [ "$DBUSER_PASSWD" == "$ROOT_PASSWD" ]; then
- eerror "The ${DBUSER} password should be different to the root password"
- else
- DONE=1
- fi
- done
-
- # Drop the existing database and user - note we don't care about errors
- # from this as it probably just indicates that the database wasn't
- # yet present.
- einfo "Dropping old SqueezeCenter database and user ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbdrop-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" >/dev/null 2>&1
-
- # Drop and create the SqueezeCenter user and database.
- einfo "Creating SqueezeCenter MySQL user and database (${DBUSER}) ..."
- sed -e "s/__DATABASE__/${DBUSER}/" -e "s/__DBUSER__/${DBUSER}/" -e "s/__DBPASSWORD__/${DBUSER_PASSWD}/" < "${INSTROOT}/squeezecenter/SQL/mysql/dbcreate-${MAJOR_VER}-gentoo.sql" | mysql --user=root --password="${ROOT_PASSWD}" || die "Unable to create MySQL database and user"
-
- # Remove the existing MySQL preferences from SqueezeCenter (if any).
- sc_remove_db_prefs "${PREFS}"
- [ -f "${CACHED_PREFS}" ] && sc_remove_db_prefs ${CACHED_PREFS}
-
- # Insert the external MySQL configuration into the preferences.
- sc_update_prefs "${PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
- [ -f "${CACHED_PREFS}" ] && sc_update_prefs "${CACHED_PREFS}" "${DBUSER}" "${DBUSER_PASSWD}"
-
- # Phew - all done.
- # Give some tips on what to do now.
- einfo "Database configuration complete."
- einfo ""
- sc_starting_instr
-}
diff --git a/media-sound/squeezecenter/squeezecenter-7.0_beta20080126.ebuild b/media-sound/squeezecenter/squeezecenter-7.0_beta20080217.ebuild
index 2e5126f8116a..7e8635dd046f 100644
--- a/media-sound/squeezecenter/squeezecenter-7.0_beta20080126.ebuild
+++ b/media-sound/squeezecenter/squeezecenter-7.0_beta20080217.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080126.ebuild,v 1.1 2008/01/27 18:58:11 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/squeezecenter-7.0_beta20080217.ebuild,v 1.1 2008/02/19 03:43:15 lavajoe Exp $
inherit eutils
-SVN_VER="16779"
+SVN_VER="17600"
MAJOR_VER="${PV:0:3}"
MY_SRC_DIR="SqueezeCenter_${MAJOR_VER}_v${PV:8:4}-${PV:12:2}-${PV:14:2}"
MY_P="squeezecenter-${MAJOR_VER}-${SVN_VER}-noCPAN"
@@ -161,8 +161,8 @@ pkg_postinst() {
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 "or Transporter)."
+ 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
@@ -256,7 +256,7 @@ pkg_config() {
read -p "MySQL root password: " ROOT_PASSWD; echo
stty echo
trap ":" EXIT
- mysql --user=root --password="${ROOT_PASSWD}" </dev/null >/dev/null 2>&1 && DONE=1
+ 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