[oe-commits] Otavio Salvador : connman: refactor systemd packaging

git at git.openembedded.org git at git.openembedded.org
Fri Nov 4 19:30:51 UTC 2011


Module: meta-openembedded.git
Branch: master
Commit: 77baa7401844ad46e0c6a0a7234b9ca023d45710
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=77baa7401844ad46e0c6a0a7234b9ca023d45710

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Fri Nov  4 17:26:00 2011 +0000

connman: refactor systemd packaging

This changes the recipe to use systemd.bbclass to avoid duplicating
code and also fix the rdepends of connman-systemd on connman.

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 meta-oe/recipes-connectivity/connman/connman.inc   |   24 ++++---------------
 .../recipes-connectivity/connman/connman_0.77.bb   |    2 +-
 2 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/meta-oe/recipes-connectivity/connman/connman.inc b/meta-oe/recipes-connectivity/connman/connman.inc
index 8209502..88b2e51 100644
--- a/meta-oe/recipes-connectivity/connman/connman.inc
+++ b/meta-oe/recipes-connectivity/connman/connman.inc
@@ -31,9 +31,12 @@ EXTRA_OECONF += "\
 INITSCRIPT_NAME = "connman"
 INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
 
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "connman.service"
+
 PARALLEL_MAKE = ""
 
-inherit autotools pkgconfig update-rc.d
+inherit autotools pkgconfig update-rc.d systemd
 
 do_configure_append() {
 	ln -sf . include/connman
@@ -84,24 +87,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
 PACKAGES =+ "${PN}-systemd"
 # Package up systemd files
 FILES_${PN}-systemd += "${base_libdir}/systemd"
-
-pkg_postinst_connman-systemd() {
-	# can't do this offline
-	if [ "x$D" != "x" ]; then
-		exit 1
-	fi
-	
-	systemctl enable connman.service
-}
-
-pkg_postrm_connman-systemd() {
-	# can't do this offline
-	if [ "x$D" != "x" ]; then
-		exit 1
-	fi
-
-	systemctl disable connman.service
-}
+RDEPENDS_${PN}-systemd += "${PN}"
 
 # Needed when using DNS proxy feature
 RRECOMMENDS_${PN} += "dnsmasq-dbus"
diff --git a/meta-oe/recipes-connectivity/connman/connman_0.77.bb b/meta-oe/recipes-connectivity/connman/connman_0.77.bb
index 6d9c87c..9c93e51 100644
--- a/meta-oe/recipes-connectivity/connman/connman_0.77.bb
+++ b/meta-oe/recipes-connectivity/connman/connman_0.77.bb
@@ -1,5 +1,5 @@
 require connman.inc
-PR = "r2"
+PR = "r3"
 
 EXTRA_OECONF += "\
   --disable-gtk-doc \





More information about the Openembedded-commits mailing list