diff options
Diffstat (limited to 'meta-eca/recipes-connectivity/ofono')
-rw-r--r-- | meta-eca/recipes-connectivity/ofono/files/ofono | 42 | ||||
-rw-r--r-- | meta-eca/recipes-connectivity/ofono/ofono_git.bb | 32 |
2 files changed, 74 insertions, 0 deletions
diff --git a/meta-eca/recipes-connectivity/ofono/files/ofono b/meta-eca/recipes-connectivity/ofono/files/ofono new file mode 100644 index 0000000..cc99709 --- /dev/null +++ b/meta-eca/recipes-connectivity/ofono/files/ofono | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | DAEMON=/usr/sbin/ofonod | ||
4 | PIDFILE=/var/run/ofonod.pid | ||
5 | DESC="Telephony daemon" | ||
6 | |||
7 | if [ -f /etc/default/ofono ] ; then | ||
8 | . /etc/default/ofono | ||
9 | fi | ||
10 | |||
11 | set -e | ||
12 | |||
13 | do_start() { | ||
14 | $DAEMON | ||
15 | } | ||
16 | |||
17 | do_stop() { | ||
18 | start-stop-daemon --stop --name ofonod --quiet | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | start) | ||
23 | echo "Starting $DESC" | ||
24 | do_start | ||
25 | ;; | ||
26 | stop) | ||
27 | echo "Stopping $DESC" | ||
28 | do_stop | ||
29 | ;; | ||
30 | restart|force-reload) | ||
31 | echo "Restarting $DESC" | ||
32 | do_stop | ||
33 | sleep 1 | ||
34 | do_start | ||
35 | ;; | ||
36 | *) | ||
37 | echo "Usage: $0 {start|stop|restart|force-reload}" >&2 | ||
38 | exit 1 | ||
39 | ;; | ||
40 | esac | ||
41 | |||
42 | exit 0 | ||
diff --git a/meta-eca/recipes-connectivity/ofono/ofono_git.bb b/meta-eca/recipes-connectivity/ofono/ofono_git.bb new file mode 100644 index 0000000..110358f --- /dev/null +++ b/meta-eca/recipes-connectivity/ofono/ofono_git.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | require recipes-connectivity/ofono/ofono.inc | ||
2 | |||
3 | S = "${WORKDIR}/git" | ||
4 | SRCREV = "516165c3114471400b4551ff9b04ff9ca7c1fc25" | ||
5 | PV = "1.14+git${SRCPV}" | ||
6 | |||
7 | SRC_URI = "\ | ||
8 | git://git.kernel.org/pub/scm/network/ofono/ofono.git;protocol=git \ | ||
9 | file://ofono \ | ||
10 | " | ||
11 | |||
12 | # We want to use bluez5 | ||
13 | DEPENDS := "${@oe_filter_out('bluez4', '${DEPENDS}', d)}" | ||
14 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'bluetooth','bluez5', '', d)}" | ||
15 | |||
16 | # Test scripts use python3, the dbus module is still missing so the scripts | ||
17 | # do not work as expected. | ||
18 | RDEPENDS_${PN} = "\ | ||
19 | python3 \ | ||
20 | python3-codecs \ | ||
21 | python3-math \ | ||
22 | python3-io \ | ||
23 | python3-misc \ | ||
24 | " | ||
25 | |||
26 | do_install_append() { | ||
27 | # Because python3-dbus module is currently not there, just use | ||
28 | # python 2.x in the ofono test scripts | ||
29 | for PYTHSCRIPT in `grep -rIl ${bindir}/python3 ${D}${libdir}/${PN}`; do | ||
30 | sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT | ||
31 | done | ||
32 | } | ||