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

Summary:   Xorg X11 sis video driver
Summary(ja):   Xorg X11 sis ビデオドライバ
Name:      xorg-x11-drv-sis
Version:   0.10.8
Release:   1%{?_dist_release}
URL:       http://www.x.org
License:   MIT
Group:     User Interface/X Hardware Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

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

Patch1:		xf86-video-sis-0.10.7-miPointerSetPosition.patch

ExcludeArch: s390 s390x

BuildRequires: xorg-x11-server-sdk >= 1.6
BuildRequires: mesa-libGL-devel
BuildRequires: libdrm-devel
BuildRequires: pixman-devel

Requires:  hwdata
Requires:  xorg-x11-server-Xorg

Vendor: Project Vine
Distribution: Vine Linux

%description 
X.Org X11 sis video driver.

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

%build
%configure --disable-static --disable-dri --enable-xaa=no
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}/sis_drv.so
%{_datadir}/hwdata/videoaliases/sis.xinf
%{_mandir}/man4/sis.4*

%changelog
* Sun Oct 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.8-1
- new upstream release
- remove Patch0 (xf86-video-sis-0.10.7-git20121015.patch)
- remove Patch2 (fix-exa-crash.diff).

* Sun Jul  5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.10.7-7
- added Patch2 (fix-exa-crash.diff).

* Sat Jul 04 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.7-6
- update Patch0 (xf86-video-sis-0.10.7-git20141111.patch

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

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

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

* Sun May 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.7-2
- rebuild with xserver-1.14.1
- add Patch0 (xf86-video-sis-0.10.7-git20121015.patch)
- add Patch1 (xf86-video-sis-0.10.7-miPointerSetPosition.patch)

* Fri Jul 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.7-1
- new upstream release

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

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

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

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

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

* Sun Jul 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.3-1
- new upstream release

* Sun Mar 28 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.2-3
- rebuild with xserver-1.8rc

* Thu Nov 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.2-2
- rebuild with xserver-1.7.1

* Tue Sep 01 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.2-1
- new upstream release
- build for new X server abi

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.1-1
- new upstream release

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

* Sat May 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.0-1
- initial build for Vine Linux

* Thu Mar 20 2008 Dave Airlie <airlied@redhat.com> 0.10.0-1
- Latest upstream release

* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.4-4
- Autorebuild for GCC 4.3

* Thu Jan 17 2008 Dave Airlie <airlied@redhat.com> - 0.9.4-3
- fix more bugs in pciaccess port - tested on actual hardware.

* Wed Jan 16 2008 Dave Airlie <airlied@redhat.com> - 0.9.4-2
- fixup bugs in pciaccess port

* Wed Jan 16 2008 Dave Airlie <airlied@redhat.com> - 0.9.4-1
- new upstream version
- sis-pciaccess.patch - add initial pciaccess port

* Wed Aug 22 2007 Adam Jackson <ajax@redhat.com> - 0.9.3-4
- Rebuild for PPC toolchain bug

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

* Fri Feb 16 2007 Adam Jackson <ajax@redhat.com> 0.9.3-2
- ExclusiveArch -> ExcludeArch

* Fri Dec 1 2006 Adam Jackson <ajax@redhat.com> 0.9.3-1
- Update to 0.9.3

* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 0.9.1-7
- rebuilt for unwind info generation, broken in gcc-4.1.1-21

* Wed Sep 20 2006 Adam Jackson <ajackson@redhat.com> 0.9.1-6
- sis-0.9.1-assert.patch: Include assert.h so we don't crash.

* Thu Aug 17 2006 Bill Nottingham <notting@redhat.com> 0.9.1-5
- fix sis.xinf for XGI (case sensitive)

* Mon Jul 24 2006 Adam Jackson <ajackson@redhat.com> 0.9.1-4
- Update sis.xinf for XGI cards.  (#186024)

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> 0.9.1-3.1
- rebuild

* Fri May 26 2006 Mike A. Harris <mharris@redhat.com> 0.9.1-3
- Added "BuildRequires: libdrm-devel >= 2.0-1" for (#192358)
- Bumped sdk dep to pick up proto-devel indirectly.

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

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

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.8.1.3-1.2
- bump again for double-long bug on ppc(64)

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

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

* Tue Dec 20 2005 Mike A. Harris <mharris@redhat.com> 0.8.1.2-1
- Updated xorg-x11-drv-sis to version 0.8.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> 0.8.1-1
- Updated xorg-x11-drv-sis to version 0.8.1 from X11R7 RC2
- Added "BuildRequires: mesa-libGL-devel >= 6.4-4" for DRI-enabled builds.

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

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

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