View | Details | Raw Unified | Return to bug 197574 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +3 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	cx88
4
PORTNAME=	cx88
5
PORTVERSION=	1.4.11
5
PORTVERSION=	1.4.11
6
PORTREVISION=	1
6
CATEGORIES=	multimedia
7
CATEGORIES=	multimedia
7
MASTER_SITES=	ftp://corona.homeunix.net/ports/cx88/
8
MASTER_SITES=	ftp://corona.homeunix.net/ports/cx88/
8
9
Lines 17-23 Link Here
17
18
18
MAKE_ARGS+=	LIBTUNER_LIB=${LOCALBASE}/lib/libtuner LIBTUNER_HEADER=${LOCALBASE}/include/libtuner KMODDIR=${KMODDIR} PREFIX=${STAGEDIR}${PREFIX}
19
MAKE_ARGS+=	LIBTUNER_LIB=${LOCALBASE}/lib/libtuner LIBTUNER_HEADER=${LOCALBASE}/include/libtuner KMODDIR=${KMODDIR} PREFIX=${STAGEDIR}${PREFIX}
19
MAKE_JOBS_UNSAFE=	yes
20
MAKE_JOBS_UNSAFE=	yes
20
USES=				kmod pkgconfig uidfix
21
USES=			kmod pkgconfig uidfix
22
USE_RC_SUBR=		cx88d
21
23
22
OPTIONS_DEFINE=	DEBUG LINUX_COMPAT HAL
24
OPTIONS_DEFINE=	DEBUG LINUX_COMPAT HAL
23
25
(-)files/cx88d.in (+72 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# PROVIDE: cx88d
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# Add the following line to /etc/rc.conf[.local] to enable cx88d
10
#
11
# cx88d_enable (bool):		Set to "NO" by default.
12
#				Set it to "YES" to enable cx88d.
13
# cx88d_args (str):		Extra arguments to be passed to all cx88 instances (default "-p 0 -q -h -u dvb://")
14
# cx88d_devs (str):		Whitespace-delimited list of devices on which
15
#				to enable DVB capture (e.g. cx88d_devs="cx88mpeg0 cx88mpeg2").
16
#				Defaults to all cx88mpeg devices under /dev.
17
# cx88d_{dev}_args (str)	Extra arguments to be passed to cx88 instance for specific device
18
#				(e.g. cx88d_cx88mpeg1_args="-u udp://127.0.0.1:8802") (default empty)
19
#
20
21
. /etc/rc.subr
22
23
name="cx88d"
24
rcvar=cx88d_enable
25
26
load_rc_config $name
27
28
: ${cx88d_enable:="NO"}
29
: ${cx88d_args="-p 0 -q -h -u dvb://"}
30
31
procname="%%PREFIX%%/bin/cx88"
32
command="/usr/sbin/daemon"
33
34
cx88d_showports() {
35
   printf "PORT\tCMMMAND\n"
36
   sockstat -l -P tcp | grep cx88 | while read line; do
37
      command=""
38
      port=""
39
      for field in $line; do
40
         if [ `expr "$field" : "[0-9]*"` -gt 0 -a "$command" = "" ]; then
41
            command=`ps -o command= -p $field`
42
         elif [ `expr "$field" : "\*:[0-9]*"` -gt 2 -a "$port" = "" ]; then
43
            port=`echo $field | cut -c 3-`
44
         fi
45
      done
46
      printf "$port\t$command\n"
47
   done
48
}
49
50
extra_commands="showports"
51
showports_cmd="${name}_showports"
52
53
case $1 in
54
   *showports)
55
      run_rc_command "$1"
56
      ;;
57
   *rcvar)
58
      run_rc_command "$1"
59
      ;;
60
   *)
61
      if [ -z "${cx88d_devs}" ]; then
62
         cx88d_devs=`ls /dev/cx88mpeg* | cut -c 6-`
63
      fi
64
      for devnode in ${cx88d_devs}; do
65
         pidfile="/var/run/cx88d.${devnode}.pid"
66
         eval cx88d_instance_flags=\$cx88d_${devnode}_args
67
         command_args="-fp ${pidfile} ${procname} -d /dev/${devnode} ${cx88d_args} ${cx88d_instance_flags}"
68
         run_rc_command "$1"
69
      done
70
      ;;
71
esac
72
(-)pkg-plist (-1 lines)
Lines 8-14 Link Here
8
%%EXAMPLESDIR%%/cx88_mpeg_client.cpp
8
%%EXAMPLESDIR%%/cx88_mpeg_client.cpp
9
%%EXAMPLESDIR%%/hd3k_analog_kbuf.cpp
9
%%EXAMPLESDIR%%/hd3k_analog_kbuf.cpp
10
%%EXAMPLESDIR%%/tuner_config
10
%%EXAMPLESDIR%%/tuner_config
11
etc/rc.d/cx88d
12
include/iicdev/iicdev_ioctl.h
11
include/iicdev/iicdev_ioctl.h
13
include/cx88/cx88_common_ioctl.h
12
include/cx88/cx88_common_ioctl.h
14
include/cx88/cx88_mpeg_ioctl.h
13
include/cx88/cx88_mpeg_ioctl.h

Return to bug 197574