[oe] [meta-oe 5/7] automatically install all *.service and *.socket supplied in recipe's SRC_URI
Andreas Müller
schnitzeltony at googlemail.com
Sat Feb 11 02:00:01 UTC 2012
Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
---
meta-oe/classes/systemd.bbclass | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index ffcabe9..3c1ed14 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -74,6 +74,17 @@ python __anonymous() {
systemd_after_parse(d)
}
+# automatically install all *.service and *.socket supplied in recipe's SRC_URI
+do_install_append() {
+ install -d ${D}${base_libdir}/systemd/system
+ for service in `find ${WORKDIR} -maxdepth 1 -name '*.service' -o -name '*.socket'` ; do
+ # ensure installing systemd-files only (e.g not avahi *.service)
+ if grep -q '\[Unit\]' $service ; then
+ install -m 644 $service ${D}${base_libdir}/systemd/system
+ fi
+ done
+}
+
python populate_packages_prepend () {
def systemd_prepost_instrm(pkg):
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
--
1.7.4.4
More information about the Openembedded-devel
mailing list