summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2017-02-10 16:11:29 +0100
committerWolfram Schlich <wschlich@gentoo.org>2017-02-10 16:11:52 +0100
commitc2c5cf3d2e22d3f1116d21628448ff1fc7a434d8 (patch)
treeed41a82669a6c97534ade82e108a86a52fa92154
parentdev-libs/libevent: arm ppc ppc64 stable (bug 608042). (diff)
downloadgentoo-c2c5cf3d2e22d3f1116d21628448ff1fc7a434d8.tar.gz
gentoo-c2c5cf3d2e22d3f1116d21628448ff1fc7a434d8.tar.bz2
gentoo-c2c5cf3d2e22d3f1116d21628448ff1fc7a434d8.zip
media-video/motion: reformat README.gentoo, print contents upon first installation, use latest motion.confd-r1
Package-Manager: portage-2.3.3
-rw-r--r--media-video/motion/motion-4.0.1-r2.ebuild85
1 files changed, 85 insertions, 0 deletions
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..3bc71f9d9f38
--- /dev/null
+++ b/media-video/motion/motion-4.0.1-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}