%define tarball xf86-video-vmware
%define moduledir %(pkg-config xorg-server --variable=moduledir )
%define driverdir	%{moduledir}/drivers

Summary:   Xorg X11 vmware video driver
Summary(ja):   Xorg X11 vmware ビデオドライバ
Name:      xorg-x11-drv-vmware
Version:   13.1.0
Release:   3%{?_dist_release}
URL:       http://www.x.org
License:   MIT
Group:     User Interface/X Hardware Support

Source0:   ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
Source1:   vmware.xinf

# upstream patch to fix undefined symbol
# https://bugs.freedesktop.org/show_bug.cgi?id=24541
# http://bts.vinelinux.org/VineLinux/823
Patch0:    xorg-x11-drv-vmware-10.16.8-fdo24541.patch

ExclusiveArch: %{ix86} x86_64 ia64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: xorg-x11-server-sdk
BuildRequires: mesa-libxatracker-devel
Requires:  hwdata
Requires:  xorg-x11-server-Xorg

Vendor: Project Vine
Distribution: Vine Linux

%description 
X.Org X11 vmware video driver.

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

# %patch0 -p1 -b .fdo24541

%build
%configure --disable-static
make

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_datadir}/hwdata/videoaliases
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/hwdata/videoaliases/

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

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{driverdir}/vmware_drv.so
%{_datadir}/hwdata/videoaliases/vmware.xinf
%{_mandir}/man4/vmware.4*

%changelog
* Sat Nov 21 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.1.0-3
- fix typo

* Sun Oct 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.1.0-2
- rebuild with xserver-1.17.2

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

* Sun Nov 23 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.0.2-3
- rebuild with xserver-1.16.2

* Thu Jul 10 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.0.2-2
- rebuild with xserver-1.15.2

* Wed Apr 23 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.0.2-1
- new upstream release
- add BuildRequires: mesa-libxatracker-devel

* Thu Dec 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 13.0.1-2
- rebuild with VineSeed environment

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

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

* Sun Jan 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.1.0-1
- new upstream release

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

* Mon Feb 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.3-2
- rebuild with xserver-1.10.0

* Sat Dec 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.3-1
- new upstream release

* Sun Nov 07 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.2-2
- rebuild with xserver-1.9.2

* Tue Aug 24 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.2-1
- new upstream release

* Fri Mar 26 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 11.0.1-2
- rebuilt with xserver-1.8rc

* Sun Mar 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.1-1
- new upstream release

* Sun Feb 28 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 11.0.0-1
- new upstream release
- drop Patch0

* Sun Nov 22 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.8-2
- add patch0 to fix undefined symbols
  - https://bugs.freedesktop.org/show_bug.cgi?id=24541
  - http://bts.vinelinux.org/VineLinux/823

* Thu Nov 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.8-1
- new upstream release

* Wed May 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.6-1
- new upstream release
- remove upstream patch0

* Thu Apr 30 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.5-3
- add Patch0: Automatically add modelines for the driver's 
              built-in set of modes. (xserver >= 1.2)
  (fix <BTS:695>)

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.5-2
- rebuild with X server 1.6.0

* Wed Sep 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.5-1
- new upstream release

* Thu Jul 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.4-1
- new upstream release

* Fri Jul 04 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.2-2
- rebuild with xorg-server-1.4.99

* Mon Jun 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.16.2-1
- new upstream release

* Sun May 18 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.15.2-1
- new versioning policy

* Tue Jan 22 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 10.15.2-0vl1
- initial build for Vine Linux

* Thu Oct 11 2007 Adam Jackson <ajax@redhat.com> 10.15.2-1
- xf86-video-vmware 10.15.2

* Mon Sep 24 2007 Adam Jackson <ajax@redhat.com> 10.15.1-1
- xf86-video-vmware 10.15.1

* Fri Aug 24 2007 Adam Jackson <ajax@redhat.com> - 10.14.1-3
- Rebuild for build ID

* Mon Jun 18 2007 Adam Jackson <ajax@redhat.com> 10.14.1-2
- Update Requires and BuildRequires.  Disown the module directories.  Add
  Requires: hwdata.

* Fri Jan 05 2007 Adam Jackson <ajax@redhat.com> 10.14.1-1.fc7
- Update to 10.14.1

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - sh: line 0: fg: no job control
- rebuild

* Tue May 23 2006 Adam Jackson <ajackson@redhat.com> 10.13.0-2
- Rebuild for 7.1 ABI fix.

* Sun Apr  9 2006 Adam Jackson <ajackson@redhat.com> 10.13.0-1
- Update to 10.13.0 from 7.1RC1.

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 10.11.1.3-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Wed Jan 18 2006 Mike A. Harris <mharris@redhat.com> 10.11.1.3-1
- Updated xorg-x11-drv-vmware to version 10.11.1.3 from X11R7.0

* Tue Dec 20 2005 Mike A. Harris <mharris@redhat.com> 10.11.1.2-1
- Updated xorg-x11-drv-vmware to version 10.11.1.2 from X11R7 RC4
- Removed 'x' suffix from manpage dirs to match RC4 upstream.

* Wed Nov 16 2005 Mike A. Harris <mharris@redhat.com> 10.11.1-1
- Updated xorg-x11-drv-vmware to version 10.11.1 from X11R7 RC2

* Fri Nov 4 2005 Mike A. Harris <mharris@redhat.com> 10.11.0.1-1
- Updated xorg-x11-drv-vmware to version 10.11.0.1 from X11R7 RC1
- Fix *.la file removal.

* Tue Oct 4 2005 Mike A. Harris <mharris@redhat.com> 10.10.2-1
- Update BuildRoot to use Fedora Packaging Guidelines.
- Deglob file manifest.
- Limit "ExclusiveArch" to x86, x86_64, ia64

* Fri Sep 2 2005 Mike A. Harris <mharris@redhat.com> 10.10.2-0
- Initial spec file for vmware video driver generated automatically
  by my xorg-driverspecgen script.
