svn commit: r323811 - in head/multimedia/tvheadend: . files
Bernhard Froehlich
decke at FreeBSD.org
Sun Jul 28 06:52:20 UTC 2013
Author: decke
Date: Sun Jul 28 06:52:18 2013
New Revision: 323811
URL: http://svnweb.freebsd.org/changeset/ports/323811
Log:
- Add rc.d script
- Bump PORTREVISION
Added:
head/multimedia/tvheadend/files/tvheadend.in (contents, props changed)
Modified:
head/multimedia/tvheadend/Makefile
head/multimedia/tvheadend/pkg-message
Modified: head/multimedia/tvheadend/Makefile
==============================================================================
--- head/multimedia/tvheadend/Makefile Sun Jul 28 04:20:32 2013 (r323810)
+++ head/multimedia/tvheadend/Makefile Sun Jul 28 06:52:18 2013 (r323811)
@@ -3,6 +3,7 @@
PORTNAME= tvheadend
PORTVERSION= 3.4.0.20130726.3
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://people.freebsd.org/~decke/distfiles/
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} dvb-scan-tables-20130714.tar.gz
@@ -28,6 +29,14 @@ USE_PYTHON= yes
GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
MAN1= ${PORTNAME}.1
+USE_RC_SUBR= ${PORTNAME}
+
+TVHUSER?= webcamd
+TVHGROUP?= webcamd
+USERS= ${TVHUSER}
+GROUPS= ${TVHGROUP}
+SUB_LIST+= TVHUSER="${TVHUSER}" \
+ TVHGROUP="${TVHGROUP}"
OPTIONS_DEFINE= AVAHI
Added: head/multimedia/tvheadend/files/tvheadend.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/multimedia/tvheadend/files/tvheadend.in Sun Jul 28 06:52:18 2013 (r323811)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: tvheadend
+# REQUIRE: DAEMON webcamd
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable tvheadend
+#
+# tvheadend_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable tvheadend.
+# tvheadend_user (str): User account to run with.
+# tvheadend_group (str): Group to run with.
+# tvheadend_flags (str): Custom flags for tvheadend.
+
+. /etc/rc.subr
+
+: ${tvheadend_enable="NO"}
+: ${tvheadend_user="%%TVHUSER%%"}
+: ${tvheadend_group="%%TVHGROUP%%"}
+
+name=tvheadend
+rcvar=tvheadend_enable
+pidfile="/var/run/${name}.pid"
+confdir="%%PREFIX%%/etc/tvheadend"
+command="%%PREFIX%%/bin/tvheadend"
+command_args="-f -p ${pidfile} -u ${tvheadend_user} -g ${tvheadend_group} -c ${confdir}"
+start_precmd="${name}_prestart"
+
+tvheadend_prestart()
+{
+ if [ ! -f "${pidfile}" ]; then
+ /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 644 /dev/null ${pidfile}
+ fi
+ if [ ! -d "${confdir}" ]; then
+ /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 755 -d ${confdir}
+ fi
+}
+
+load_rc_config $name
+
+run_rc_command "$1"
Modified: head/multimedia/tvheadend/pkg-message
==============================================================================
--- head/multimedia/tvheadend/pkg-message Sun Jul 28 04:20:32 2013 (r323810)
+++ head/multimedia/tvheadend/pkg-message Sun Jul 28 06:52:18 2013 (r323811)
@@ -7,7 +7,12 @@ kill kenny or spill your beer so don't e
Known issues:
- no libav support
- no libdvbcsa support
-- no rc.d script
+
+For the first start in your /etc/rc.conf:
+ tvheadend_enable="YES"
+ tvheadend_flags="-C"
+
+The second line can be removed after the first start.
Patches, feedback and help are always welcome!
More information about the svn-ports-head
mailing list