[oe-commits] Martin Jansa : xinput-calibrator: add xinput to RDEPENDS and script to calibrate only once and store calibration data for later use

git version control git at git.openembedded.org
Sun Jan 31 01:06:44 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: 48dd2427c14edb8349e9f16150ad0f9c037c2ab8
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=48dd2427c14edb8349e9f16150ad0f9c037c2ab8

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Sun Jan 31 01:44:14 2010 +0100

xinput-calibrator: add xinput to RDEPENDS and script to calibrate only once and store calibration data for later use

* xinput is used when we want to make the changes permanent (xinput is
  called with every Xorg start
* xinput_calibrator_once.sh can be used from Xsession.d
* calibration data are stored in /etc/pointercal.xinput
* whole log from last run in /etc/pointercal.xinput.log
* script needs tee and sed (busybox variants are enough)

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../xinput_calibrator_once.sh                      |   11 +++++++++++
 .../xinput-calibrator/xinput-calibrator_0.5.0.bb   |    5 ++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh b/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh
new file mode 100644
index 0000000..82fcfc6
--- /dev/null
+++ b/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+if [ -e /etc/pointercal.xinput ] ; then
+  echo Using calibration data stored in /etc/pointercal.xinput
+  . /etc/pointercal.xinput
+else
+  CAL=`/usr/bin/xinput_calibrator | tee /etc/pointercal.xinput.log | grep xinput| sed 's/^ //g; s/$/;/g'`
+  if [ ! -z "$CAL" ] ; then
+    echo $CAL > /etc/pointercal.xinput
+    echo Calibration data stored in /etc/pointercal.xinput
+  fi
+fi
diff --git a/recipes/xinput-calibrator/xinput-calibrator_0.5.0.bb b/recipes/xinput-calibrator/xinput-calibrator_0.5.0.bb
index 43f77ee..8390b30 100644
--- a/recipes/xinput-calibrator/xinput-calibrator_0.5.0.bb
+++ b/recipes/xinput-calibrator/xinput-calibrator_0.5.0.bb
@@ -1,17 +1,20 @@
 DEPENDS = "virtual/libx11 libxi"
+RDEPENDS = "xinput"
 
 SRCREV  = "1c715824334c5d33085dba02f195c9720c2883b5"
 SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git \
            file://xinput-calibrator.desktop \
+           file://xinput_calibrator_once.sh \
 "
 
-PR = "r3"
+PR = "r4"
 inherit autotools
 S = "${WORKDIR}/git/"
 
 do_install() {
 	install -d ${D}${bindir}
 	install -m 0755 src/xinput_calibrator_x11 ${D}${bindir}/xinput_calibrator
+	install -m 0755 ${WORKDIR}/xinput_calibrator_once.sh ${D}${bindir}/xinput_calibrator_once.sh
 	install -d ${D}${datadir}/applications/	
 	install -m 0755 ${WORKDIR}/xinput-calibrator.desktop ${D}${datadir}/applications/xinput-calibrator.desktop	
 }





More information about the Openembedded-commits mailing list