Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 2014 16:02:42 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r342179 - in branches/2014Q1/multimedia/motion: . files
Message-ID:  <201402011602.s11G2g2H044485@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sat Feb  1 16:02:42 2014
New Revision: 342179
URL: http://svnweb.freebsd.org/changeset/ports/342179
QAT: https://qat.redports.org/buildarchive/r342179/

Log:
  MFH: r342125
  
  - 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:	portmgr (miwi), thierry (mentor)

Added:
  branches/2014Q1/multimedia/motion/files/motion.in
     - copied unchanged from r342125, head/multimedia/motion/files/motion.in
  branches/2014Q1/multimedia/motion/files/pkg-message.in
     - copied unchanged from r342125, head/multimedia/motion/files/pkg-message.in
Modified:
  branches/2014Q1/multimedia/motion/Makefile
  branches/2014Q1/multimedia/motion/pkg-plist
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/multimedia/motion/Makefile
==============================================================================
--- branches/2014Q1/multimedia/motion/Makefile	Sat Feb  1 16:01:14 2014	(r342178)
+++ branches/2014Q1/multimedia/motion/Makefile	Sat Feb  1 16:02:42 2014	(r342179)
@@ -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)

Copied: branches/2014Q1/multimedia/motion/files/motion.in (from r342125, head/multimedia/motion/files/motion.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/multimedia/motion/files/motion.in	Sat Feb  1 16:02:42 2014	(r342179, copy of r342125, head/multimedia/motion/files/motion.in)
@@ -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"

Copied: branches/2014Q1/multimedia/motion/files/pkg-message.in (from r342125, head/multimedia/motion/files/pkg-message.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/multimedia/motion/files/pkg-message.in	Sat Feb  1 16:02:42 2014	(r342179, copy of r342125, head/multimedia/motion/files/pkg-message.in)
@@ -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: branches/2014Q1/multimedia/motion/pkg-plist
==============================================================================
--- branches/2014Q1/multimedia/motion/pkg-plist	Sat Feb  1 16:01:14 2014	(r342178)
+++ branches/2014Q1/multimedia/motion/pkg-plist	Sat Feb  1 16:02:42 2014	(r342179)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402011602.s11G2g2H044485>