1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
10 HOMEPAGE="http://sourceforge.net/projects/mjpg-streamer"
11 SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
15 KEYWORDS="~x86 ~amd64"
17 INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
18 OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
19 IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS} +input_file +output_http"
20 IUSE="${IUSE_PLUGINS} www v4l"
21 REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
22 || ( ${OUTPUT_PLUGINS} )
26 v4l? ( input_uvc? ( media-libs/libv4l ) )"
28 input_testpicture? ( media-gfx/imagemagick )"
31 epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
35 for flag in ${IUSE_PLUGINS}; do
36 use ${flag} && switch='' || switch='#'
38 -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
44 local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
54 insinto /usr/share/${PN}
60 newinitd "${FILESDIR}"/${PN}.initd ${PN}
61 newconfd "${FILESDIR}"/${PN}.confd ${PN}
65 elog "Remember to set an input and output plugin for mjpg-streamer."
69 elog "An example webinterface has been installed into"
70 elog "/usr/share/mjpg-streamer/www for your usage."