commit:     c2b5ff207b1160749bc7287f8372dcfe783d8079
Author:     Johannes Willem Fernhout <hfern <AT> fernhout <DOT> info>
AuthorDate: Tue Dec  8 18:23:18 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 07:18:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2b5ff20

media-video/motion: version bump to 4.3.2

Changes are:
- version 4.3.2 has some bug fixes
- init file updated with need localmount and after bootmisc
- simplification of ebuild
- supervise-deamon USE flag no longer used

Closes: https://bugs.gentoo.org/752135
Closes: https://bugs.gentoo.org/739872
Signed-off-by: Johannes Willem Fernhout <hfern <AT> fernhout.info>
Closes: https://github.com/gentoo/gentoo/pull/18569
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-video/motion/Manifest              |  1 +
 media-video/motion/files/motion.confd-r5 | 31 +++++++++++
 media-video/motion/files/motion.initd-r5 | 37 +++++++++++++
 media-video/motion/motion-4.3.2.ebuild   | 89 ++++++++++++++++++++++++++++++++
 4 files changed, 158 insertions(+)

diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
index a8f8e25f509..9f0cd88446b 100644
--- a/media-video/motion/Manifest
+++ b/media-video/motion/Manifest
@@ -1 +1,2 @@
 DIST motion-release-4.3.1.tar.gz 849633 BLAKE2B 
33039d9b8b6db0698767892997be958d84a881cc56e8cdc31d8c27242c972e629d328197c92f91c1b71a957d85807877dc602f474d430384b1e27c9213ddc697
 SHA512 
17033dab055c4f1d9e2912a27d0a5b419d325b0781def98428a6117e38c62201b87199210071ba93d6c4dae514733b749e39cbc1befe6242f157d4583e07dcc6
+DIST motion-release-4.3.2.tar.gz 849378 BLAKE2B 
2ff49f44bb1d57123760860ae17cc241ecabf3d045ac0c45e1ca08ce3ac8be2fec308492472c37c0d869bc21a7c04658c923c763f9b8f6b547403fc094b03196
 SHA512 
df54297eebc44b3bc50fd40890c69a9cbbfc5936224bf7027065364e794d7201ceadd99ac99bf43113ec3368f2b5ca435d2956258b9c774e03a6750b41346a7c

diff --git a/media-video/motion/files/motion.confd-r5 
b/media-video/motion/files/motion.confd-r5
new file mode 100644
index 00000000000..6ea8774cc4f
--- /dev/null
+++ b/media-video/motion/files/motion.confd-r5
@@ -0,0 +1,31 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Motion OpenRC conf.d file
+# All settings are optional
+
+# Set the user and group under which motion will be run
+#MOTION_USER="motion"
+#MOTION_GROUP="motion"
+
+#Set motion's config file:
+#MOTION_CONFIGFILE="/etc/motion/motion.conf"
+
+#Set motion's log file. Leave unset for syslog:
+#MOTION_LOGFILE="/var/log/motion/motion.log"
+
+#Set log type:  1-9 for COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL
+#MOTION_LOGTYPE="9"
+
+#Set log level: 1-9 for EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL
+#MOTION_LOGLEVEL="6"
+
+#Set a default dir where motion places its output
+#MOTION_DIR="/var/lib/motion"
+
+#Set the umask for the output files, for additonal security
+#MOTION_UMASK="007"
+
+#Uncomment to under under start-stop-daemon instead of supervise_daemon
+#MOTION_PIDFILE="/var/run/motion.pid"
+

diff --git a/media-video/motion/files/motion.initd-r5 
b/media-video/motion/files/motion.initd-r5
new file mode 100644
index 00000000000..b13ac5d0b5b
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r5
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${MOTION_USER:="motion"}
+: ${MOTION_GROUP:="motion"}
+
+[ "${MOTION_UMASK}" ] && umask="${MOTION_UMASK}"
+[ "${MOTION_CONFIGFILE}" ] && command_args="-c ${MOTION_CONFIGFILE}"
+[ "${MOTION_LOGFILE}" ] && command_args="${command_args} -l ${MOTION_LOGFILE}"
+[ "${MOTION_LOGTYPE}" ] && command_args="${command_args} -k ${MOTION_LOGTYPE}"
+[ "${MOTION_LOGLEVEL}" ] && command_args="${command_args} -d 
${MOTION_LOGLEVEL}"
+
+command=/usr/bin/motion
+command_user="${MOTION_USER}:${MOTION_GROUP}"
+
+start_pre() {
+  if [ "${MOTION_DIR}" ] ; then
+    checkpath -d -o "${MOTION_USER}":"${MOTION_GROUP}" "${MOTION_DIR}"
+    directory="${MOTION_DIR}"
+  fi
+  if [ "${MOTION_LOGFILE}" ] ; then
+    checkpath -f -o "${MOTION_USER}":"${MOTION_GROUP}" "${LOGFILE}"
+  fi
+  if [ "${MOTION_PIDFILE}" ] ; then
+    pidfile="${MOTION_PIDFILE}"
+    command_background=true
+  else
+    supervisor=supervise-daemon
+  fi
+}
+
+depend() {
+  need localmount
+  after bootmisc
+  use mysql postgresq
+}

diff --git a/media-video/motion/motion-4.3.2.ebuild 
b/media-video/motion/motion-4.3.2.ebuild
new file mode 100644
index 00000000000..19e930a8ae0
--- /dev/null
+++ b/media-video/motion/motion-4.3.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools readme.gentoo-r1 systemd
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="https://motion-project.github.io";
+SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz 
-> ${PN}-release-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ffmpeg mariadb mmal mysql postgres sqlite v4l webp"
+
+RDEPEND="
+       acct-group/motion
+       acct-user/motion
+       virtual/jpeg:=
+       ffmpeg? ( media-video/ffmpeg:0= )
+       mariadb? ( dev-db/mariadb-connector-c )
+       mmal? ( media-libs/raspberrypi-userland )
+       mysql? ( dev-db/mysql-connector-c )
+       postgres? ( dev-db/postgresql:= )
+       sqlite? ( dev-db/sqlite:3 )
+       webp? ( media-libs/libwebp:= )
+"
+DEPEND="${RDEPEND}
+       net-libs/libmicrohttpd
+       v4l? (
+               media-libs/libv4l
+               virtual/os-headers
+       )
+"
+
+# Breaks src_install(), #727056
+RESTRICT="test"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+You need to setup a configuraton file (/etc/motion/motion.conf) before
+running motion for the first time.
+
+If motion is built with the mysql or mariadb use flags then please make
+sure to configure a matching database_type in the config file.
+
+Motion runs by default under user motion and group motion:
+- change this if needed in /etc/conf.d/motion
+- or add users who need access to the output files to the motion group
+
+To install motion as a service, use:
+- rc-update add motion default # with OpenRC
+- systemctl enable motion.service # with systemd
+"
+
+S="${WORKDIR}"/${PN}-release-${PV}
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               $(use_with ffmpeg) \
+               $(use_with mariadb) \
+               $(use_with mmal) \
+               $(use_with mysql) \
+               $(use_with postgres pgsql) \
+               $(use_with sqlite sqlite3) \
+               $(use_with v4l v4l2) \
+               $(use_with webp) \
+               --without-optimizecpu
+}
+
+src_install() {
+       emake \
+               DESTDIR="${D}" \
+               docdir=/usr/share/doc/${PF} \
+               examplesdir=/usr/share/doc/${PF}/examples \
+               install
+
+       newinitd "${FILESDIR}/motion.initd-r5" ${PN}
+       newconfd "${FILESDIR}/motion.confd-r5" ${PN}
+       systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+       readme.gentoo_create_doc
+       readme.gentoo_print_elog
+}

Reply via email to