diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-10 20:11:53 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-10 20:11:53 +0200 |
commit | 7ab4010c82780f15ad4d16a17f43defdb43f6d8d (patch) | |
tree | 6fdcb04d29925ff373c2ca179cf38aff3f99a571 /meta-oe/recipes-devtools | |
parent | 9278fe715d5eebd16af1a2d20a92255744913dbb (diff) | |
download | meta-openembedded-7ab4010c82780f15ad4d16a17f43defdb43f6d8d.tar.gz |
cloud9: add systemd unit
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r-- | meta-oe/recipes-devtools/cloud9/cloud9/cloud9.service | 9 | ||||
-rw-r--r-- | 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 000000000..027d03a86 --- /dev/null +++ b/meta-oe/recipes-devtools/cloud9/cloud9/cloud9.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=Cloud9 IDE | ||
3 | ConditionPathExists=|/var/lib/cloud9 | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/usr/bin/node /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000 | ||
7 | |||
8 | [Install] | ||
9 | 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 60506b896..8afc9e2cf 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" | |||
3 | LICENSE = "GPLv3" | 3 | LICENSE = "GPLv3" |
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018" |
5 | 5 | ||
6 | PR = "r2" | 6 | PR = "r3" |
7 | 7 | ||
8 | SRC_URI = "git://github.com/jadonk/cloud9.git;protocol=git" | 8 | SRC_URI = "git://github.com/jadonk/cloud9.git;protocol=git \ |
9 | file://cloud9.service \ | ||
10 | " | ||
9 | 11 | ||
10 | SRCREV = "08bae1d1cc2ba9f7f883a25afd07f0339a82fa8b" | 12 | SRCREV = "08bae1d1cc2ba9f7f883a25afd07f0339a82fa8b" |
11 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
@@ -41,8 +43,24 @@ do_install () { | |||
41 | echo "#!/bin/sh" > ${D}${bindir}/cloud9 | 43 | echo "#!/bin/sh" > ${D}${bindir}/cloud9 |
42 | echo "node /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000" >> ${D}${bindir}/cloud9 | 44 | echo "node /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000" >> ${D}${bindir}/cloud9 |
43 | chmod 0755 ${D}${bindir}/cloud9 | 45 | chmod 0755 ${D}${bindir}/cloud9 |
46 | |||
47 | install -d ${D}${base_libdir}/systemd/system | ||
48 | install -m 0644 ${WORKDIR}/*.service ${base_libdir}/systemd/system/ | ||
44 | } | 49 | } |
45 | 50 | ||
51 | |||
46 | FILES_${PN}-dbg += "/usr/share/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/.debug" | 52 | FILES_${PN}-dbg += "/usr/share/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/.debug" |
53 | |||
54 | FILES_${PN} += "${base_libdir}/systemd/system" | ||
47 | RDEPENDS_${PN} = "nodejs gzip" | 55 | RDEPENDS_${PN} = "nodejs gzip" |
48 | 56 | ||
57 | pkg_postinst_${PN} () { | ||
58 | # can't do this offline | ||
59 | if [ "x$D" != "x" ]; then | ||
60 | exit 1 | ||
61 | fi | ||
62 | |||
63 | if [ -e ${base_bindir}/systemctl ] ; then | ||
64 | systemctl enable cloud9.service | ||
65 | fi | ||
66 | } | ||