File xf86-input-libinput.spec of Package xf86-input-libinput
%define realname xf86-input-libinput
%define realver 1.1.0
%define srcext tar.bz2
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: %{realname}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: MIT
Group: System/X11/Servers/XF86_4
URL: https://xorg.freedesktop.org/
Summary: The X.Org libinput driver
# Build-time parameters
BuildRequires: pkg-config
BuildRequires: pkgconfig(xorg-server) >= 1.10
BuildRequires: pkgconfig(inputproto) >= 2.3
BuildRequires: pkgconfig(libinput) >= 1.1.901
BuildRequires: pkgconfig(libudev)
BuildRoot: %{_tmppath}/%{name}-root
Source: https://www.x.org/releases/individual/driver/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
The X.Org libinput driver is a thin wrapper around libinput and allows for
libinput to be used for input devices in X. This driver can be used as as
drop-in replacement for evdev and synaptics. Simply build and install in
your $PREFIX, then install the config file in /etc/X11/xorg.conf.d/.
Restart X and the libinput driver will take over your devices.
%package devel
Group: Development/Libraries/X11
Summary: Development files for %{name}
%description devel
Development files for %{name}
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%build
%configure \
--disable-static \
CFLAGS="%{optflags} %{?gcc_lto}" \
CXXFLAGS="%{optflags} %{?gcc_lto}" \
LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING README.md
%dir %{_libdir}/xorg/modules/input
%{_libdir}/xorg/modules/input/libinput_drv.so
%exclude %{_libdir}/xorg/modules/input/libinput_drv.la
%{_datadir}/X11/xorg.conf.d/40-libinput.conf
%doc %{_mandir}/man4/libinput.4*
# Development stuff
%files devel
%defattr(-,root,root)
%doc COPYING README.md
%dir %{_includedir}/xorg
%{_includedir}/xorg/libinput-properties.h
%{_libdir}/pkgconfig/xorg-libinput.pc
%changelog