aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-11-30 00:27:16 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2012-02-13 17:24:12 +0100
commitc4c3b6bf47fa30f147389928c7872564d9aad0ab (patch)
tree191366bdd1be131a963ebd2ce254e9905d17e267
parentd5e771221726523ac5cc00790b71d45877aed68d (diff)
downloadmeta-openembedded-contrib-c4c3b6bf47fa30f147389928c7872564d9aad0ab.tar.gz
meta-openembedded-contrib-c4c3b6bf47fa30f147389928c7872564d9aad0ab.tar.bz2
meta-openembedded-contrib-c4c3b6bf47fa30f147389928c7872564d9aad0ab.zip
xinput-calibrator: add systemd service
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service11
-rw-r--r--meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.7.5.bb16
2 files changed, 24 insertions, 3 deletions
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 0000000000..e23bfc4f1f
--- /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 0c75293f5a..a686a42d5c 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,11 +4,12 @@ LICENSE = "MIT-X"
LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=998e238a7638a7446eaeb02398f691fc"
DEPENDS = "virtual/libx11 libxi"
-PR = "r1"
+PR = "r2"
-inherit autotools
+inherit autotools systemd
-SRC_URI = "http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-${PV}.tar.gz"
+SRC_URI = "http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-${PV}.tar.gz \
+ file://xinput-calibrator.service"
SRC_URI[md5sum] = "20da0a2055a5a75962add8c6b44f60fa"
SRC_URI[sha256sum] = "baa4ddca49ec94c27ba4c715bfa26692fec1132103e927213c3169e475d3d971"
@@ -18,7 +19,16 @@ do_install_append() {
install -d ${D}${bindir}
install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
install -m 0755 scripts/xinput_calibrator_get_hal_calibration.sh ${D}${bindir}/xinput_calibrator_get_hal_calibration.sh
+ install -d ${D}${base_libdir}/systemd/system/
+ install -m 0644 ${WORKDIR}/${PN}.service ${D}${base_libdir}/systemd/system/${PN}.service
}
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "${PN}.service"
+
+PACKAGES =+ "${PN}-systemd"
+FILES_${PN}-systemd += "${base_libdir}/systemd"
+
RDEPENDS_${PN} = "xinput"
+RDEPENDS_${PN}-systemd += "${PN}"
RRECOMMENDS_${PN} = "pointercal-xinput"