Webcamd is a 500KiloByte daemon that enables use of hundreds of different USB

based webcam devices under the FreeBSD-8/9 operating system. The webcam daemon
is basically an application which is a port of Video4Linux USB webcam drivers
into userspace on FreeBSD. The daemon currently depends on libc, pthreads,
libusb and the VIDEO4BSD kernel module.

Submitted by:	Andrew Thompson <thompsa AT FreeBSD.org>
		Hans Petter Selasky <hselasky AT FreeBSD.org>
This commit is contained in:
Koop Mast
2010-01-16 20:51:23 +00:00
parent 21cbdc49b2
commit 69f1e54d3f
7 changed files with 102 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
# Ports collection makefile for: webcamd
# Date created: 13 January 2010
# Whom: Andrew Thompson <thompsa@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= webcamd
PORTVERSION= 0.1.0
CATEGORIES= multimedia
MASTER_SITES= http://www.selasky.org/hans_petter/video4bsd/releases/
MAINTAINER= hselasky@FreeBSD.org
COMMENT= A port of Video4Linux USB webcam drivers into userspace
BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat \
${LOCALBASE}/include/video4bsd.h:${PORTSDIR}/multimedia/video4bsd-kmod
LIB_DEPENDS= v4l1.0:${PORTSDIR}/multimedia/libv4l
USE_RC_SUBR= webcamd
CFLAGS+= -I${LOCALBASE}/include
USE_BZIP2= yes
USE_LDCONFIG= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800000
IGNORE= requires FreeBSD 8.0-RELEASE or later
.endif
post-patch:
cd ${WRKSRC}/patches; ${SH} ./do_patch.sh
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Makefile
post-install:
@${MKDIR} ${PREFIX}/etc/devd
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
< ${FILESDIR}/webcamd.conf.in > ${WRKDIR}/webcamd.conf
${INSTALL_DATA} "${WRKDIR}/webcamd.conf" ${PREFIX}/etc/devd
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@@ -0,0 +1,3 @@
MD5 (webcamd-0.1.0.tar.bz2) = a149b4178a2f8b87bcff0977bdebcd47
SHA256 (webcamd-0.1.0.tar.bz2) = 3d48c35014352895c27e03842eb6498db3b1cc11c50975b7558a934961c8bd63
SIZE (webcamd-0.1.0.tar.bz2) = 3417425

View File

@@ -0,0 +1,5 @@
attach 100 {
device-name "ugen[0-9]+";
match "intclass" "(0x0e|0xff)";
action "%%PREFIX%%/etc/rc.d/webcamd start $device-name";
};

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: webcamd
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf[.local] to enable webcamd:
#
# webcamd_enable="YES"
#
webcamd_enable=${webcamd_enable-"NO"}
. %%RC_SUBR%%
name=webcamd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/webcamd
command_args="-B"
load_rc_config $name
if [ $# -gt 1 ]; then
command_args="$command_args -d $2 -i 0"
fi
run_rc_command $1

View File

@@ -0,0 +1,7 @@
Webcamd is a 500KiloByte daemon that enables use of hundreds of different USB
based webcam devices under the FreeBSD-8/9 operating system. The webcam daemon
is basically an application which is a port of Video4Linux USB webcam drivers
into userspace on FreeBSD. The daemon currently depends on libc, pthreads,
libusb and the VIDEO4BSD kernel module.
WWW: http://www.selasky.org/hans_petter/video4bsd/

View File

@@ -0,0 +1,17 @@
*********************************************************************
1) webcamd requires the video4bsd kernel module, please load this
by doing
# kldload video4bsd
or adding
video4bsd_load="YES"
to your /boot/loader.conf.
2) Please restart devd as the configuration changed
# /etc/rc.d/devd restart
*********************************************************************

View File

@@ -0,0 +1,3 @@
etc/devd/webcamd.conf
sbin/webcamd
@dirrmtry etc/devd