File xf86-input-wacom.spec of Package xf86-input-wacom

#
# spec file for package xf86-input-wacom
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190
%define _udevrulesdir /usr/lib/udev/rules.d
%else
%define _udevrulesdir /lib/udev/rules.d
%endif

Name:           xf86-input-wacom
Version:        0.19.0
Release:        0
Summary:        Wacom input driver for the Xorg X server
License:        GPL-2.0+
Group:          System/X11/Servers/XF86_4
Url:            http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Xf86-input-wacom
Source0:        http://downloads.sourceforge.net/project/linuxwacom/xf86-input-wacom/%{name}-%{version}.tar.bz2
Source1:        65-xorg-wacom.rules
BuildRequires:  pkg-config
# For directory ownership
BuildRequires:  udev
BuildRequires:  pkgconfig(inputproto)
BuildRequires:  pkgconfig(kbproto)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(randrproto)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xorg-macros) >= 1.8
BuildRequires:  pkgconfig(xorg-server) >= 1.7.0
BuildRequires:  pkgconfig(xproto)
BuildRequires:  pkgconfig(xrandr)
Requires:       udev
Supplements:    xorg-x11-server
# This was part of the xorg-x11-driver-input package up to version 7.6
Conflicts:      xorg-x11-driver-input <= 7.6
Provides:       x11-input-wacom = %{version}
Obsoletes:      x11-input-wacom < %{version}
Provides:       x11-input-wacom-tools = %{version}
Obsoletes:      x11-input-wacom-tools < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x
%x11_abi_xinput_req

%description
wacom is an X input driver for Wacom devices.

%package devel
Summary:        Wacom input driver for the Xorg X server -- Development Files
Group:          Development/Libraries/X11
Requires:       %{name} = %{version}
Provides:       x11-input-wacom-devel = %{version}
Obsoletes:      x11-input-wacom-devel < %{version}

%description devel
wacom is an X input driver for Wacom devices.

%prep
%setup -q

%build
%configure --with-xorg-conf-dir=/etc/X11/xorg.conf.d
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_udevrulesdir}/65-xorg-wacom.rules

%post
# re-plug the input devices
udevadm trigger --subsystem-match=input --action=change
exit 0

%postun
# re-plug the input devices
udevadm trigger --subsystem-match=input --action=change
exit 0

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog GPL README
%{_udevrulesdir}/65-xorg-wacom.rules
%config %{_sysconfdir}/X11/xorg.conf.d/50-wacom.conf
%dir %{_libdir}/xorg/modules/input
%{_libdir}/xorg/modules/input/wacom_drv.so
%{_bindir}/xsetwacom
%{_datadir}/man/man1/xsetwacom.1%{?ext_man}
%{_datadir}/man/man4/wacom.4%{?ext_man}

%files devel
%defattr(-,root,root)
%{_includedir}/xorg/Xwacom.h
%{_includedir}/xorg/isdv4.h
%{_includedir}/xorg/wacom-properties.h
%{_includedir}/xorg/wacom-util.h
# not useful for most people
%{_bindir}/isdv4-serial-debugger
%{_libdir}/pkgconfig/xorg-wacom.pc

%changelog
openSUSE Build Service is sponsored by