From owner-svn-ports-all@FreeBSD.ORG Sun Jul 28 06:52:20 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E7B7F6C4; Sun, 28 Jul 2013 06:52:19 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C63E122FB; Sun, 28 Jul 2013 06:52:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S6qJd3040904; Sun, 28 Jul 2013 06:52:19 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S6qJLC040901; Sun, 28 Jul 2013 06:52:19 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201307280652.r6S6qJLC040901@svn.freebsd.org> From: Bernhard Froehlich Date: Sun, 28 Jul 2013 06:52:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323811 - in head/multimedia/tvheadend: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 06:52:20 -0000 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!