diff options
Diffstat (limited to 'meta/recipes-connectivity/irda-utils')
-rwxr-xr-x | meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init | 78 | ||||
-rw-r--r-- | meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb | 40 |
2 files changed, 118 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init new file mode 100755 index 0000000000..b8038e08a3 --- /dev/null +++ b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init | |||
@@ -0,0 +1,78 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: irda | ||
4 | # Required-Start: $network $remote_fs | ||
5 | # Required-Stop: $network $remote_fs | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: Infrared port support | ||
9 | ### END INIT INFO | ||
10 | |||
11 | # Source function library. | ||
12 | . /etc/init.d/functions | ||
13 | |||
14 | module_id() { | ||
15 | awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo | ||
16 | } | ||
17 | |||
18 | if [ ! -f /etc/sysconfig/irda ]; then | ||
19 | case `module_id` in | ||
20 | "HP iPAQ H2200" | "HP iPAQ HX4700" | "HTC Universal") | ||
21 | IRDA=yes | ||
22 | DEVICE=/dev/ttyS2 | ||
23 | DONGLE= | ||
24 | DISCOVERY= | ||
25 | ;; | ||
26 | *) | ||
27 | IRDA=yes | ||
28 | DEVICE=/dev/ttyS1 | ||
29 | DONGLE= | ||
30 | DISCOVERY= | ||
31 | ;; | ||
32 | esac | ||
33 | else | ||
34 | . /etc/sysconfig/irda | ||
35 | fi | ||
36 | |||
37 | # Check that irda is up. | ||
38 | [ ${IRDA} = "no" ] && exit 0 | ||
39 | |||
40 | [ -f /usr/sbin/irattach ] || exit 0 | ||
41 | |||
42 | ARGS= | ||
43 | if [ $DONGLE ]; then | ||
44 | ARGS="$ARGS -d $DONGLE" | ||
45 | fi | ||
46 | if [ "$DISCOVERY" = "yes" ];then | ||
47 | ARGS="$ARGS -s" | ||
48 | fi | ||
49 | |||
50 | case "$1" in | ||
51 | start) | ||
52 | echo -n "Starting IrDA: " | ||
53 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | ||
54 | echo "$NAME." | ||
55 | ;; | ||
56 | stop) | ||
57 | echo -n "Stopping IrDA: " | ||
58 | killall irattach > /dev/null 2>&1 | ||
59 | echo "$NAME." | ||
60 | ;; | ||
61 | restart|force-reload) | ||
62 | echo -n "Restarting IrDA: " | ||
63 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | ||
64 | sleep 1 | ||
65 | killall irattach > /dev/null 2>&1 | ||
66 | echo "$NAME." | ||
67 | ;; | ||
68 | status) | ||
69 | status irattach | ||
70 | exit $? | ||
71 | ;; | ||
72 | *) | ||
73 | N=/etc/init.d/$NAME | ||
74 | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 | ||
75 | exit 1 | ||
76 | ;; | ||
77 | esac | ||
78 | |||
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb new file mode 100644 index 0000000000..575b0b1918 --- /dev/null +++ b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Common files for IrDA" | ||
2 | DESCRIPTION = "Provides common files needed to use IrDA. \ | ||
3 | IrDA allows communication over Infrared with other devices \ | ||
4 | such as phones and laptops." | ||
5 | HOMEPAGE = "http://irda.sourceforge.net/" | ||
6 | BUGTRACKER = "irda-users@lists.sourceforge.net" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://irdadump/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
10 | file://smcinit/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
11 | file://man/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
12 | file://irdadump/irdadump.c;beginline=1;endline=24;md5=d78b9dce3cd78c2220250c9c7a2be178" | ||
13 | PR = "r0" | ||
14 | |||
15 | SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \ | ||
16 | file://init" | ||
17 | |||
18 | SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb" | ||
19 | SRC_URI[sha256sum] = "61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6" | ||
20 | |||
21 | export SYS_INCLUDES="-I${STAGING_INCDIR}" | ||
22 | |||
23 | inherit autotools update-rc.d | ||
24 | |||
25 | INITSCRIPT_NAME = "irattach" | ||
26 | INITSCRIPT_PARAMS = "defaults 20" | ||
27 | |||
28 | do_compile () { | ||
29 | oe_runmake -e -C irattach | ||
30 | oe_runmake -e -C irdaping | ||
31 | } | ||
32 | |||
33 | do_install () { | ||
34 | install -d ${D}${sbindir} | ||
35 | oe_runmake -C irattach ROOT="${D}" install | ||
36 | oe_runmake -C irdaping ROOT="${D}" install | ||
37 | |||
38 | install -d ${D}${sysconfdir}/init.d | ||
39 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
40 | } | ||