summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2009-12-23 22:27:37 +0000
committerJeremy Olexa <darkside@gentoo.org>2009-12-23 22:27:37 +0000
commitd53124774af5ecd8fc59eee111051b690da76c44 (patch)
tree3bc1fbc021388663ae11ab7b7a874ebd6807cf97 /media-video
parentStable for HPPA (bug #296485). (diff)
downloadgentoo-2-d53124774af5ecd8fc59eee111051b690da76c44.tar.gz
gentoo-2-d53124774af5ecd8fc59eee111051b690da76c44.tar.bz2
gentoo-2-d53124774af5ecd8fc59eee111051b690da76c44.zip
Initial import. Many thanks to all the contributors on bug 192561. Moved from sunrise overlay with modifications by myself
(Portage version: 2.1.7.15/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ushare/ChangeLog11
-rw-r--r--media-video/ushare/files/ushare.conf.d38
-rw-r--r--media-video/ushare/files/ushare.init.d79
-rw-r--r--media-video/ushare/metadata.xml11
-rw-r--r--media-video/ushare/ushare-1.1a.ebuild54
5 files changed, 193 insertions, 0 deletions
diff --git a/media-video/ushare/ChangeLog b/media-video/ushare/ChangeLog
new file mode 100644
index 000000000000..2a41762e7ef5
--- /dev/null
+++ b/media-video/ushare/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for media-video/ushare
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ChangeLog,v 1.1 2009/12/23 22:27:33 darkside Exp $
+
+*ushare-1.1a (23 Dec 2009)
+
+ 23 Dec 2009; Jeremy Olexa <darkside@gentoo.org> +ushare-1.1a.ebuild,
+ +files/ushare.conf.d, +files/ushare.init.d, +metadata.xml:
+ Initial import. Many thanks to all the contributors on bug 192561. Moved
+ from sunrise overlay with modifications by myself
+
diff --git a/media-video/ushare/files/ushare.conf.d b/media-video/ushare/files/ushare.conf.d
new file mode 100644
index 000000000000..d225b8f30fd6
--- /dev/null
+++ b/media-video/ushare/files/ushare.conf.d
@@ -0,0 +1,38 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/files/ushare.conf.d,v 1.1 2009/12/23 22:27:37 darkside Exp $
+
+# User to run ushare daemon (if none, root will be used)
+USHARE_USER="ushare"
+
+# UPNP Friendly Name:
+USHARE_NAME="uShare"
+
+# The interface to bind to:
+USHARE_IFACE="eth0"
+
+# Static ushare port:
+USHARE_PORT=""
+
+# Enable/Disable telnet:
+USHARE_TELNET="yes"
+
+# Choose different telnet port:
+USHARE_TELNET_PORT=""
+
+# Enable/Disable web component:
+USHARE_WEB="yes"
+
+# A List of directories to share, each precieded by '-c':
+USHARE_DIRS=""
+
+# Enable/Disable XboX 360 compliant profile:
+USHARE_XBOX="no"
+
+# Enable/Disable DLNA compliant profile (Playstation3 requires this):
+USHARE_DLNA="no"
+
+# Misc. options:
+USHARE_OPTS=""
+
+# Check ushare --help or man ushare for more options.
diff --git a/media-video/ushare/files/ushare.init.d b/media-video/ushare/files/ushare.init.d
new file mode 100644
index 000000000000..fb6be7d94970
--- /dev/null
+++ b/media-video/ushare/files/ushare.init.d
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/files/ushare.init.d,v 1.1 2009/12/23 22:27:37 darkside Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting uShare"
+
+ # Sanity check to avoid ushare failling on booting with no
+ # shared dirs
+ if [[ -z "${USHARE_DIRS}" ]] ; then
+ eerror "Please set shared dirs in /etc/conf.d/ushare"
+ return 1
+ fi
+
+ if [[ -z "${USHARE_PORT}" ]] ; then
+ einfo "${USHARE_NAME} runs on a dynamic port"
+ local ushare_port=
+ else
+ local ushare_port="--port ${USHARE_PORT}"
+ einfo "${USHARE_NAME} using port ${USHARE_PORT}"
+ fi
+
+ if [[ "${USHARE_TELNET}" == "yes" ]] ; then
+ local ushare_telnet=
+ else
+ local ushare_telnet="--no-telnet"
+ fi
+
+ if [[ -z "${ushare_telnet}" ]] ; then
+ if [[ -z "${USHARE_TELNET_PORT}" ]] ; then
+ local ushare_telnet_port=
+ einfo "${USHARE_NAME} runs telnet on the default port"
+ else
+ local ushare_telnet_port="--telnet-port ${USHARE_TELNET_PORT}"
+ einfo "${USHARE_NAME} runs telnet on port ${USHARE_TELNET_PORT}"
+ fi
+ else
+ local ushare_telnet_port=
+ fi
+
+ if [[ "${USHARE_WEB}" == "yes" ]] ; then
+ local ushare_web=
+ else
+ local ushare_web="--no-web"
+ fi
+
+ if [[ "${USHARE_XBOX}" == "yes" ]] ; then
+ local ushare_xbox="--xbox"
+ else
+ local ushare_xbox=
+ fi
+
+ if [[ "${USHARE_DLNA}" == "yes" ]] ; then
+ local ushare_dlna="--dlna"
+ else
+ local ushare_dlna=
+ fi
+
+ start-stop-daemon --start --quiet -c ${USHARE_USER:-root} \
+ --exec /usr/bin/ushare -- -D -i ${USHARE_IFACE} \
+ -n ${USHARE_NAME} ${USHARE_OPTS} ${USHARE_DIRS} \
+ ${ushare_port} \
+ ${ushare_telnet} ${ushare_telnet_port} \
+ ${ushare_web} \
+ ${ushare_xbox} \
+ ${ushare_dlna}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uShare"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ushare
+ eend $?
+}
diff --git a/media-video/ushare/metadata.xml b/media-video/ushare/metadata.xml
new file mode 100644
index 000000000000..36d9b6b30a55
--- /dev/null
+++ b/media-video/ushare/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-video</herd>
+<maintainer>
+ <email>darkside@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name='dlna'>Add DLNA (<pkg>media-libs/libdlna</pkg>) support</flag>
+</use>
+</pkgmetadata>
diff --git a/media-video/ushare/ushare-1.1a.ebuild b/media-video/ushare/ushare-1.1a.ebuild
new file mode 100644
index 000000000000..c25d54ec8c1c
--- /dev/null
+++ b/media-video/ushare/ushare-1.1a.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ushare-1.1a.ebuild,v 1.1 2009/12/23 22:27:33 darkside Exp $
+
+inherit eutils
+
+DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
+HOMEPAGE="http://ushare.geexbox.org/"
+SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dlna nls"
+
+RDEPEND="net-libs/libupnp
+ dlna? ( media-libs/libdlna )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_compile() {
+ local myconf
+ # Configure need some tips
+ myconf="--prefix=/usr \
+ $(use_enable dlna ) \
+ $(use_enable nls ) \
+ --disable-strip"
+
+ # remove original init.d
+ sed -i \
+ -e '/(INSTALL) -d $(sysconfdir)\/init\.d/d' \
+ -e '/$(INSTALL) -m 755 $(INITD_FILE) $(sysconfdir)\/init.d/d' \
+ scripts/Makefile
+
+ # note: homegrown configure
+ ./configure ${myconf} || die "Configure failed"
+
+ emake || die "Make failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ doman src/ushare.1 || die
+ newconfd "${FILESDIR}"/ushare.conf.d ushare || die
+ newinitd "${FILESDIR}"/ushare.init.d ushare || die
+ dodoc NEWS README TODO THANKS AUTHORS || die
+}
+
+pkg_postinst() {
+ enewuser ushare
+ elog "Please edit /etc/conf.d/ushare to set the shared directories"
+ elog "and other important settings. Check system log if ushare is"
+ elog "not booting."
+}