All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/5] connman: Enable VPN support
Date: Fri, 10 May 2013 15:33:14 +0300	[thread overview]
Message-ID: <1368189198-1294-2-git-send-email-jukka.rissanen@linux.intel.com> (raw)
In-Reply-To: <1368189198-1294-1-git-send-email-jukka.rissanen@linux.intel.com>

If DISTRO_FEATURES contains vpn, then enable vpn support in ConnMan.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
 meta/recipes-connectivity/connman/connman.inc | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index afc361c..3f01803 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -49,6 +49,8 @@ INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
 SYSTEMD_SERVICE_${PN} = "connman.service"
 SYSTEMD_WIRED_SETUP = "ExecStartPre=-/usr/lib/connman/wired-setup"
 
+SYSTEMD_SERVICE_${PN} += " ${@base_contains('DISTRO_FEATURES', 'vpn', 'connman-vpn.service', '', d)}"
+
 # IMPORTANT: because xuser is shared with rootless X, please make sure the
 # USERADD_PARAM is in sync with the one in xserver-nodm-init.bb
 USERADD_PACKAGES = "${PN}"
@@ -67,6 +69,10 @@ do_configure_append () {
 # both this and the xuser patch can be dropped.
 do_compile_append() {
 	sed -i -e s:deny:allow:g src/connman-dbus.conf
+
+	if ${@base_contains('DISTRO_FEATURES','vpn','true','false',d)}; then
+		sed -i -e s:deny:allow:g vpn/vpn-dbus.conf
+	fi
 }
 
 do_install_append() {
@@ -80,12 +86,17 @@ do_install_append() {
 	install -m 0755 ${S}/tools/wispr ${D}${bindir}
 	install -m 0755 ${B}/client/connmanctl ${D}${bindir}
 
-	# We don't need to package an empty directory
-	rmdir ${D}${libdir}/connman/scripts
+	# We don't need to package an empty directory if vpn is not in use
+	if ${@base_contains('DISTRO_FEATURES','vpn','false','true',d)}; then
+		rmdir ${D}${libdir}/connman/scripts
+	fi
 
 	# Automake 1.12 won't install empty directories, but we need the
 	# plugins directory to be present for ownership
 	mkdir -p ${D}${libdir}/connman/plugins
+	if ${@base_contains('DISTRO_FEATURES','vpn','true','false',d)}; then
+		mkdir -p ${D}${libdir}/connman/plugins-vpn
+	fi
 }
 
 # These used to be plugins, but now they are core
@@ -120,6 +131,17 @@ python populate_packages_prepend() {
             rdepends = map(lambda x: multilib_prefix + x,  depmap[plugintype].split())
             bb.note( "Adding rdependency on %s to %s" % ( rdepends, package ) )
             d.setVar("RDEPENDS_%s" % package, " ".join(rdepends))
+
+    packages = []
+    plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
+    plugin_name = d.expand('${PN}-plugin-vpn-%s')
+    do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
+    for (file, package) in packages:
+        plugintype = package.split( '-' )[-1]
+        if plugintype in depmap:
+            rdepends = map(lambda x: multilib_prefix + x,  depmap[plugintype].split())
+            bb.note( "Adding rdependency on %s to %s" % ( rdepends, package ) )
+            d.setVar("RDEPENDS_%s" % package, " ".join(rdepends))
 }
 
 PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
@@ -133,6 +155,7 @@ FILES_${PN}-client = "${bindir}/connmanctl"
 
 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
             ${libdir}/connman/plugins \
+            ${libdir}/connman/plugins-vpn \
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
             ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
             ${datadir}/dbus-1/system-services/*"
-- 
1.7.11.7




  reply	other threads:[~2013-05-10 12:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 12:33 [PATCH 0/5] Enable VPN support in ConnMan Jukka Rissanen
2013-05-10 12:33 ` Jukka Rissanen [this message]
2013-05-10 12:33 ` [PATCH 2/5] connman: Add OpenVPN support Jukka Rissanen
2013-05-10 12:33 ` [PATCH 3/5] connman: Add vpnc support Jukka Rissanen
2013-05-10 12:33 ` [PATCH 4/5] connman: Add L2TP support Jukka Rissanen
2013-05-10 12:33 ` [PATCH 5/5] connman: Add PPTP support Jukka Rissanen
2013-05-10 13:47 ` [PATCH 0/5] Enable VPN support in ConnMan Burton, Ross
2013-05-10 22:22 ` Saul Wold
2013-05-11 13:59   ` Philip Balister
2013-05-12 13:27     ` Otavio Salvador
2013-05-12 15:40       ` Saul Wold
2013-05-12 16:32         ` Khem Raj
2013-05-12 18:54         ` Phil Blundell
2013-05-12 19:55           ` Paul Eggleton
2013-05-13  8:00             ` Saul Wold
2013-05-13  8:33               ` Paul Eggleton
2013-05-13  8:44                 ` Saul Wold
2013-05-13 11:02             ` Phil Blundell
2013-05-13 11:06               ` Burton, Ross
2013-05-13 11:16                 ` Phil Blundell
2013-05-13 11:32                 ` Tomas Frydrych
2013-05-13 14:24                   ` Burton, Ross
2013-05-13 14:53                   ` Phil Blundell
2013-05-14  9:22                     ` Tomas Frydrych
2013-05-14 10:18                       ` Richard Purdie
2013-05-15 21:25                         ` Phil Blundell
2013-05-14 12:30                       ` libsoup missing DEPENDS Mike Looijmans
2013-05-14 12:36                         ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1368189198-1294-2-git-send-email-jukka.rissanen@linux.intel.com \
    --to=jukka.rissanen@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.