!1 package init
From: @dou33 Reviewed-by: @handsome_feng Signed-off-by: @handsome_feng
This commit is contained in:
commit
628881b770
76
70-synaptics.conf
Normal file
76
70-synaptics.conf
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Section "InputClass"
|
||||||
|
Identifier "touchpad catchall"
|
||||||
|
Driver "synaptics"
|
||||||
|
MatchIsTouchpad "on"
|
||||||
|
MatchDevicePath "/dev/input/event*"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
# This option enables the bottom right corner to be a right button on
|
||||||
|
# non-synaptics clickpads.
|
||||||
|
# This option is only interpreted by clickpads.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Default clickpad buttons"
|
||||||
|
MatchDriver "synaptics"
|
||||||
|
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
|
||||||
|
Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
# This option disables software buttons on Apple touchpads.
|
||||||
|
# This option is only interpreted by clickpads.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Disable clickpad buttons on Apple touchpads"
|
||||||
|
MatchProduct "Apple|bcm5974"
|
||||||
|
MatchDriver "synaptics"
|
||||||
|
Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
# Quirks for special touchpads
|
||||||
|
|
||||||
|
# The Cypress touchpads provide BTN_RIGHT in firmware, together with
|
||||||
|
# clickfinger, and two-finger scrolling. Disable Clickpads, otherwise we
|
||||||
|
# get flaky button behaviour.
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=70819
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=76341
|
||||||
|
#
|
||||||
|
# This really is a kernel issue, as the kernel should simply not report these
|
||||||
|
# as clickpads. This has been fixed in 3.13.9 and later, this section
|
||||||
|
# should be removed in the future
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Disable clickpad for CyPS/2 Cypress Trackpad"
|
||||||
|
MatchProduct "CyPS/2 Cypress Trackpad"
|
||||||
|
MatchDriver "synaptics"
|
||||||
|
Option "ClickPad" "off"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
# Some devices have the buttons as part of the lower edge of the
|
||||||
|
# touchpad. Pressing a button moves the cursor, causing cursor jumps and
|
||||||
|
# erroneous clicks.
|
||||||
|
# Use the synaptics area property to work around this, udev labels these
|
||||||
|
# devices for us as touchpad_button_overlap.
|
||||||
|
# Affected: Dell Mini
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "touchpad button overlap"
|
||||||
|
MatchIsTouchpad "on"
|
||||||
|
MatchTag "touchpad_button_overlap"
|
||||||
|
Option "AreaBottomEdge" "4000"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
# Some devices have the buttons on the top of the touchpad. For those, set
|
||||||
|
# the secondary button area to exactly that.
|
||||||
|
# Affected: All Haswell Lenovos and *431* models
|
||||||
|
#
|
||||||
|
# Note the touchpad_softbutton_top tag is a temporary solution, we're working
|
||||||
|
# on a more permanent solution upstream (likely adding INPUT_PROP_TOPBUTTONPAD)
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Lenovo TrackPoint top software buttons"
|
||||||
|
MatchDriver "synaptics"
|
||||||
|
MatchTag "touchpad_softbutton_top"
|
||||||
|
Option "HasSecondarySoftButtons" "on"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Lenovo *50 and Carbon 3rd trackpoint buttons"
|
||||||
|
MatchDriver "synaptics"
|
||||||
|
MatchTag "has_trackpoint_buttons"
|
||||||
|
Option "HasTrackpointButtons" "on"
|
||||||
|
EndSection
|
||||||
27
70-touchpad-quirks.rules
Normal file
27
70-touchpad-quirks.rules
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
ACTION!="add|change", GOTO="touchpad_quirks_end"
|
||||||
|
KERNEL!="event*", GOTO="touchpad_quirks_end"
|
||||||
|
|
||||||
|
ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="touchpad_quirks_end"
|
||||||
|
|
||||||
|
# model specific quirks
|
||||||
|
|
||||||
|
# Dell Minis have a touchpad where the buttons and the touchpad area
|
||||||
|
# overlap. Clicking a button thus moves the pointer, this requires special
|
||||||
|
# Xorg configuration.
|
||||||
|
|
||||||
|
ATTR{[dmi/id]product_name}=="Inspiron 1011|Inspiron 1012", \
|
||||||
|
ENV{ID_INPUT.tags}="touchpad_button_overlap"
|
||||||
|
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad X240*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad Edge E431*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad T431*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad L440*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad T440*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad L540*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad T540*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad W540*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad Helix*" ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad S1 Yoga", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
ATTR{[dmi/id]product_version}=="ThinkPad X1 Carbon 2nd*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
|
||||||
|
|
||||||
|
LABEL="touchpad_quirks_end"
|
||||||
BIN
xf86-input-synaptics-1.9.1.tar.bz2
Normal file
BIN
xf86-input-synaptics-1.9.1.tar.bz2
Normal file
Binary file not shown.
167
xorg-x11-drv-synaptics.spec
Normal file
167
xorg-x11-drv-synaptics.spec
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
%global tarball xf86-input-synaptics
|
||||||
|
%global moduledir %(pkg-config xorg-server --variable=moduledir )
|
||||||
|
%global driverdir %{moduledir}/input
|
||||||
|
|
||||||
|
#global gitdate 20160929
|
||||||
|
#global gitversion 48632211
|
||||||
|
|
||||||
|
Name: xorg-x11-drv-synaptics
|
||||||
|
Summary: Xorg X11 Synaptics touchpad input driver
|
||||||
|
Version: 1.9.1
|
||||||
|
Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}
|
||||||
|
URL: http://www.x.org
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
%if 0%{?gitdate}
|
||||||
|
Source0: %{tarball}-%{gitdate}.tar.bz2
|
||||||
|
Source1: make-git-snapshot.sh
|
||||||
|
Source2: commitid
|
||||||
|
%else
|
||||||
|
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
|
||||||
|
%endif
|
||||||
|
Source3: 70-synaptics.conf
|
||||||
|
Source4: 70-touchpad-quirks.rules
|
||||||
|
|
||||||
|
ExcludeArch: s390 s390x
|
||||||
|
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: autoconf automake libtool pkgconfig
|
||||||
|
BuildRequires: xorg-x11-server-devel >= 1.10.99.902
|
||||||
|
BuildRequires: libX11-devel libXi-devel libXtst-devel
|
||||||
|
BuildRequires: xorg-x11-util-macros >= 1.8.0
|
||||||
|
BuildRequires: libevdev-devel
|
||||||
|
BuildRequires: systemd
|
||||||
|
|
||||||
|
Requires: Xorg
|
||||||
|
#Requires: Xorg %(xserver-sdk-abi-requires ansic)
|
||||||
|
#Requires: Xorg %(xserver-sdk-abi-requires xinput)
|
||||||
|
Requires: libevdev
|
||||||
|
Requires: libXi libXtst
|
||||||
|
|
||||||
|
Provides: synaptics = %{version}-%{release}
|
||||||
|
Obsoletes: synaptics < 0.15.0
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package is a an empty package. For the legacy X.Org touchpad driver,
|
||||||
|
please install xorg-x11-drv-synaptics legacy.
|
||||||
|
|
||||||
|
%package legacy
|
||||||
|
Summary: Xorg X11 synaptics input driver
|
||||||
|
Requires: pkgconfig
|
||||||
|
|
||||||
|
%description legacy
|
||||||
|
This is the Synaptics touchpad driver for the X.Org X server. The following
|
||||||
|
touchpad models are supported:
|
||||||
|
* Synaptics
|
||||||
|
* appletouch (Post February 2005 and October 2005 Apple Aluminium Powerbooks)
|
||||||
|
* Elantech (EeePC)
|
||||||
|
* bcm5974 (Macbook Air (Jan 2008), Macbook Pro Penryn (Feb 2008), iPhone
|
||||||
|
(2007), iPod Touch (2008)
|
||||||
|
|
||||||
|
Note that support for appletouch, elantech and bcm5974 requires the respective
|
||||||
|
kernel module.
|
||||||
|
A touchpad by default operates in compatibility mode by emulating a standard
|
||||||
|
mouse. However, by using a dedicated driver, more advanced features of the
|
||||||
|
touchpad become available.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
* Movement with adjustable, non-linear acceleration and speed.
|
||||||
|
* Button events through short touching of the touchpad ("tapping").
|
||||||
|
* Double-Button events through double short touching of the touchpad.
|
||||||
|
* Dragging through short touching and holding down the finger on the
|
||||||
|
touchpad.
|
||||||
|
* Middle and right button events on the upper and lower corner of the
|
||||||
|
touchpad.
|
||||||
|
* Vertical scrolling (button four and five events) through moving the
|
||||||
|
finger on the right side of the touchpad.
|
||||||
|
* The up/down button sends button four/five events.
|
||||||
|
* Horizontal scrolling (button six and seven events) through moving the
|
||||||
|
finger on the lower side of the touchpad.
|
||||||
|
* The multi-buttons send button four/five events, and six/seven events for
|
||||||
|
horizontal scrolling.
|
||||||
|
* Adjustable finger detection.
|
||||||
|
Multifinger taps: two finger for middle button and three finger for
|
||||||
|
right button events. (Needs hardware support. Not all models implement
|
||||||
|
this feature.)
|
||||||
|
* Run-time configuration using shared memory. This means you can change
|
||||||
|
parameter settings without restarting the X server.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||||
|
|
||||||
|
git init
|
||||||
|
if [ -z "$GIT_COMMITTER_NAME" ]; then
|
||||||
|
git config user.email "x@fedoraproject.org"
|
||||||
|
git config user.name "Fedora X Ninjas"
|
||||||
|
fi
|
||||||
|
%if !0%{?gitdate}
|
||||||
|
git add .
|
||||||
|
git commit -a -q -m "%{version} baseline."
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Apply all the patches.
|
||||||
|
git am -p1 %{patches} < /dev/null
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -v --install --force || exit 1
|
||||||
|
%configure --disable-static --disable-silent-rules
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
# FIXME: Remove all libtool archives (*.la) from modules directory. This
|
||||||
|
# should be fixed in upstream Makefile.am or whatever.
|
||||||
|
find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f --
|
||||||
|
|
||||||
|
# Remove upstream synaptics.conf as we've several special fixes in ours
|
||||||
|
rm $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/70-synaptics.conf
|
||||||
|
|
||||||
|
install -d $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d
|
||||||
|
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/70-synaptics.conf
|
||||||
|
|
||||||
|
install -d $RPM_BUILD_ROOT%{_udevrulesdir}
|
||||||
|
install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_udevrulesdir}/70-touchpad-quirks.rules
|
||||||
|
|
||||||
|
%post
|
||||||
|
udevadm control --reload-rules || :
|
||||||
|
|
||||||
|
%postun
|
||||||
|
udevadm control --reload-rules || :
|
||||||
|
|
||||||
|
# NOTE: xorg-x11-drv-synaptics is obsoleted by xorg-x11-drv-libinput.
|
||||||
|
# The main package does not have any files anymore and thus does not
|
||||||
|
# generate an rpm. xorg-x11-drv-libinput can thus easily obsolete < 1.9.0-3,
|
||||||
|
# the synaptics files are now in xorg-x11-drv-legacy only.
|
||||||
|
#
|
||||||
|
# DO NOT CHANGE THIS.
|
||||||
|
#
|
||||||
|
%files legacy
|
||||||
|
%doc README
|
||||||
|
%license COPYING
|
||||||
|
%{_datadir}/X11/xorg.conf.d/70-synaptics.conf
|
||||||
|
%{driverdir}/synaptics_drv.so
|
||||||
|
%{_bindir}/synclient
|
||||||
|
%{_bindir}/syndaemon
|
||||||
|
%{_mandir}/man4/synaptics.4*
|
||||||
|
%{_mandir}/man1/synclient.1*
|
||||||
|
%{_mandir}/man1/syndaemon.1*
|
||||||
|
%{_udevrulesdir}/70-touchpad-quirks.rules
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Xorg X11 synaptics input driver
|
||||||
|
Requires: pkgconfig
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Development files for the Synaptics TouchPad for X.Org.
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license COPYING
|
||||||
|
%{_libdir}/pkgconfig/xorg-synaptics.pc
|
||||||
|
%dir %{_includedir}/xorg
|
||||||
|
%{_includedir}/xorg/synaptics-properties.h
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Nov 2 2020 douyan <douyan@kylinos.cn> - 1.9.1-3
|
||||||
|
- package init
|
||||||
Loading…
x
Reference in New Issue
Block a user