diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-connectivity/irda-utils | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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 | 39 |
2 files changed, 117 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..6f29e9c6ed --- /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 | NAME="irattach" | ||
12 | test -x "$IRDA_DAEMON" || IRDA_DAEMON=/usr/sbin/irattach | ||
13 | test -z "$IRATTACH_PID" && IRATTACH_PID=/var/run/irattach.pid | ||
14 | |||
15 | # Source function library. | ||
16 | . /etc/init.d/functions | ||
17 | |||
18 | module_id() { | ||
19 | awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo | ||
20 | } | ||
21 | |||
22 | if [ ! -f /etc/sysconfig/irda ]; then | ||
23 | case `module_id` in | ||
24 | "HP iPAQ H2200" | "HP iPAQ HX4700" | "HTC Universal") | ||
25 | IRDA=yes | ||
26 | DEVICE=/dev/ttyS2 | ||
27 | DONGLE= | ||
28 | DISCOVERY= | ||
29 | ;; | ||
30 | *) | ||
31 | IRDA=yes | ||
32 | DEVICE=/dev/ttyS1 | ||
33 | DONGLE= | ||
34 | DISCOVERY= | ||
35 | ;; | ||
36 | esac | ||
37 | else | ||
38 | . /etc/sysconfig/irda | ||
39 | fi | ||
40 | |||
41 | # Check that irda is up. | ||
42 | [ ${IRDA} = "no" ] && exit 0 | ||
43 | |||
44 | [ -f /usr/sbin/irattach ] || exit 0 | ||
45 | |||
46 | ARGS= | ||
47 | if [ $DONGLE ]; then | ||
48 | ARGS="$ARGS -d $DONGLE" | ||
49 | fi | ||
50 | if [ "$DISCOVERY" = "yes" ];then | ||
51 | ARGS="$ARGS -s" | ||
52 | fi | ||
53 | |||
54 | case "$1" in | ||
55 | start) | ||
56 | echo -n "Starting IrDA: $NAME" | ||
57 | start-stop-daemon --start --quiet --exec "$IRDA_DAEMON" ${DEVICE} ${ARGS} --pidfile "$IRATTACH_PID" | ||
58 | sleep 1 | ||
59 | [ -f /var/run/irattach.pid ] && echo " done" || echo " fail" | ||
60 | ;; | ||
61 | stop) | ||
62 | echo "Stopping IrDA: $NAME" | ||
63 | start-stop-daemon --stop --quiet --exec "$IRDA_DAEMON" --pidfile "$IRATTACH_PID" | ||
64 | ;; | ||
65 | restart|force-reload) | ||
66 | $0 stop | ||
67 | $0 start | ||
68 | ;; | ||
69 | status) | ||
70 | status irattach | ||
71 | exit $? | ||
72 | ;; | ||
73 | *) | ||
74 | N=/etc/init.d/$NAME | ||
75 | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 | ||
76 | exit 1 | ||
77 | ;; | ||
78 | esac | ||
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..7403dc95da --- /dev/null +++ b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb | |||
@@ -0,0 +1,39 @@ | |||
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 | |||
14 | SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \ | ||
15 | file://init" | ||
16 | |||
17 | SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb" | ||
18 | SRC_URI[sha256sum] = "61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6" | ||
19 | |||
20 | export SYS_INCLUDES="-I${STAGING_INCDIR}" | ||
21 | |||
22 | inherit autotools-brokensep update-rc.d | ||
23 | |||
24 | INITSCRIPT_NAME = "irattach" | ||
25 | INITSCRIPT_PARAMS = "defaults 20" | ||
26 | |||
27 | do_compile () { | ||
28 | oe_runmake -e -C irattach | ||
29 | oe_runmake -e -C irdaping | ||
30 | } | ||
31 | |||
32 | do_install () { | ||
33 | install -d ${D}${sbindir} | ||
34 | oe_runmake -C irattach ROOT="${D}" install | ||
35 | oe_runmake -C irdaping ROOT="${D}" install | ||
36 | |||
37 | install -d ${D}${sysconfdir}/init.d | ||
38 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
39 | } | ||