diff options
-rw-r--r-- | media-sound/slimserver/ChangeLog | 12 | ||||
-rw-r--r-- | media-sound/slimserver/files/slimserver-bootstrap-gentoo.patch | 15 | ||||
-rw-r--r-- | media-sound/slimserver/files/slimserver-mDNSResponderPosix-107.patch | 12 | ||||
-rw-r--r-- | media-sound/slimserver/files/slimserver.conf.d | 4 | ||||
-rw-r--r-- | media-sound/slimserver/files/slimserver.init.d | 43 | ||||
-rw-r--r-- | media-sound/slimserver/metadata.xml | 9 | ||||
-rw-r--r-- | media-sound/slimserver/slimserver-6.5.0.ebuild | 121 |
7 files changed, 216 insertions, 0 deletions
diff --git a/media-sound/slimserver/ChangeLog b/media-sound/slimserver/ChangeLog new file mode 100644 index 000000000000..e6ebafc3c552 --- /dev/null +++ b/media-sound/slimserver/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for media-sound/slimserver +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/slimserver/ChangeLog,v 1.1 2006/11/13 19:41:57 twp Exp $ + +*slimserver-6.5.0 (13 Nov 2006) + + 13 Nov 2006; <twp@gentoo.org> + +files/slimserver-mDNSResponderPosix-107.patch, +files/slimserver.conf.d, + +files/slimserver.init.d, +files/slimserver-bootstrap-gentoo.patch, + +metadata.xml, +slimserver-6.5.0.ebuild: + Initial commit. Bug # 73832. + diff --git a/media-sound/slimserver/files/slimserver-bootstrap-gentoo.patch b/media-sound/slimserver/files/slimserver-bootstrap-gentoo.patch new file mode 100644 index 000000000000..a0c78525bca9 --- /dev/null +++ b/media-sound/slimserver/files/slimserver-bootstrap-gentoo.patch @@ -0,0 +1,15 @@ +--- SlimServer_v6.5.0/Slim/bootstrap.pm 2006-09-19 10:09:13.000000000 +0200 ++++ SlimServer/Slim/bootstrap.pm 2006-11-13 20:38:53.000000000 +0100 +@@ -171,7 +171,11 @@ + + print "The following modules failed to load: $failed\n\n"; + +- print "To download and compile them, please run: $libPath/Bin/build-perl-modules.pl $failed\n\n"; ++ my @gentoo_required_really_failed = map { s/::/-/g; "dev-perl/$_" } @required_really_failed; ++ my $gentoo_failed = join(' ', @gentoo_required_really_failed); ++ $gentoo_failed =~ s/dev-perl\/XML-Parser-Expat/dev-perl\/XML-Parser/; ++ $gentoo_failed =~ s/dev-perl\/Time-HiRes/perl-core\/Time-HiRes/; ++ print "To download and compile them, please run: emerge $gentoo_failed\n\n"; + print "Exiting..\n"; + + exit; diff --git a/media-sound/slimserver/files/slimserver-mDNSResponderPosix-107.patch b/media-sound/slimserver/files/slimserver-mDNSResponderPosix-107.patch new file mode 100644 index 000000000000..1b7d7f250188 --- /dev/null +++ b/media-sound/slimserver/files/slimserver-mDNSResponderPosix-107.patch @@ -0,0 +1,12 @@ +diff -Naur SlimServer_v6.5.0/Slim/Networking/mDNS.pm SlimServer/Slim/Networking/mDNS.pm +--- SlimServer_v6.5.0/Slim/Networking/mDNS.pm 2006-08-27 02:48:43.000000000 +0200 ++++ SlimServer/Slim/Networking/mDNS.pm 2006-10-11 22:26:48.000000000 +0200 +@@ -113,7 +113,7 @@ + return; + } + +- my $command = sprintf("%s -d -f %s -P %s", $mDNSBin, $confFile, $pidFile); ++ my $command = sprintf("%s -b -f %s -P %s", $mDNSBin, $confFile, $pidFile); + + $::d_mdns && msg("mDNS: About to run: $command\n"); + diff --git a/media-sound/slimserver/files/slimserver.conf.d b/media-sound/slimserver/files/slimserver.conf.d new file mode 100644 index 000000000000..770cf1e7166f --- /dev/null +++ b/media-sound/slimserver/files/slimserver.conf.d @@ -0,0 +1,4 @@ +SLIMSERVER_AUDIODIR="" +SLIMSERVER_PLAYLISTDIR="" +SLIMSERVER_PREFSFILE="/etc/slimserver.prefs" +SLIMSERVER_OPTS="" diff --git a/media-sound/slimserver/files/slimserver.init.d b/media-sound/slimserver/files/slimserver.init.d new file mode 100644 index 000000000000..0b6c474cab7c --- /dev/null +++ b/media-sound/slimserver/files/slimserver.init.d @@ -0,0 +1,43 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/slimserver/files/slimserver.init.d,v 1.1 2006/11/13 19:41:57 twp Exp $ + +SLIMSERVER_PIDFILE="/var/run/slimserver/slimserver.pid" + +depend() { + #need mysql + need net +} + +start() { + local myopts="" + [[ -n "${SLIMSERVER_AUDIODIR}" ]] \ + && myopts="${myopts} --audiodir ${SLIMSERVER_AUDIODIR}" + [[ -n "${SLIMSERVER_PLAYLISTDIR}" ]] \ + && myopts="${myopts} --playlistdir ${SLIMSERVER_PLAYLISTDIR}" + ebegin "Starting slimserver" + start-stop-daemon --start \ + --env HOME=/opt/slimserver \ + --exec /opt/slimserver/slimserver.pl \ + --pidfile ${SLIMSERVER_PIDFILE} \ + -- \ + --cachedir /var/cache/slimserver \ + --daemon \ + --group slimserver \ + --logfile /var/log/slimserver \ + --pidfile ${SLIMSERVER_PIDFILE} \ + --prefsfile "${SLIMSERVER_PREFSFILE:-/etc/slimserver.pref}" \ + --user slimserver \ + --quiet \ + ${myopts} ${SLIMSERVER_OPTS} + eend $? +} + +stop() { + ebegin "Stopping slimserver" + start-stop-daemon --stop \ + --quiet \ + --pidfile ${SLIMSERVER_PIDFILE} + eend $? +} diff --git a/media-sound/slimserver/metadata.xml b/media-sound/slimserver/metadata.xml new file mode 100644 index 000000000000..d9bb4626fb2b --- /dev/null +++ b/media-sound/slimserver/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>twp@gentoo.org</email> + <name>Tom Payne</name> +</maintainer> +</pkgmetadata> diff --git a/media-sound/slimserver/slimserver-6.5.0.ebuild b/media-sound/slimserver/slimserver-6.5.0.ebuild new file mode 100644 index 000000000000..44d7ac72693d --- /dev/null +++ b/media-sound/slimserver/slimserver-6.5.0.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/slimserver/slimserver-6.5.0.ebuild,v 1.1 2006/11/13 19:41:57 twp Exp $ + +inherit eutils + +MY_P=SlimServer_v${PV} +DESCRIPTION="Slim Devices' SlimServer" +HOMEPAGE="http://www.slimdevices.com/slimserver/" +SRC_URI="http://www.slimdevices.com/downloads/${MY_P}/${MY_P}.no-cpan-arch.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="aac alac encode ffmpeg flac musepack ogg shorten" +DEPEND="sys-apps/findutils" +RDEPEND=" + >=dev-lang/perl-5.8.3 + >=dev-db/mysql-5.0.22 + >=dev-perl/Compress-Zlib-1.41 + >=dev-perl/DBD-mysql-3.0002 + >=dev-perl/DBI-1.50 + >=dev-perl/Digest-SHA1-2.11 + dev-perl/GD + >=dev-perl/HTML-Parser-3.48 + >=dev-perl/Template-Toolkit-2.14 + >=dev-perl/XML-Parser-2.34 + >=dev-perl/YAML-Syck-0.64 + >=net-misc/mDNSResponder-107 + >=virtual/perl-Time-HiRes-1.86 + aac? ( media-libs/faad2 ) + alac? ( media-sound/alac_decoder ) + encode? ( media-sound/lame ) + ffmpeg? ( media-video/ffmpeg ) + flac? ( media-libs/flac ) + musepack? ( media-sound/musepack-tools ) + ogg? ( media-sound/sox ) + shorten? ( media-sound/shorten ) + " +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + 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 + enewgroup slimserver || die + enewuser slimserver -1 -1 /opt/slimserver slimserver || die +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/slimserver-bootstrap-gentoo.patch || die + epatch ${FILESDIR}/slimserver-mDNSResponderPosix-107.patch || die + rm Bin/build-perl-modules.pl + rm CPAN/YAML/Syck.pm + rm MySQL/errmsg.{sys,txt} + #rm -rf MySQL +} + +src_install() { + # copy all files + dodir /opt/slimserver + cp -r * ${D}/opt/slimserver + # initialize preferences file + dodir /etc + touch ${D}/etc/slimserver.prefs + #password=$(gawk '$1 == "dbpassword:" { print $2 }' ${R}/etc/slimserver.prefs) + #[[ -z "${password}" || "${password}" == "''" ]] \ + # && password="${RANDOM}.${RANDOM}.${RANDOM}.${RANDOM}" + #cat <<EOF > ${D}/etc/slimserver.prefs + #--- + #dbsource: dbi:mysql:database=slimserver + #dbusername: slimserver + #dbpassword: ${password} + #EOF + fowners slimserver:slimserver /etc/slimserver.prefs + # create symbolic links to local mysql files + dosym ../../../usr/sbin/mysqld /opt/slimserver/Bin/mysqld + dosym ../../../usr/share/mysql/english/errmsg.sys \ + /opt/slimserver/MySQL/errmsg.sys + dosym ../../../usr/share/mysql/errmsg.txt \ + /opt/slimserver/MySQL/errmsg.txt + # create symbolic link to local mDNSResponderPosix + dosym ../../../usr/sbin/mDNSResponderPosix \ + /opt/slimserver/Bin/mDNSResponderPosix + # install init scripts + newconfd ${FILESDIR}/slimserver.conf.d slimserver + newinitd ${FILESDIR}/slimserver.init.d slimserver + # initialize /var/{cache,run} + keepdir /var/{cache,run}/slimserver + fowners slimserver:slimserver /var/{cache,run}/slimserver + # initialize /var/log + dodir /var/log + touch ${D}/var/log/slimserver + fowners slimserver:slimserver /var/log/slimserver +} + +pkg_postinst() { + #einfo "To create the SlimServer database, run" + #einfo "\temerge --config =${CATEGORY}/${PF}" + einfo "To start SlimServer, run" + einfo "\t/etc/init.d/slimserver start" + einfo "To start SlimServer automatically on boot, run:" + einfo "\trc-update add slimserver default" + httpport=$(gawk '$1 == "httpport:" { print $2 }' ${R}/etc/slimserver.prefs) + einfo "To configure SlimServer, browse to:" + einfo "\thttp://localhost:${httpport:-9000}/" +} + +#pkg_config() { +# einfo "Enter your mysql root password:" +# dbpassword=$(gawk '$1 == "dbpassword:" { print $2 }' ${R}/etc/slimserver.prefs) +# [[ "$password" == "''" ]] && dbpassword= +# mysql -u root -p <<EOF +#create database slimserver; +#grant all on slimserver.* to slimserver identified by '${dbpassword}'; +#EOF +#} |