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

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

Source0:   http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6
Requires:  xorg-x11-server-Xorg

Vendor: Project Vine
Distribution: Vine Linux

%description 
X.Org X11 %{drvname} video driver.

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

%build
%configure --disable-static --enable-xaa=no
make

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

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{driverdir}/%{drvname}_drv.so
%{_mandir}/man4/%{drvname}.4*

%changelog
* Thu May 05 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-2
- rebuild with xserver-1.18.3

* Sun Oct 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release
- remove Patch0 (xf86-video-xgi-1.6.0-remove-mibstore.patch)

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

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

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

* Sun May 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-5.git20130118
- rebuild with xserver-1.14.1
- change Source0
- add Patch0 (xf86-video-xgi-1.6.0-remove-mibstore.patch)

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

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

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

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

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

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

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

* Mon Jun 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5.0-1
- initial build

