linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / connman / connman.inc
blob673d5090b292d0164cad2982bddeb2e25b19f0ee
1 DESCRIPTION = "The Moblin Connection Manager"
2 HOMEPAGE = "http://www.moblin.org/projects/projects_connman.php"
3 SECTION = "libs/network"
4 LICENSE = "GPL"
5 # we need to define the depends here, the dynamic stuff is too late
6 DEPENDS  = "libnl wpa-supplicant dbus glib-2.0 ppp busybox dhclient resolvconf bluez4"
8 EXTRA_OECONF += "\
9     ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
10     ac_cv_path_DHCLIENT=/sbin/dhclient \
11     ac_cv_path_UDHCPC=/sbin/udhcpc \
12     ac_cv_path_RESOLVCONF=/sbin/resolvconf \
13     ac_cv_path_PPPD=/usr/sbin/pppd \
16 INITSCRIPT_NAME = "connman"
17 INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
19 PARALLEL_MAKE = ""
21 inherit autotools pkgconfig update-rc.d
23 do_configure_append() {
24         ln -sf . include/connman
27 do_compile_append() {
28         sed -i -e s:deny:allow:g src/connman-dbus.conf
31 do_install_append() {
32         install -d ${D}${sysconfdir}/init.d
33     install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
36 python populate_packages_prepend() {
37         depmap = dict( pppd="ppp", udhcp="busybox connman-scripts", dhclient="dhclient", wifi="wpa-supplicant", resolvconf="resolvconf", bluetooth="bluez4" )
38         packages = []
39         hook = lambda file,pkg,b,c,d:packages.append((file,pkg))
40         plugin_dir = bb.data.expand('${libdir}/connman/plugins/', d)
41         plugin_name = bb.data.expand('${PN}-plugin-%s', d)
42         do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} plugin for %s', extra_depends='', hook=hook )
43         for (file, package) in packages:
44                 plugintype = package.split( '-' )[-1]
45                 if plugintype in depmap:
46                         rdepends = bb.data.getVar( "RDEPENDS_%s" % package, d )
47                         bb.note( "Adding rdependency on %s to package %s" % ( depmap[plugintype], package ) )
48                         bb.data.setVar("RDEPENDS_%s" % package, depmap[plugintype], d)
51 PACKAGES_DYNAMIC = "${PN}-plugin-*"
53 PACKAGES += "${PN}-scripts ${PN}-test-utils"
55 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
56             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
57             ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
58             ${datadir}/pixmaps ${datadir}/applications \
59             ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
60             ${libdir}/bonobo/servers \
61             ${datadir}/dbus-1/system-services/*"
63 # Package up systemd files
64 FILES_${PN} += "${base_libdir}/systemd"
65 # Needed when using DNS proxy feature
66 RRECOMMENDS_${PN} += "dnsmasq-dbus"
68 FILES_${PN}-test-utils += "${libdir}/connman/test/*"
70 FILES_${PN}-scripts += "${libdir}/connman/scripts"
71 FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
72 FILES_${PN}-dev += "${libdir}/connman/*/*.la"