summaryrefslogtreecommitdiff
path: root/media-video/motion
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/motion
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/motion')
-rw-r--r--media-video/motion/Manifest12
-rw-r--r--media-video/motion/files/motion.conf1
-rw-r--r--media-video/motion/files/motion.confd4
-rw-r--r--media-video/motion/files/motion.confd-r19
-rw-r--r--media-video/motion/files/motion.initd-r342
-rw-r--r--media-video/motion/files/motion.service20
-rw-r--r--media-video/motion/files/motion_at.service20
-rw-r--r--media-video/motion/metadata.xml21
-rw-r--r--media-video/motion/motion-4.0.1-r1.ebuild82
-rw-r--r--media-video/motion/motion-4.0.1-r2.ebuild84
10 files changed, 295 insertions, 0 deletions
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
new file mode 100644
index 000000000000..e836ae6712bb
--- /dev/null
+++ b/media-video/motion/Manifest
@@ -0,0 +1,12 @@
+AUX motion.conf 37 SHA256 9fa49bb51e130b618587c9d002143d42d18a8aa91d92ecb0353d007879e78982 SHA512 06e2dd29b946f35c78e7cf0ddeca727ca7f3f84e57e38b6688b2a493d487061ea6c959c5b365305a7813e0d3315f719003c681c26265566f46faa6ff88606853 WHIRLPOOL a7670aa307d66e97488a31929094fb8bf3cb16da9bd339a01a7ec76a3f597bd3654f9d4876efcef6e9ed13f37cfcfe522d3cb95a264e12950f582b190a7a50e8
+AUX motion.confd 99 SHA256 c43ac28bcf76d96b105a03d0d3685688c5f731894bf68a501706681bba76b060 SHA512 b0135b220ac2f1857012455726fb5c5aaa73a79f864619cb7fbfbb1e8aaf95b0c4dd51bbc30f29714cc29a271f9196f3d92e160fa75a90ccbcf0024640620d5d WHIRLPOOL fc69fca880a1f6b53d216b2ca7ffba73041f696e64a9df6986ec98bc49306d0770d8b7164c17c1961bb5300cc5bb4c7665d0aad5418f2645cf1cb561743774ee
+AUX motion.confd-r1 272 SHA256 4c6eae3fa79e7d4d736a8e4468cbd2e1e683bd3fc8d815c023f5be1a838acbd2 SHA512 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363 WHIRLPOOL cb2fe0ec0409c0c80961373516391c28e29ea111c05f6344323f977c746cd4f23c6e4185ead4b3f8906d848d763e1e813bc646b1e1724716293923de38901005
+AUX motion.initd-r3 1163 SHA256 8d8029a51db4fccac5f8e653b206dbab49c9f77cbf2183e9f3c23ec451d9764c SHA512 7c7201768fd868f851bb35b8df5e22d43688f1729178fd94d10f21436db6d5c178811bcef8b51c5b79b426bb92d542892edd65ee0414acaa799639a3a226934e WHIRLPOOL afd19cb742fbf88c0b76dcb1190771e16e611757cc04c8c68e2ca621cfb0386041bef954954617ef81451a49dc2c6f8c3ae615d14a7a7910ef764403009346ee
+AUX motion.service 356 SHA256 8db64c7eaa9190e8c8dc7403a3051f703067e823b88f05ae484193e659901584 SHA512 03f875b1e0c7051496eaa28a0af50164b20c6f7646d40ec09e1a360e81747135299fe092c91e57a28464bac826a0ace54267ceecd9abf41e63fe505d58ecf7ed WHIRLPOOL ad8f4505b02ce0badb588c057c5e2a5c14118694ce33f62dd6eab033b415b0d9e32932298a362830ef60f43bb1d281aa7953c196c7e6444082f5f90ced1c7398
+AUX motion_at.service 366 SHA256 114a6a7bea8ac5bf94d855def00d3ccc3b9028d43d8c25a49fc36a9292b7eef4 SHA512 589508e6886683300d909bab0a8c625af72e5802e655877039799891efe92534ca1690e4103679592924d0530c0ba2fa107e85eed99537897d3c7071371a5921 WHIRLPOOL 84a9cf175cad5667377443afbe0533c46bd46c58f3e0cb05fa60e9e11bf5555da770c9cc8d1d58ab8eef6d27d712a514f82fc001f6f9dcc0998b963ffc6f6714
+DIST release-4.0.1.tar.gz 444779 SHA256 2f67669a09ce0481ecd987028dae1c5cb135dfdc3c254c06ab7c9ca0c6c183f0 SHA512 6ccde3890e6af56f28208321987dd1b9d62a55bbe7cbc3ab5600263602e6e8f47589392c2f3a3a6cb54f927ee76aea94d0e83f26ce8e4047890c891b6c2f8976 WHIRLPOOL 425587a1ff52edadddbdc7fd65cdb015324b99514128d3810a6d1bb6d2cd2f1c5daea03c1db0c4a89679358793f9201156dd821ce795d704ede12bdb151fafdd
+EBUILD motion-4.0.1-r1.ebuild 1979 SHA256 87e2b3ab5324880e807f106580c188aedf93b6558710e601eb7c9826a8fb1706 SHA512 336da1d0dc347fa610bd810c309dedf82e66137723decba9edaeb44ae68ad0f490483f722fce267f1de8a70406698f6f5701711ec00b11d25cdba1a2a6cb5d95 WHIRLPOOL e5992ed45f7269bcea86b1cf58328e25655ecc6f2fb34154c3de1d2e866b2196e06f30565418e05b2fd1a8ca5d43bd8ca3cc2e14eea40a344deeca06dbcc1bc9
+EBUILD motion-4.0.1-r2.ebuild 2011 SHA256 715ffb7b0df4dcbdceabb562044c69e7518cd918e7721da11e1d8dcffbb6d36a SHA512 6429e44d029443192c347ae8d0f309244cc63cc67ccf46b9f78c678c7621c808d085fca85d0120da71964d323e10d817c835513ef0a1fb5857be4b4aea36a305 WHIRLPOOL 48d2186334e72bd325bad35ed4d57534593e9f5b6abea34912254a36896bdebbf51f20050148891345a692c9e5ec38be335b1edaebada3bfaccbaf484c744acd
+MISC ChangeLog 2871 SHA256 187c96c7ec40c302954a5e50cbb5827061eee92739ff54bdbe3e2c4b537ce576 SHA512 fa80810fd60e9deb6464618e791a7f12aae063e72152985bcca1a615afde3218ee8efdbd846fd08a084f0ad7bd2909c57b2fa395fb0ee4f8d35d51dcf4e76ac4 WHIRLPOOL a924ffff89be05b6d7db98e92a579d536109f85accbcef7e857e29d55d3f786d566e8fa50a1cd07c15c0509ec5c73d51dbff310b541c835afe9037fb4b095569
+MISC ChangeLog-2015 7979 SHA256 a093b773890873949fa46c54993707771f63a6520ce69fc1cfe8da9bba86f84b SHA512 0e844c2d4dec6929faf64b22b799bb341df64722bc761c5dc984ae55851f3b499cf5d8fe12512e6967051681277c3987a73cafb41d8cdeb97bf2052a997a6bb9 WHIRLPOOL 681f21013235f53a853348aec987581dfe45247020dd66695099b12dbd60c86d2763564250e714fbfa9555f2834f32b38765f9dbfdaa121ed20444647e3b7cc8
+MISC metadata.xml 688 SHA256 300730aa77ffd02dd8e26e35f93de47f85708ae6b98944827244bf4485a4321b SHA512 f69d8539a16d80a49c147a60f8e831a245814c4853383f9991f4c2762aa2d1b7f22b8993eb7184a49c6c783b75d23ef91a10b6293563aa7e29f561f40fad56d1 WHIRLPOOL 30c546396ba6baa85b9172737a080dbbcc2a457d8252fb6e0c7daf5123deb755ca258f0cb8b593071ab8bcada4f6ec0e33050700802388124a80f60f2268e6f5
diff --git a/media-video/motion/files/motion.conf b/media-video/motion/files/motion.conf
new file mode 100644
index 000000000000..f032d874f0ca
--- /dev/null
+++ b/media-video/motion/files/motion.conf
@@ -0,0 +1 @@
+d /var/lib/motion/ 0750 motion video
diff --git a/media-video/motion/files/motion.confd b/media-video/motion/files/motion.confd
new file mode 100644
index 000000000000..f79c97aee968
--- /dev/null
+++ b/media-video/motion/files/motion.confd
@@ -0,0 +1,4 @@
+# Set the user and group under which motion will be ran
+
+MOTION_USER="motion"
+MOTION_GROUP="video"
diff --git a/media-video/motion/files/motion.confd-r1 b/media-video/motion/files/motion.confd-r1
new file mode 100644
index 000000000000..dfff31beb45d
--- /dev/null
+++ b/media-video/motion/files/motion.confd-r1
@@ -0,0 +1,9 @@
+# Set the user and group under which motion will be run
+MOTION_USER="motion"
+MOTION_GROUP="video"
+
+# Set the the directory for storing the pidfile
+MOTION_RUN_DIR="/var/run/motion"
+
+# Set the the working directory for storing images/videos
+MOTION_LIB_DIR="/var/lib/motion"
diff --git a/media-video/motion/files/motion.initd-r3 b/media-video/motion/files/motion.initd-r3
new file mode 100644
index 000000000000..2b474fc56f9a
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r3
@@ -0,0 +1,42 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+depend() {
+ need modules
+ after mysql
+}
+
+checkconfig() {
+ export MOTION_RUN_DIR="${MOTION_RUN_DIR:-/var/run/motion}"
+ checkpath -d -m 750 -o "${MOTION_USER:-motion}:${MOTION_GROUP:-video}" "${MOTION_RUN_DIR}"
+ export MOTION_LIB_DIR="${MOTION_LIB_DIR:-/var/lib/motion}"
+ checkpath -d -m 750 -o "${MOTION_USER:-motion}:${MOTION_GROUP:-video}" "${MOTION_LIB_DIR}"
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting motion detection"
+ start-stop-daemon --start -u "${MOTION_USER}" -g "${MOTION_GROUP}" -d "${MOTION_LIB_DIR}" --quiet --exec /usr/bin/motion -- -b -p "${MOTION_RUN_DIR}/motion.pid"
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping motion detection"
+ start-stop-daemon --stop --quiet --exec /usr/bin/motion --pidfile "${MOTION_RUN_DIR}/motion.pid"
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading motion detection configuration"
+ start-stop-daemon --stop --signal HUP --exec /usr/bin/motion --pidfile "${MOTION_RUN_DIR}/motion.pid"
+ eend $?
+}
diff --git a/media-video/motion/files/motion.service b/media-video/motion/files/motion.service
new file mode 100644
index 000000000000..559b94b6b29a
--- /dev/null
+++ b/media-video/motion/files/motion.service
@@ -0,0 +1,20 @@
+[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=video
+
+#RuntimeDirectory=motion
+#RuntimeDirectoryMode=0750
+
+WorkingDirectory=/var/lib/motion
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-video/motion/files/motion_at.service b/media-video/motion/files/motion_at.service
new file mode 100644
index 000000000000..87df91132486
--- /dev/null
+++ b/media-video/motion/files/motion_at.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Motion detection daemon for %I
+After=local-fs.target network.target
+Documentation=man:motion(1)
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/motion -n -c /etc/motion/motion-%i.conf
+StandardError=null
+
+User=motion
+Group=video
+
+#RuntimeDirectory=motion
+#RuntimeDirectoryMode=0750
+
+WorkingDirectory=/var/lib/motion
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-video/motion/metadata.xml b/media-video/motion/metadata.xml
new file mode 100644
index 000000000000..e02a13726c5e
--- /dev/null
+++ b/media-video/motion/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vilhelm.gray@gmail.com</email>
+ <name>William Breathitt Gray</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="mmal">Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Motion-Project/motion</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/motion/motion-4.0.1-r1.ebuild b/media-video/motion/motion-4.0.1-r1.ebuild
new file mode 100644
index 000000000000..d22071452593
--- /dev/null
+++ b/media-video/motion/motion-4.0.1-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools readme.gentoo-r1 user 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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="ffmpeg libav mmal mysql postgres v4l"
+
+RDEPEND="
+ ffmpeg? (
+ libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ virtual/jpeg:=
+ mmal? ( media-libs/raspberrypi-userland )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+"
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers media-libs/libv4l )
+"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="You need to setup /etc/${PN}/${PN}.conf before running
+${PN} for the first time. You can use /etc/${PN}/${PN}-dist.conf as a
+template. Please note that the 'daemon' and 'process_id_file' settings
+are overridden by the bundled OpenRC init script and systemd unit where
+appropriate.
+
+To install ${PN} as a service, use:
+rc-update add ${PN} default # with OpenRC
+systemctl enable ${PN}.service # with systemd
+"
+
+pkg_setup() {
+ enewuser ${PN} -1 -1 -1 video
+}
+
+S="${WORKDIR}"/${PN}-release-${PV}
+
+src_prepare() {
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with ffmpeg) \
+ $(use_with mmal) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with v4l) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF} \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dounit "${FILESDIR}"/${PN}_at.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
+
+ keepdir /var/lib/motion
+ fowners motion:video /var/lib/motion
+ fperms 0750 /var/lib/motion
+
+ readme.gentoo_create_doc
+}
diff --git a/media-video/motion/motion-4.0.1-r2.ebuild b/media-video/motion/motion-4.0.1-r2.ebuild
new file mode 100644
index 000000000000..362423c2bc6f
--- /dev/null
+++ b/media-video/motion/motion-4.0.1-r2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools readme.gentoo-r1 user 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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ffmpeg libav mmal mysql postgres v4l"
+
+RDEPEND="
+ ffmpeg? (
+ libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ virtual/jpeg:=
+ mmal? ( media-libs/raspberrypi-userland )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+"
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers media-libs/libv4l )
+"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+You need to setup /etc/${PN}/${PN}.conf before running ${PN} for
+the first time. You can use /etc/${PN}/${PN}-dist.conf as a template.
+Please note that the 'daemon' and 'process_id_file' settings are
+overridden by the bundled OpenRC init script and systemd unit where
+appropriate.
+
+To install ${PN} as a service, use:
+rc-update add ${PN} default # with OpenRC
+systemctl enable ${PN}.service # with systemd
+"
+
+pkg_setup() {
+ enewuser ${PN} -1 -1 -1 video
+}
+
+S="${WORKDIR}"/${PN}-release-${PV}
+
+src_prepare() {
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with ffmpeg) \
+ $(use_with mmal) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with v4l) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF} \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dounit "${FILESDIR}"/${PN}_at.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
+
+ keepdir /var/lib/motion
+ fowners motion:video /var/lib/motion
+ fperms 0750 /var/lib/motion
+
+ readme.gentoo_create_doc
+ readme.gentoo_print_elog
+}