From owner-svn-ports-head@FreeBSD.ORG Sat Feb 1 12:04:35 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAFBC89A; Sat, 1 Feb 2014 12:04:34 +0000 (UTC) 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 D700E1844; Sat, 1 Feb 2014 12:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s11C4Ymd048452; Sat, 1 Feb 2014 12:04:34 GMT (envelope-from riggs@svn.freebsd.org) Received: (from riggs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s11C4YH2048447; Sat, 1 Feb 2014 12:04:34 GMT (envelope-from riggs@svn.freebsd.org) Message-Id: <201402011204.s11C4YH2048447@svn.freebsd.org> From: Thomas Zander Date: Sat, 1 Feb 2014 12:04:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r342125 - in head/multimedia/motion: . 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Feb 2014 12:04:35 -0000 Author: riggs Date: Sat Feb 1 12:04:33 2014 New Revision: 342125 URL: http://svnweb.freebsd.org/changeset/ports/342125 QAT: https://qat.redports.org/buildarchive/r342125/ Log: - Bump PORTREVISION - Use startup script via USE_RC_SUBR - Add pkg-message to inform about startup script - Fix a runtime error using wrong pid file in daemonised process Approved by: thierry (mentor) MFH: 2014Q1 Added: head/multimedia/motion/files/motion.in (contents, props changed) head/multimedia/motion/files/pkg-message.in (contents, props changed) Modified: head/multimedia/motion/Makefile head/multimedia/motion/pkg-plist Modified: head/multimedia/motion/Makefile ============================================================================== --- head/multimedia/motion/Makefile Sat Feb 1 11:54:13 2014 (r342124) +++ head/multimedia/motion/Makefile Sat Feb 1 12:04:33 2014 (r342125) @@ -3,7 +3,7 @@ PORTNAME= motion PORTVERSION= 3.2.12 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%20${PORTVERSION:R}/${PORTVERSION} @@ -25,6 +25,9 @@ PWCBSD_DESC= PWCBSD based Webcams USES= gmake USE_AUTOTOOLS= autoconf +USE_RC_SUBR= ${PORTNAME} +SUB_FILES= pkg-message + CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib @@ -89,12 +92,13 @@ post-patch: # Resolve name collision with jpeg-8 @${REINPLACE_CMD} -e \ 's|jpeg_mem_dest|local_jpeg_mem_dest|' ${WRKSRC}/picture.c +# Fix pidfile path + @${REINPLACE_CMD} -e \ + 's|/run/motion|/run|' ${WRKSRC}/motion-dist.conf.in do-install: ${INSTALL_PROGRAM} ${WRKSRC}/motion ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/motion.1 ${STAGEDIR}${MANPREFIX}/man/man1 - ${INSTALL_SCRIPT} ${WRKSRC}/motion.init-FreeBSD.sh \ - ${STAGEDIR}${PREFIX}/etc/rc.d/motion ${INSTALL_DATA} ${WRKSRC}/motion-dist.conf \ ${STAGEDIR}${PREFIX}/etc/motion.conf.sample .if !exists(${STAGEDIR}${PREFIX}/etc/motion.conf) Added: head/multimedia/motion/files/motion.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/motion/files/motion.in Sat Feb 1 12:04:33 2014 (r342125) @@ -0,0 +1,26 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: motion +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line in /etc/rc.conf to enable motion at startup +# +# motion_enable="YES" + +. /etc/rc.subr + +name=motion +rcvar=motion_enable + +load_rc_config $name + +: ${motion_enable:=NO} + +command=%%PREFIX%%/bin/${name} +pidfile="/var/run/${name}.pid" +required_files=%%PREFIX%%/etc/${name}.conf + +run_rc_command "$1" Added: head/multimedia/motion/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/motion/files/pkg-message.in Sat Feb 1 12:04:33 2014 (r342125) @@ -0,0 +1,15 @@ +**************************************************************** +To use the motion service properly, you should edit + + %%PREFIX%%/etc/motion.conf + +according to your needs. +To automatically start the service at boot time, +add the following line to /etc/rc.conf: + + motion_enable="YES" + +Then, to start the service right now without reboot, execute + + service motion start +**************************************************************** Modified: head/multimedia/motion/pkg-plist ============================================================================== --- head/multimedia/motion/pkg-plist Sat Feb 1 11:54:13 2014 (r342124) +++ head/multimedia/motion/pkg-plist Sat Feb 1 12:04:33 2014 (r342125) @@ -3,4 +3,3 @@ man/man1/motion.1.gz @unexec if cmp -s %D/etc/motion.conf %D/etc/motion.conf.sample; then rm -f %D/etc/motion.conf; fi etc/motion.conf.sample @exec [ -f %B/motion.conf ] || cp %B/%f %B/motion.conf -etc/rc.d/motion