Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media_video/motion: version bump to 4.3.1
New version of motion, which fixes - https://bugs.gentoo.org/665930: depends on virtual/mysql - https://bugs.gentoo.org/673410: version bump request - https://bugs.gentoo.org/717312: OpenRC init file simplification Also made the following other enhancements: - set default directory to motion's home dir /var/db/montion - updated emerge message - created local use flag 'supervise-daemon' to configure initd for process supervision under OpenRC
- Loading branch information
Showing
10 changed files
with
183 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>media-video@gentoo.org</email> | ||
</maintainer> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit acct-group | ||
|
||
ACCT_GROUP_ID=395 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>media-video@gentoo.org</email> | ||
</maintainer> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2019-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit acct-user | ||
|
||
DESCRIPTION="added by portage for motion, a software motion detector" | ||
ACCT_USER_ID=395 | ||
ACCT_USER_HOME=/var/lib/motion | ||
ACCT_USER_GROUPS=( motion video ) | ||
|
||
acct-user_add_deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Motion OpenRC conf.d file | ||
|
||
|
||
# Set the user and group under which motion will be run | ||
#MOTION_USER="motion" | ||
#MOTION_GROUP="motion" | ||
|
||
# Motion accepts some command line args, which overrule the parameters in | ||
# the configuration file. These command line args can be coded as follows: | ||
# -c configfile - complete path and filename | ||
#MOTION_ARGS="-c /etc/motion/motion.conf | ||
# -d loglevel - 1-9 for EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL | ||
#MOTION_ARGS="${MOTION_ARGS} -d 6" | ||
# -k logtype - 1-9 for COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL | ||
#MOTION_ARGS="${MOTION_ARGS} -k 7" | ||
# -l logfile - complete path and filename | ||
#MOTION_ARGS="${MOTION_ARGS} -l /var/log/messages"" | ||
|
||
#Optinally set a default dir where motion places its output | ||
#MOTION_HOMEDIR="/var/lib/motion" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
: ${MOTION_USER:="motion"} | ||
: ${MOTION_GROUP:="motion"} | ||
|
||
depend() { | ||
use mysql | ||
use postgresql | ||
} | ||
|
||
command=/usr/bin/motion | ||
command_args="${MOTION_ARGS}" | ||
command_user="${MOTION_USER}:${MOTION_GROUP}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Copyright 1999-2019 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 libav mariadb mmal mysql postgres sqlite supervise-daemon v4l webp" | ||
|
||
RDEPEND=" | ||
acct-group/motion | ||
acct-user/motion | ||
virtual/jpeg:= | ||
ffmpeg? ( | ||
libav? ( media-video/libav:= ) | ||
!libav? ( 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 | ||
) | ||
" | ||
|
||
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's default current working directory is /var/lib/motion. | ||
Output will be written here, unless overruled 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 | ||
|
||
newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN} | ||
newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} | ||
|
||
# do not start mysql/postgres unnecessarily | ||
( use mysql || use mariadb ) || sed -i -e "/use mysql/d" "${D}/etc/init.d/motion" | ||
use postgres || sed -i -e "/use postgresql/d" "${D}/etc/init.d/motion" | ||
( use mysql || use mariadb || use postgres ) || sed -i -e "/depend/{N;N;d;}" "${D}/etc/init.d/motion" | ||
|
||
# configure for supervise-daemonn | ||
use supervise-daemon && echo "supervisor=\"supervise-daemon\"" >> "${D}/etc/init.d/motion" | ||
use supervise-daemon || echo "pidfile=\"/run/\${RC_SVCNAME}.pid\"" >> "${D}/etc/init.d/motion" | ||
use supervise-daemon || echo "command_background=true" >> "${D}/etc/init.d/motion" | ||
|
||
systemd_dounit "${FILESDIR}"/${PN}.service | ||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf | ||
|
||
readme.gentoo_create_doc | ||
readme.gentoo_print_elog | ||
} |