summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-12-10 16:33:55 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2011-12-12 18:40:09 +0100
commit8cc48b38abec7220c4e2d0b6be537d6a23b9e7e7 (patch)
tree7b9c25a779abe21a256a45f603b986a1f7e2def2
parentf8911a323106e054971ab06a7d4de94c4fb50596 (diff)
downloadmeta-openembedded-8cc48b38abec7220c4e2d0b6be537d6a23b9e7e7.tar.gz
connman: convert to bbappend as 0.78 has been moved to OE-Core
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--meta-oe/recipes-connectivity/connman/connman.inc98
-rwxr-xr-xmeta-oe/recipes-connectivity/connman/connman/connman42
-rw-r--r--meta-oe/recipes-connectivity/connman/connman_0.78.bb33
-rw-r--r--meta-oe/recipes-connectivity/connman/connman_0.78.bbappend13
4 files changed, 13 insertions, 173 deletions
diff --git a/meta-oe/recipes-connectivity/connman/connman.inc b/meta-oe/recipes-connectivity/connman/connman.inc
deleted file mode 100644
index 88b2e5106..000000000
--- a/meta-oe/recipes-connectivity/connman/connman.inc
+++ /dev/null
@@ -1,98 +0,0 @@
1SUMMARY = "A daemon for managing internet connections within embedded devices"
2DESCRIPTION = "The ConnMan project provides a daemon for managing \
3internet connections within embedded devices running the Linux \
4operating system. The Connection Manager is designed to be slim and \
5to use as few resources as possible, so it can be easily integrated. \
6It is a fully modular system that can be extended, through plug-ins, \
7to support all kinds of wired or wireless technologies. Also, \
8configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "http://bugs.meego.com/buglist.cgi?quicksearch=connman"
12LICENSE = "GPLv2"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e"
15
16# we need to define the depends here, the dynamic stuff is too late
17DEPENDS = "dbus glib-2.0 ppp busybox dhcp resolvconf iptables gnutls ntp \
18 ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluez4', '', d)} \
19 ${@base_contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
20 "
21
22EXTRA_OECONF += "\
23 ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
24 ac_cv_path_DHCLIENT=/sbin/dhclient \
25 ac_cv_path_UDHCPC=/sbin/udhcpc \
26 ac_cv_path_RESOLVCONF=/sbin/resolvconf \
27 ac_cv_path_PPPD=/usr/sbin/pppd \
28 --with-systemdunitdir=${base_libdir}/systemd/system/ \
29"
30
31INITSCRIPT_NAME = "connman"
32INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
33
34SYSTEMD_PACKAGES = "${PN}-systemd"
35SYSTEMD_SERVICE_${PN}-systemd = "connman.service"
36
37PARALLEL_MAKE = ""
38
39inherit autotools pkgconfig update-rc.d systemd
40
41do_configure_append() {
42 ln -sf . include/connman
43}
44
45do_compile_append() {
46 sed -i -e s:deny:allow:g src/connman-dbus.conf
47}
48
49do_install_append() {
50 install -d ${D}${sysconfdir}/init.d
51 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
52
53 install -d ${D}${bindir}
54 install -m 0755 ${S}/tools/*-test ${D}${bindir}
55 install -m 0755 ${S}/tools/wispr ${D}${bindir}
56}
57
58python populate_packages_prepend() {
59 depmap = dict( pppd="ppp", udhcp="busybox connman-scripts", dhclient="dhcp-client", wifi="wpa-supplicant", resolvconf="resolvconf", bluetooth="bluez4", ntpd="ntp", ofono="ofono" )
60 packages = []
61 hook = lambda file,pkg,b,c,d:packages.append((file,pkg))
62 plugin_dir = bb.data.expand('${libdir}/connman/plugins/', d)
63 plugin_name = bb.data.expand('${PN}-plugin-%s', d)
64 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} plugin for %s', extra_depends='', hook=hook )
65 for (file, package) in packages:
66 plugintype = package.split( '-' )[-1]
67 if plugintype in depmap:
68 rdepends = bb.data.getVar( "RDEPENDS_%s" % package, d )
69 bb.note( "Adding rdependency on %s to package %s" % ( depmap[plugintype], package ) )
70 bb.data.setVar("RDEPENDS_%s" % package, depmap[plugintype], d)
71}
72
73PACKAGES_DYNAMIC = "${PN}-plugin-*"
74
75PACKAGES =+ "${PN}-scripts ${PN}-tools ${PN}-tests"
76
77FILES_${PN}-tools = "${bindir}/wispr"
78FILES_${PN}-tests = "${bindir}/*-test"
79FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
80 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
81 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
82 ${datadir}/pixmaps ${datadir}/applications \
83 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
84 ${libdir}/bonobo/servers \
85 ${datadir}/dbus-1/system-services/*"
86
87PACKAGES =+ "${PN}-systemd"
88# Package up systemd files
89FILES_${PN}-systemd += "${base_libdir}/systemd"
90RDEPENDS_${PN}-systemd += "${PN}"
91
92# Needed when using DNS proxy feature
93RRECOMMENDS_${PN} += "dnsmasq-dbus"
94
95FILES_${PN}-scripts += "${libdir}/connman/scripts"
96FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
97FILES_${PN}-dev += "${libdir}/connman/*/*.la"
98
diff --git a/meta-oe/recipes-connectivity/connman/connman/connman b/meta-oe/recipes-connectivity/connman/connman/connman
deleted file mode 100755
index f8154f68f..000000000
--- a/meta-oe/recipes-connectivity/connman/connman/connman
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3DAEMON=/usr/sbin/connmand
4PIDFILE=/var/run/connmand.pid
5DESC="Connection Manager"
6
7if [ -f /etc/default/connman ] ; then
8 . /etc/default/connman
9fi
10
11set -e
12
13do_start() {
14 $DAEMON
15}
16
17do_stop() {
18 start-stop-daemon --stop --name connmand --quiet
19}
20
21case "$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 ;;
40esac
41
42exit 0
diff --git a/meta-oe/recipes-connectivity/connman/connman_0.78.bb b/meta-oe/recipes-connectivity/connman/connman_0.78.bb
deleted file mode 100644
index f486f95aa..000000000
--- a/meta-oe/recipes-connectivity/connman/connman_0.78.bb
+++ /dev/null
@@ -1,33 +0,0 @@
1require connman.inc
2
3EXTRA_OECONF += "\
4 --disable-gtk-doc \
5 --enable-debug \
6 --enable-threads \
7 --enable-loopback \
8 --enable-ethernet \
9 ${@base_contains('DISTRO_FEATURES', 'wifi','--enable-wifi', '--disable-wifi', d)} \
10 ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
11 --enable-ofono \
12 --enable-tools \
13 --disable-polkit \
14 --enable-client \
15 --enable-fake \
16 --enable-ntpd \
17 --with-ntpd=${bindir}/ntpd \
18"
19
20S = "${WORKDIR}/git"
21
22# 0.78 tag
23SRCREV = "02f5d5fe2d7c71514a6387ba2b772b42d8e8d297"
24
25SRC_URI = "git://git.kernel.org/pub/scm/network/connman/connman.git \
26 file://connman"
27
28# alg-test doesn't build, so disable that and test for if_alg.h as this header is only in 2.6.39
29do_configure_prepend() {
30 sed -i 's:tools/alg-test ::g' Makefile.am
31 sed -i 's:AC_CHECK_HEADERS(linux/if_alg.h, dummy=yes,::g;
32 s:AC_MSG_ERROR(User-space algorithm header files are required))::g' configure.ac
33}
diff --git a/meta-oe/recipes-connectivity/connman/connman_0.78.bbappend b/meta-oe/recipes-connectivity/connman/connman_0.78.bbappend
new file mode 100644
index 000000000..d6f756cff
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman_0.78.bbappend
@@ -0,0 +1,13 @@
1inherit systemd
2
3EXTRA_OECONF += "--with-systemdunitdir=${base_libdir}/systemd/system/"
4
5PRINC := "${@int(PRINC) + 1}"
6
7SYSTEMD_PACKAGES = "${PN}-systemd"
8SYSTEMD_SERVICE_${PN}-systemd = "connman.service"
9
10# systemd files
11PACKAGES =+ "${PN}-systemd"
12FILES_${PN}-systemd += "${base_libdir}/systemd"
13RDEPENDS_${PN}-systemd += "${PN}"