[oe-commits] Koen Kooi : cloud9: add systemd unit
git version control
git at git.openembedded.org
Tue Oct 11 14:43:35 UTC 2011
Module: meta-openembedded.git
Branch: master
Commit: 7ab4010c82780f15ad4d16a17f43defdb43f6d8d
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=7ab4010c82780f15ad4d16a17f43defdb43f6d8d
Author: Koen Kooi <koen at dominion.thruhere.net>
Date: Mon Oct 10 20:11:53 2011 +0200
cloud9: add systemd unit
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
---
.../recipes-devtools/cloud9/cloud9/cloud9.service | 9 ++++++++
meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb | 22 ++++++++++++++++++-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-devtools/cloud9/cloud9/cloud9.service b/meta-oe/recipes-devtools/cloud9/cloud9/cloud9.service
new file mode 100644
index 0000000..027d03a
--- /dev/null
+++ b/meta-oe/recipes-devtools/cloud9/cloud9/cloud9.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Cloud9 IDE
+ConditionPathExists=|/var/lib/cloud9
+
+[Service]
+ExecStart=/usr/bin/node /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb b/meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb
index 60506b8..8afc9e2 100644
--- a/meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb
+++ b/meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb
@@ -3,9 +3,11 @@ HOMEPAGE = "http://c9.io"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018"
-PR = "r2"
+PR = "r3"
-SRC_URI = "git://github.com/jadonk/cloud9.git;protocol=git"
+SRC_URI = "git://github.com/jadonk/cloud9.git;protocol=git \
+ file://cloud9.service \
+ "
SRCREV = "08bae1d1cc2ba9f7f883a25afd07f0339a82fa8b"
S = "${WORKDIR}/git"
@@ -41,8 +43,24 @@ do_install () {
echo "#!/bin/sh" > ${D}${bindir}/cloud9
echo "node /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000" >> ${D}${bindir}/cloud9
chmod 0755 ${D}${bindir}/cloud9
+
+ install -d ${D}${base_libdir}/systemd/system
+ install -m 0644 ${WORKDIR}/*.service ${base_libdir}/systemd/system/
}
+
FILES_${PN}-dbg += "/usr/share/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/.debug"
+
+FILES_${PN} += "${base_libdir}/systemd/system"
RDEPENDS_${PN} = "nodejs gzip"
+pkg_postinst_${PN} () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ if [ -e ${base_bindir}/systemctl ] ; then
+ systemctl enable cloud9.service
+ fi
+}
More information about the Openembedded-commits
mailing list