Patchwork [meta-oe,4/4] xinput-calibrator: add systemd service

login
register
mail settings
Submitter Martin Jansa
Date March 28, 2012, 11:25 a.m.
Message ID <0167d303b04185f56e7dd408b4fb13a9307becb1.1332933826.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/24737/
State Accepted
Commit be2ae063d1586301713a0dc466bfe44e2f598cb1
Headers show

Comments

Martin Jansa - March 28, 2012, 11:25 a.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../xinput-calibrator/xinput-calibrator.service    |   11 +++++++++++
 .../xinput-calibrator/xinput-calibrator_0.7.5.bb   |   11 ++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service

Patch

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
new file mode 100644
index 0000000..e23bfc4
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
@@ -0,0 +1,11 @@ 
+[Unit]
+Description=Loads xinput calibration data
+ConditionPathExists=/etc/pointercal.xinput
+Requires=xserver-nodm.service
+After=xserver-nodm.service
+
+[Service]
+ExecStart=/usr/bin/xinput_calibrator_once.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.7.5.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.7.5.bb
index e39cc44..d823e0e 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.7.5.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.7.5.bb
@@ -4,12 +4,14 @@  LICENSE = "MIT-X"
 LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=998e238a7638a7446eaeb02398f691fc"
 DEPENDS = "virtual/libx11 libxi"
 
-PR = "r3"
+PR = "r4"
 
-inherit autotools
+inherit autotools systemd
 
 SRC_URI = "http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-${PV}.tar.gz \
-           file://0001-xinput_calibrator_pointercal.sh-specify-output-type-.patch"
+           file://0001-xinput_calibrator_pointercal.sh-specify-output-type-.patch \
+           file://xinput-calibrator.service \
+"
 SRC_URI[md5sum] = "20da0a2055a5a75962add8c6b44f60fa"
 SRC_URI[sha256sum] = "baa4ddca49ec94c27ba4c715bfa26692fec1132103e927213c3169e475d3d971"
 
@@ -23,5 +25,8 @@  do_install_append() {
         install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
 }
 
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "${PN}.service"
+
 RDEPENDS_${PN} = "xinput"
 RRECOMMENDS_${PN} = "pointercal-xinput"