%global tarball xf86-input-wacom
%global moduledir %(pkg-config xorg-server --variable=moduledir )
%global driverdir %{moduledir}/input

Summary:        Xorg X11 wacom input driver
Name:           xorg-x11-drv-wacom
Version:        0.39.0
Release:        1%{?_dist_release}
Group:          User Interface/X Hardware Support
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPLv2+
URL:            https://linuxwacom.github.io/
Source0:        https://github.com/linuxwacom/xf86-input-wacom/releases/download/xf86-input-wacom-%{version}/xf86-input-wacom-%{version}.tar.bz2

ExcludeArch:    s390 s390x

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  xorg-x11-server-sdk >= 1.7.0
BuildRequires:  xorg-x11-util-macros >= 1.3.0
BuildRequires:  libX11-devel
BuildRequires:  libXi-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libXinerama-devel
BuildRequires:  glib2-devel
BuildRequires:  eudev-libudev-devel

Requires:       xorg-x11-server-Xorg

Provides:       linuxwacom = %{version}-%{release}
Obsoletes:      linuxwacom <= 0.8.4.3

%description
X.Org X11 wacom input driver for Wacom tablets.


%package devel
Summary:    Xorg X11 wacom input driver development package
Group:      Development/Libraries

Requires: xorg-x11-server-sdk >= 1.7.0
Requires: pkgconfig

%description devel
X.Org X11 wacom input driver development files.


%prep
%setup -q -n %{tarball}-%{version}

%build
%configure \
	--disable-static \
	--without-systemd-unit-dir \
	--with-udev-rules-dir=/lib/udev/rules.d
make %{_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# 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 --

mv $RPM_BUILD_ROOT/lib/udev/rules.d/wacom.rules \
   $RPM_BUILD_ROOT/lib/udev/rules.d/70-wacom.rules

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%license GPL
%doc AUTHORS README.md
%{driverdir}/wacom_drv.so
%{_mandir}/man4/wacom.4*
%{_mandir}/man1/xsetwacom.1*
%{_datadir}/X11/xorg.conf.d/70-wacom.conf
%{_bindir}/xsetwacom
%{_bindir}/isdv4-serial-inputattach
/lib/udev/rules.d/70-wacom.rules

%files devel
%defattr(-,root,root,-)
%license GPL
%{_libdir}/pkgconfig/xorg-wacom.pc
%{_includedir}/xorg/Xwacom.h
%{_includedir}/xorg/isdv4.h
%{_includedir}/xorg/wacom-properties.h
%{_includedir}/xorg/wacom-util.h
%{_bindir}/isdv4-serial-debugger

%changelog
* Sat May 02 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.39.0-1
- new upstream release.
- built with xserver-1.20.8.

* Fri Feb 16 2018 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.36.0-1
- update to 0.36.0
- built with xorg 1.19.6

* Thu May 05 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.32.0-1
- new upstream release

* Sun Oct 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.31.0-1
- new upstream release

* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.29.0-1
- new upstream release

* Sun Nov 23 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.27.0-1
- new upstream release

* Thu Jul 10 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.25.0-1
- new upstream release

* Tue Jun 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.24.0-2
- change BuildRequires: eudev-libudev-devel instead of libudev-devel

* Wed Jun 11 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.24.0-1
- new upstream release
- remove Source1 (70-wacom.rules)

* Thu Dec 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.23.0-1
- new upstream release

* Sun May 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.21.0-1
- new upstream release

* Sun Mar 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.20.0-1
- new upstream release

* Mon Jan 07 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.19.0-1
- new upstream release

* Sun Nov 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.18.0-1
- new upstream release

* Wed Jul 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.16.0-1
- new upstream release

* Sat Jun 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.15.0-1
- new upstream release
- update Source1 (70-wacom.rules) from fedora

* Sun Mar 25 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.14.0-1
- new upstream release

* Sat Mar 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.13.0-1
- new upstream release
- add BuildRequires: libXinerama-devel

* Wed Nov 02 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11.1-3
- rebuild with xserver-1.11.1.902

* Sun Aug 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11.1-2
- update Source1 (70-wacom.rules)

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11.1-1
- new upstream release

* Sat May 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11.0-1
- new upstream release
- add BuildRequires: libudev-devel

* Tue Mar 01 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.11-1
- initial build for Vine Linux


* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.10-3.20101122
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Nov 25 2010 Peter Hutterer <peter.hutterer@redhat.com> - 0.10.10-2.20101122
- Rebuild for server 1.10

* Mon Nov 22 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.10-1
- Update to today's git snapshot (0.10.10), an emergency release.

* Fri Nov 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.9-2
- require libXrandr-devel for xsetwacom

* Fri Nov 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.9-1
- Update to today's git snapshot (0.10.9)

* Wed Oct 27 2010 Adam Jackson <ajax@redhat.com> 0.10.8-3
- Add ABI requires magic (#542742)


* Mon Aug 02 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.8-2
- Update to today's git snapshot.

* Mon Jul 26 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.8-1
- wacom 0.10.8 (from git)

* Thu Jul 08 2010 Adam Jackson <ajax@redhat.com> 0.10.7-4
- Install GPL in -devel too

* Mon Jul 05 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.7-3.20100705
- Update to git to build against newest X server.

* Mon Jul 05 2010 Peter Hutterer <peter.hutterer@redhat.com> - 0.10.7-2.20100621
- rebuild for X Server 1.9

* Mon Jun 21 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.7-1.20100621
- Update to 0.10.7 from git.

* Wed Jun 16 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-6.20100616
- Update to today's git snapshot.

* Thu Jun 03 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-5.2010603
- Update to today's git snapshot.

* Thu Jun 03 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-5.20100521
- Update udev rules file to include Fujitsu serial tablets. (#598168)
- Update udev rules file to set ID_INPUT_TABLET

* Fri May 21 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-4.20100521
- Update to today's git snapshot.
- wacom-0.10.6-serial-identifiers.patch: drop, upstream.

* Tue May 18 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-3.20100427
- Install wacom udev rules file to identify serial devices.

* Tue Apr 27 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-2.20100427
- wacom-0.10.6-serial-identifiers.patch: add some more serial IDs to the
  config file.

* Tue Apr 27 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.6-1.20100427
- wacom 0.10.6 (from git)

* Thu Apr 15 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.5-5.20100325
- Fix up missing directory change from last commit.

* Thu Apr 15 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.5-4.20100325
- Install config snippet in $datadir/X11/xorg.conf.d
- rename to 50-wacom.conf to match upstream naming

* Thu Mar 25 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.5-3.20100325
- Update to today's git snapshot.

* Tue Mar 23 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.5-2.20100319
- Enable the debug properties.

* Fri Mar 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.5-1.20100319
- Update to today's git snapshot (0.10.5)

* Tue Mar 16 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-7.20100316
- Update to today's git snapshot.

* Fri Mar 05 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-6.20100305
- Update to today's git snapshot.

* Thu Mar 04 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-5.20100219
- Fix 10-wacom.conf for N-Trig devices: rename the class (copy/paste error)
  and only take event devices. (Related #526270)

* Fri Feb 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-4.20100219
- Add stuff required to build from upstream git.
- Update to today's git snapshot.

* Wed Feb 17 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-3
- Add 10-wacom.conf, the fdi file doesn't work anymore.
- Drop hal requires.

* Wed Feb 03 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-2
- Update sources to sourceforge, 0.10.4 was released on sf only.
- Remove wacom.fdi, we're just using the one shipped by the driver now.

* Thu Jan 21 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.4-1
- wacom 0.10.4

* Thu Jan 21 2010 Peter Hutterer <peter.hutterer@redhat.com> - 0.10.3-3
- Rebuild for server 1.8

* Tue Jan 05 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.3-2
- BuildRequires and Requires libX11 and libXi for xsetwacom.

* Tue Jan 05 2010 Peter Hutterer <peter.hutterer@redhat.com> 0.10.3-1
- wacom 0.10.3

* Thu Dec 03 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.2-1
- wacom 0.10.2

* Fri Nov 20 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.1-2
- cvs add 10-wacom.fdi, this time really.

* Fri Nov 20 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.1-1
- wacom 0.10.1
- BuildRequires xorg-x11-util-macros 1.3.0
- Remove unnecessary 'find' directive, changed upstream.
- Add GPL document
- Install 10-wacom.fdi file.
- Provides: linuxwacom

* Thu Nov 19 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.0-3
- Use smp_mflags when building.

* Wed Nov 18 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.0-2
- Obsolete linuxwacom, don't Conflict with it.
- Remove trailing dot from summary (rpmlint warning).
- Remove spurious executable bits from source files (rpmlint warning).
- Add AUTHORS, ChangeLog, README to doc

* Mon Oct 19 2009 Peter Hutterer <peter.hutterer@redhat.com> 0.10.0-1
- Initial import

