From 5da408b1d43bde73dc663f428afd4a56005212a2 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:58:01 +0100 Subject: [PATCH] fix wrong file provided as ts-calibrate.service [release 1.0.0.git20110130-4mamba;Sun Apr 14 2013] --- README.md | 4 + libts-1.0-enable_input_interface.patch | 10 +++ libts.spec | 120 +++++++++++++++++++++++++ ts-calibrate-init | 21 +++++ ts-calibrate.conf.sample | 6 ++ ts-calibrate.service | 13 +++ 6 files changed, 174 insertions(+) create mode 100644 libts-1.0-enable_input_interface.patch create mode 100644 libts.spec create mode 100644 ts-calibrate-init create mode 100644 ts-calibrate.conf.sample create mode 100644 ts-calibrate.service diff --git a/README.md b/README.md index 1c12f8c..6fc8aea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # libts +Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. It was created by Russell King, of arm.linux.org.uk. Examples of implemented filters include jitter smoothing and the calibration transform. + +Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality. It is supported by Kdrive (aka TinyX) and OPIE as well as being used on a number of commercial Linux devices including the Nokia 770. + diff --git a/libts-1.0-enable_input_interface.patch b/libts-1.0-enable_input_interface.patch new file mode 100644 index 0000000..2fbcb60 --- /dev/null +++ b/libts-1.0-enable_input_interface.patch @@ -0,0 +1,10 @@ +diff -Nru tslib-1.0.orig//etc/ts.conf tslib-1.0/etc/ts.conf +--- tslib-1.0.orig//etc/ts.conf 2006-08-24 23:02:55.000000000 +0200 ++++ tslib-1.0/etc/ts.conf 2011-01-20 19:26:12.176541145 +0100 +@@ -1,5 +1,5 @@ + # Uncomment if you wish to use the linux input layer event interface +-# module_raw input ++module_raw input + + # Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d + # module_raw collie diff --git a/libts.spec b/libts.spec new file mode 100644 index 0000000..55a09be --- /dev/null +++ b/libts.spec @@ -0,0 +1,120 @@ +Name: libts +Version: 1.0.0.git20110130 +Release: 4mamba +Summary: An abstraction library for touchscreen panel events +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://tslib.berlios.de/ +Source: http://download.berlios.de/tslib/tslib-%{version}.tar.bz2 +Source1: ts-calibrate-init +Source2: ts-calibrate.conf.sample +Source3: ts-calibrate.service +Patch0: %{name}-1.0-enable_input_interface.patch +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. It was created by Russell King, of arm.linux.org.uk. Examples of implemented filters include jitter smoothing and the calibration transform. + +Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality. It is supported by Kdrive (aka TinyX) and OPIE as well as being used on a number of commercial Linux devices including the Nokia 770. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. It was created by Russell King, of arm.linux.org.uk. Examples of implemented filters include jitter smoothing and the calibration transform. + +Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality. It is supported by Kdrive (aka TinyX) and OPIE as well as being used on a number of commercial Linux devices including the Nokia 770. + +This package contains static libraries and header files need for development. + +%prep +%setup -q -n tslib-%{version} +%patch0 -p1 + +%build +#./autogen.sh +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +ln -s libts-1.0.so.0 %{buildroot}%{_libdir}/libts-1.0.so + +install -D -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/ts-calibrate +install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ts-calibrate.conf.sample +install -D -m0644 %{SOURCE3} %{buildroot}/lib/systemd/system/ts-calibrate.service + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post +if [ $1 -eq 1 ]; then +# new install + chkconfig --add ts-calibrate +fi +/sbin/ldconfig +exit 0 + +%preun +if [ $1 -eq 0 ]; then +# erase + chkconfig --del ts-calibrate +fi +exit 0 + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_sysconfdir}/ts.conf +%{_sysconfdir}/ts-calibrate.conf.sample +%{_initrddir}/ts-calibrate +%{_bindir}/ts_calibrate +%{_bindir}/ts_harvest +%{_bindir}/ts_print +%{_bindir}/ts_print_raw +%{_bindir}/ts_test +/lib/systemd/system/ts-calibrate.service +%{_libdir}/libts-1.0.so.* +%dir %{_libdir}/ts +%{_libdir}/ts/* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%{_includedir}/tslib.h +%{_libdir}/libts.la +%{_libdir}/libts.so +%{_libdir}/libts-1.0.so +%{_libdir}/pkgconfig/tslib.pc +%{_libdir}/pkgconfig/tslib-*.pc +%doc ChangeLog README + +%changelog +* Sun Apr 14 2013 Silvan Calarco 1.0.0.git20110130-4mamba +- fix wrong file provided as ts-calibrate.service + +* Sat Apr 13 2013 Silvan Calarco 1.0.0.git20110130-3mamba +- added systemd service file + +* Wed Apr 06 2011 Silvan Calarco 1.0.0.git20110130-2mamba +- added calibration initscript with sample default configutation + +* Sun Jan 30 2011 Silvan Calarco 1.0.0.git20110130-1mamba +- update to 1.0.0.git20110130 + +* Thu Jan 20 2011 Silvan Calarco 1.0-2mamba +- patched ts.conf to enable input module by default + +* Tue Jan 04 2011 Silvan Calarco 1.0-1mamba +- package created by autospec diff --git a/ts-calibrate-init b/ts-calibrate-init new file mode 100644 index 0000000..356654f --- /dev/null +++ b/ts-calibrate-init @@ -0,0 +1,21 @@ +#!/bin/bash +# ts-calibrate - tslib calibration script +# +# chkconfig: 5 97 99 +# description: tslib calibration script +# +# processname: ts_calibrate + +[ -e /etc/ts-calibrate.conf ] || exit 1 + +. /etc/ts-calibrate.conf + +case "$1" in + start) + [ -e /etc/pointercal ] || /usr/bin/ts_calibrate + ;; + *) + echo "Usage: $0 {start}" + exit 1 + ;; +esac diff --git a/ts-calibrate.conf.sample b/ts-calibrate.conf.sample new file mode 100644 index 0000000..f63218d --- /dev/null +++ b/ts-calibrate.conf.sample @@ -0,0 +1,6 @@ +export TSLIB_CONFFILE=/etc/ts.conf +export TSLIB_CONSOLEDEVICE=none +export TSLIB_FBDEVICE=/dev/fb0 +export TSLIB_TSDEVICE=/dev/input/event0 +export TSLIB_CALIBFILE=/etc/pointercal +export HOME=/root diff --git a/ts-calibrate.service b/ts-calibrate.service new file mode 100644 index 0000000..994d8da --- /dev/null +++ b/ts-calibrate.service @@ -0,0 +1,13 @@ +[Unit] +Description=Touchscreen calibration +DefaultDependencies=no +Before=graphical.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/ts_calibrate +EnvironmentFile=/etc/ts-calibrate.conf + +[Install] +WantedBy=graphical.target