summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/feng-svn')
-rw-r--r--media-video/feng-svn/feng-svn-0.1.ebuild66
-rw-r--r--media-video/feng-svn/files/feng.confd8
-rwxr-xr-xmedia-video/feng-svn/files/feng.rc30
-rw-r--r--media-video/feng-svn/files/svnco.sh3
4 files changed, 107 insertions, 0 deletions
diff --git a/media-video/feng-svn/feng-svn-0.1.ebuild b/media-video/feng-svn/feng-svn-0.1.ebuild
new file mode 100644
index 0000000..f271c19
--- /dev/null
+++ b/media-video/feng-svn/feng-svn-0.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/fenice/fenice-1.9.ebuild,v 1.6 2006/03/07 16:37:59 flameeyes Exp $
+
+inherit subversion eutils
+
+ESVN_REPO_URI="https://streaming.polito.it/svn/fenice/branches/fenice-ng"
+ESVN_BOOTSTRAP="NOCONFIGURE=1 ./autogen.sh"
+ESVN_FETCH_CMD="bash $FILESDIR/svnco.sh"
+
+DESCRIPTION="Experimental rtsp streaming server"
+HOMEPAGE="http://streaming.polito.it/server"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE=""
+
+RDEPEND="media-video/ffmpeg
+ >=dev-libs/glib-2"
+DEPEND="virtual/ghostscript"
+
+pkg_setup() {
+ enewgroup feng
+ enewuser feng next -1 /var/feng feng
+}
+
+pkg_config() {
+ einfo "Installing default avroot to ${ROOT}/var/feng/avroot"
+ mkdir -p "${ROOT}"/var/feng/avroot
+ cp -R "${ROOT}"/usr/share/doc/${PF}/avroot/* "${ROOT}"/var/feng/avroot
+ chown -R feng:0 "${ROOT}"/var/feng/avroot
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}/var/feng/avroot" ]] ; then
+ einfo "The default avroot has not been installed into"
+ einfo "${ROOT}/var/feng/avroot because the directory already exists"
+ einfo "and we do not want to overwrite any files you have put there."
+ einfo
+ einfo "If you would like to install the latest avroot, please run"
+ einfo "emerge --config =${PF}"
+ else
+ einfo "Installing default avroot to ${ROOT}/var/feng/avroot"
+ mkdir -p "${ROOT}"/var/feng/avroot
+ cp -R "${ROOT}"/usr/share/doc/${PF}/avroot/* "${ROOT}"/var/feng/avroot
+ chown -R feng:0 "${ROOT}"/var/feng/avroot
+ fi
+}
+
+src_unpack() {
+ subversion_src_unpack
+ TZ=UTC svn log -v "${ESVN_REPO_URI}" >ChangeLog
+}
+src_compile() {
+ econf --disable-fhs23 || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+ dodoc README
+ mv ${D}/var/feng/avroot ${D}/usr/share/doc/${PF}/
+ dodoc ChangeLog
+ newinitd ${FILESDIR}/feng.rc feng
+ newconfd ${FILESDIR}/feng.confd feng
+}
diff --git a/media-video/feng-svn/files/feng.confd b/media-video/feng-svn/files/feng.confd
new file mode 100644
index 0000000..540d6e0
--- /dev/null
+++ b/media-video/feng-svn/files/feng.confd
@@ -0,0 +1,8 @@
+# /etc/conf.d/metalog
+# $Header: $
+
+# Some useful options:
+# -s Use syslog
+# -c <conf> Use alternate configuration conf
+
+FENG_OPTS="-s"
diff --git a/media-video/feng-svn/files/feng.rc b/media-video/feng-svn/files/feng.rc
new file mode 100755
index 0000000..575f019
--- /dev/null
+++ b/media-video/feng-svn/files/feng.rc
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+FENG="/usr/bin/feng"
+PIDFILE="/var/run/feng.pid"
+
+depend() {
+ use net dns
+}
+
+start() {
+ ebegin "Starting feng"
+ echo start-stop-daemon --start -b -m -p ${PIDFILE} -x ${FENG} -- ${FENG_OPTS}
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile \
+ --pidfile ${PIDFILE} \
+ --exec /usr/bin/feng \
+ --chuid feng:feng \
+ -- ${FENG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping feng"
+ echo start-stop-daemon --stop -p ${PIDFILE}
+ start-stop-daemon --stop -p ${PIDFILE}
+ eend $?
+}
diff --git a/media-video/feng-svn/files/svnco.sh b/media-video/feng-svn/files/svnco.sh
new file mode 100644
index 0000000..2b72d34
--- /dev/null
+++ b/media-video/feng-svn/files/svnco.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo p | svn co $@ &>/dev/null