summaryrefslogtreecommitdiff
path: root/media-video/motion
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/motion')
-rw-r--r--media-video/motion/Manifest9
-rw-r--r--media-video/motion/files/motion.confd-r428
-rw-r--r--media-video/motion/files/motion.initd-r430
-rw-r--r--media-video/motion/files/motion.service4
-rw-r--r--media-video/motion/files/motion.service-r426
-rw-r--r--media-video/motion/metadata.xml10
-rw-r--r--media-video/motion/motion-4.3.1.ebuild107
7 files changed, 210 insertions, 4 deletions
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
index 6a9b53dcfc70..ea41b1a5cbfe 100644
--- a/media-video/motion/Manifest
+++ b/media-video/motion/Manifest
@@ -1,8 +1,13 @@
AUX 4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch 1768 BLAKE2B d2ec71166a4c3779007aabd975e3bd003b17713ff1bcd3c94e57183936c5f6fc24abd6ed5231dca94d1d37f66db7a13358c5dc52795200d190d848f0360ec1e6 SHA512 bee1af2f32215b2abc006b9f12c77e138dbe9bb2de41ae9f1022b6c10340cb8e2eb2831459b241c44e3a0789a9df81b7227dfc07beb3e7e3af6f718fb4a4c56d
AUX motion.conf 37 BLAKE2B 0a30bc830b519022f8c3bfdedb274329ecb506f3b3e42fb3de1f61513b9ef86c7884a9298c17b19b4afbb83b33ceb4f35f85fd377775e2485bbbfa2feb76833e SHA512 06e2dd29b946f35c78e7cf0ddeca727ca7f3f84e57e38b6688b2a493d487061ea6c959c5b365305a7813e0d3315f719003c681c26265566f46faa6ff88606853
AUX motion.confd-r1 272 BLAKE2B bb395beafecf0498158ff0358b489ab251d79e005148715ef89ea882dec945f82faec60c2650e703d4db82e0bef3ccc8abd9768adf23dc8df5161f7fd8f24714 SHA512 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363
+AUX motion.confd-r4 773 BLAKE2B 1a7f0128ec385751d75152c4a36cc2afe57a36b55cd5efe5035af3e78df775edf11568f8bae3acbf7c986b967087cb8b633724bb08bbbf24a0102a082dc5a55f SHA512 4aff16be6fd77909751b034ada9611522acb3c8de0fd160fe67c415eb54cb63a8adad055972ffc3ea7428588a6f5673bb9b311be4660c180796d6067eb3c45e5
AUX motion.initd-r3 1163 BLAKE2B 1926b3468c1b49651377c2704fe8f5cb65c9eed5a4bd11efe365aa01b9acd5300d7dae2f22c93748c2e1c1c49be9d707ad7d1c14d49dc092f18e6ddfe0e06ac5 SHA512 7c7201768fd868f851bb35b8df5e22d43688f1729178fd94d10f21436db6d5c178811bcef8b51c5b79b426bb92d542892edd65ee0414acaa799639a3a226934e
-AUX motion.service 356 BLAKE2B 089fa555b8de569824ff7c063961d13db811cb44cdf7dacee9638a72b95c5db047f93f1387b0067ee7e61816e9af29aec8215bc76e6838a2e12b404299817175 SHA512 03f875b1e0c7051496eaa28a0af50164b20c6f7646d40ec09e1a360e81747135299fe092c91e57a28464bac826a0ace54267ceecd9abf41e63fe505d58ecf7ed
+AUX motion.initd-r4 975 BLAKE2B a9f001318783f793474ef295d5724ff207d646051783d9927b2949c5c3adf65fef11ca63071f1401cab017ba1cf676f39bb2298b848e9f57185a1875c7e4c316 SHA512 ee0b471da01f7a7bb6a19fb974ec775e5d830b4970b5a690b2ba8043bddfe79245c72546d4a41b5d3bb50adbe03b79373ecc643161b50bd88386e66ee318b9ef
+AUX motion.service 358 BLAKE2B 8f118322ec347472d1aec2d89e37335ecce594b1c0f194b3adfad3ce3d68cb5d6f4db6f2f932769e4adbc3b3c2094e1426f1d7c64d3985267a4558f549d6f4ed SHA512 b87bb9edd8d3b53e14eb0292358d05ea6c81f25c9d2b5b2208b5208ba57054dec64e1057f3bfbf5b2b490f643bd2ee497da038aad56e1274b9bf513f1366c8ca
+AUX motion.service-r4 462 BLAKE2B 3aeac7440cb545bbf7c41a59eb81260202e7783f701ed20ad33e8f69356bcc78ff7a23b3f518df7dc0ab0eb664d05b75e449afa7abbf1f993ad3c77b0eb83fb7 SHA512 2fbcdb381888d63d0becfc04473f915d75f97e267e4fb2bcf2554e53cbc302fd45b544b7c267a99a05540fb79ce4fcf3e3bc7e973fe08d0db5481e7728c02a1f
DIST motion-release-4.1.1.tar.gz 447795 BLAKE2B 8c7dfdad89f49ba8ec39689d268b4bc95c6a8bd85d4bd333f66638b2e815b3c59b2e42dd93811601b2ee7870100a0a21eaa789633056f74a5cc9f39f4f92229f SHA512 3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143
+DIST motion-release-4.3.1.tar.gz 849633 BLAKE2B 33039d9b8b6db0698767892997be958d84a881cc56e8cdc31d8c27242c972e629d328197c92f91c1b71a957d85807877dc602f474d430384b1e27c9213ddc697 SHA512 17033dab055c4f1d9e2912a27d0a5b419d325b0781def98428a6117e38c62201b87199210071ba93d6c4dae514733b749e39cbc1befe6242f157d4583e07dcc6
EBUILD motion-4.1.1-r1.ebuild 2147 BLAKE2B e777945ae02d5ce78163e263a57285b285a0f6f0b16ead212b35282ff9f363f44ca8ed97dcdbcfac39eb83d4ce29cae69b8dd7ac452afdb391f03583343e2367 SHA512 c2a33ccbc3c7e234084a6c1485357bd389e44f0312fbfaad91dee899248da85328a7df513bfc53aa3d6ccbfa3ba635731452984d718dfe665998416b7c9f3238
-MISC metadata.xml 450 BLAKE2B 39d7909c8d8dc5c691540bdbc0e1971e9e04131208ec74a9750dcf09e607a160d6b7beceaab9325c58ecf4c6e92da3ab3dc0ffb059d9b917bb4ccc87582a3ff7 SHA512 75ad87d6a0a305f87ac034413698fc33c3d564e580a76626d9a9867a5bc691180838e96d7198c330b75b209a014be8f836170a7cce668ab590b8ee3ceaff44e8
+EBUILD motion-4.3.1.ebuild 2857 BLAKE2B 2f96411a45c56934371879ffc3e93f719c7502d831c06e949e15d42a732476444ae2a2bcee87efb4b7177a1a8b7909ab908cf1d4aeb3cd996f1cc3dcfebd1416 SHA512 10df83a2b553e3f35e7b1f7a61827550fd2b4baa258d55b1eb72f0df518f833114e61690498dbd67c74a9a36bde66bc702b72585533138323abc865d74384f4f
+MISC metadata.xml 850 BLAKE2B b9ead6c9f74bb359c2bb282c0f6f8c33707fbd42aa458314c93bc754e2f707dc51fcfe5e0e0e2216af8435c2aa10d9e1c5885a838236b1ea274453c84f95f303 SHA512 419521643cbaefd58973bc764594ec44fdc927890c837eda0733af575073a8655e58da76f4a22467ae1d014898d828b84e9de85bb442cd9505911af1a04395b1
diff --git a/media-video/motion/files/motion.confd-r4 b/media-video/motion/files/motion.confd-r4
new file mode 100644
index 000000000000..8a200d14928c
--- /dev/null
+++ b/media-video/motion/files/motion.confd-r4
@@ -0,0 +1,28 @@
+# 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"
+
diff --git a/media-video/motion/files/motion.initd-r4 b/media-video/motion/files/motion.initd-r4
new file mode 100644
index 000000000000..30d5e25cb08e
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r4
@@ -0,0 +1,30 @@
+#!/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
+ mkdir -p "${MOTION_DIR}"
+ checkpath -d -o "${MOTION_USER}" "${MOTION_DIR}"
+ directory="${MOTION_DIR}"
+ fi
+ if [ "${MOTION_LOGFILE}" ] ; then
+ local LOGFILE=${MOTION_LOGFILE##*/}
+ local LOGDIR=${MOTION_LOGFILE%$LOGFILE}
+ mkdir -p "${LOGDIR}"
+ checkpath -d -o "${MOTION_USER}" "${LOGDIR}"
+ fi
+}
+
diff --git a/media-video/motion/files/motion.service b/media-video/motion/files/motion.service
index 559b94b6b29a..d4755bdb48ea 100644
--- a/media-video/motion/files/motion.service
+++ b/media-video/motion/files/motion.service
@@ -8,13 +8,13 @@ Type=simple
ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf
StandardError=null
-User=motion
+#User=motion
Group=video
#RuntimeDirectory=motion
#RuntimeDirectoryMode=0750
-WorkingDirectory=/var/lib/motion
+#WorkingDirectory=/var/lib/motion
[Install]
WantedBy=multi-user.target
diff --git a/media-video/motion/files/motion.service-r4 b/media-video/motion/files/motion.service-r4
new file mode 100644
index 000000000000..1564fb2699c4
--- /dev/null
+++ b/media-video/motion/files/motion.service-r4
@@ -0,0 +1,26 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Motion OpenRC systemd service file
+
+
+[Unit]
+Description=Motion detection daemon
+After=local-fs.target network.target
+Documentation=man:motion(1)
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf
+StandardError=null
+
+User=motion
+Group=motion
+
+UMask=007
+WorkingDirectory=-/var/lib/motion
+
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/media-video/motion/metadata.xml b/media-video/motion/metadata.xml
index b1389a2954b4..301a7616abbe 100644
--- a/media-video/motion/metadata.xml
+++ b/media-video/motion/metadata.xml
@@ -1,11 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="person">
+ <email>hfern@fernhout.info</email>
+ <name>Hans Fernhout</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<maintainer type="project">
<email>media-video@gentoo.org</email>
</maintainer>
<use>
+ <flag name="mariadb">Add mariadb database support</flag>
<flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag>
+ <flag name="supervise-daemon">Add experimental suppport for OpenRC's supervise-daemon process supervision</flag>
</use>
<upstream>
<remote-id type="github">Motion-Project/motion</remote-id>
diff --git a/media-video/motion/motion-4.3.1.ebuild b/media-video/motion/motion-4.3.1.ebuild
new file mode 100644
index 000000000000..efd01fca9653
--- /dev/null
+++ b/media-video/motion/motion-4.3.1.ebuild
@@ -0,0 +1,107 @@
+# 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 supervise-daemon 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
+
+ # build INITDAD string cwto be added to initd based on use flags, eg
+ # "depend() {
+ # use mysql
+ # }
+ #
+ # supervisor=supervise-daemon"
+ local INITDADJ=""
+ ( use mysql || use mariadb ) && INITDADJ=" use mysql\n"
+ use postgres && INITDADJ="${INITDADJ} use postgresql\n"
+ [ "${#INITDADJ}" -gt 0 ] && INITDADJ="depend() {\n${INITDADJ}}\n"
+ if use supervise-daemon ; then
+ INITDADJ="${INITDADJ}\nsupervisor=supervise-daemon\n"
+ else
+ INITDADJ="${INITDADJ}\npidfile=/run/\${RC_SVCNAME}.pid\ncommand_background=true\n"
+ fi
+ cp "${FILESDIR}/${PN}.initd-r4" "${T}/initd" || die
+ echo -e ${INITDADJ} >> "${T}/initd" || die
+
+ newinitd "${T}/initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r4" ${PN}
+ systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+ readme.gentoo_create_doc
+ readme.gentoo_print_elog
+}