People using xserver-xorg that need to calibrate their touchscreen devices would also need meta-oe. Bringing the recipes to oe-core will make it easier for them.
Aditionaly, drop xterm RDEPENDS. Terminal is not needed to run the menu item. [YOCTO #4416] Signed-off-by: Laurentiu Palcu <laurentiu.pa...@intel.com> --- .../pointercal-xinput/pointercal.xinput | 1 + .../xinput-calibrator/pointercal-xinput_0.0.bb | 17 ++++++++ .../xinput-calibrator/xinput-calibrator.service | 11 ++++++ .../xinput-calibrator/xinput-calibrator_git.bb | 41 ++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput create mode 100644 meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb create mode 100644 meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service create mode 100644 meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb diff --git a/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput b/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput new file mode 100644 index 0000000..9633fc5 --- /dev/null +++ b/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput @@ -0,0 +1 @@ +# replace with valid machine specific pointercal.xinput diff --git a/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb b/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb new file mode 100644 index 0000000..8423640 --- /dev/null +++ b/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Touchscreen calibration data from xinput-calibrator" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://pointercal.xinput" +S = "${WORKDIR}" + +do_install() { + # Only install file if it has a contents + if [ -s ${S}/pointercal.xinput ]; then + install -d ${D}${sysconfdir}/ + install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/ + fi +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput" diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service new file mode 100644 index 0000000..2301876 --- /dev/null +++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service @@ -0,0 +1,11 @@ +[Unit] +Description=Loads xinput calibration data +ConditionPathExists=/etc/pointercal.xinput +Requires=display-manager.service +After=display-manager.service + +[Service] +ExecStart=/usr/bin/xinput_calibrator_once.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb new file mode 100644 index 0000000..31e20f7 --- /dev/null +++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "A generic touchscreen calibration program for X.Org" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xinput_calibrator" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f34021557898e4b5a" +DEPENDS = "virtual/libx11 libxi" + +PV = "0.7.5+git${SRCPV}" + +inherit autotools systemd + +SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111" +SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git \ + file://xinput-calibrator.service" + +S = "${WORKDIR}/git" + +# force native X11 ui as we don't have gtk+ in DEPENDS +EXTRA_OECONF += "--with-gui=x11" + +do_install_append() { + install -d ${D}${bindir} + install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh + + install -d ${D}${sysconfdir}/xdg/autostart + sed -i -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' scripts/xinput_calibrator.desktop + install -m 0644 scripts/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart + + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/xinput-calibrator.service ${D}${systemd_unitdir}/system + fi +} + +FILES_${PN} += "${sysconfdir}/xdg/autostart" +RDEPENDS_${PN} = "xinput" +RRECOMMENDS_${PN} = "pointercal-xinput" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${PN}.service" -- 1.7.9.5 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core