LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xf86-input-wacom.spec of Package xf86-input-wacom (Project home:mrbadguy:wacom)

#
# spec file for package xf86-input-wacom
#
# Copyright (c) 2015 SUSE LINUX 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 0%( test -d /usr/lib/udev/rules.d && echo "1" ) > 0
%define _udevrulesdir /usr/lib/udev/rules.d
%else
%define _udevrulesdir /lib/udev/rules.d
%endif
%define install_serial 1

Name:           xf86-input-wacom
Version:        0.36.1
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
Patch7:         n_01-Add-option-to-enable-logging.patch
Patch8:         n_02-Log-PROXIMITY-LOW-LEVEL-events.patch
Patch9:         n_03-Log-PRESSURE-low-level-events.patch
Patch10:        n_04-Log-BUTTON-HIGH-LEVEL-events.patch
BuildRequires:  pkg-config
%if %{suse_version} > 1230
BuildRequires:  systemd-rpm-macros
%else
BuildRequires:  systemd
%endif
# For directory ownership
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(inputproto)
BuildRequires:  pkgconfig(kbproto)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(randrproto)
BuildRequires:  pkgconfig(udev)
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:       input-utils
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 and utilities 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 and utilities for Wacom devices.

%prep
%setup -q
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1

%build
autoreconf
%configure --with-xorg-conf-dir=/etc/X11/xorg.conf.d --enable-logging --with-systemd-unit-dir=%{_unitdir} --with-udev-rules-dir=%{_udevrulesdir}
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
mv %{buildroot}%{_udevrulesdir}/wacom.rules  %{buildroot}%{_udevrulesdir}/65-wacom.rules
# if we don't package these remove them so no debuginfo files will be generated
%{!?install_serial: rm %{buildroot}%{_bindir}/isdv4-serial-inputattach %{buildroot}%{_bindir}/isdv4-serial-debugger}

%post
test -n "$FIRST_ARG" || FIRST_ARG=$1
if [ $FIRST_ARG -eq 1 ]; then
%if %suse_version > 1230
    %udev_rules_update
%else
    udevadm control --reload >/dev/null 2>&1 || : \
%endif
    /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# re-plug the input devices
udevadm trigger --subsystem-match=input --action=change
exit 0

%postun
test -n "$FIRST_ARG" || FIRST_ARG=$1
if [ $FIRST_ARG -le 1 ]; then
%if %suse_version > 1230
    %udev_rules_update
%else
    udevadm control --reload >/dev/null 2>&1 || : \
%endif
    /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# re-plug the input devices
udevadm trigger --subsystem-match=input --action=change
exit 0

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog GPL
%{!?install_serial:%exclude} %{_udevrulesdir}/65-wacom.rules
%{!?install_serial:%exclude} %{_unitdir}/wacom-inputattach@.service
%config %{_sysconfdir}/X11/xorg.conf.d/70-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}
%{?install_serial:%{_bindir}/isdv4-serial-inputattach}

%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
%{?install_serial:%{_bindir}/isdv4-serial-debugger}
%{_libdir}/pkgconfig/xorg-wacom.pc

%changelog