%define drvname xgixp
%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.8.1
Release:   5%{?_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

Patch0:		xf86-video-xgixp-1.8.1-remove-mibstore.patch

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}
%patch0 -p1 -b .mibstore

%build
%configure --disable-static
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
* Sun Nov 23 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-5
- rebuild with xserver-1.16.2

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

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

* Sun May 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-2
- rebuild with xserver-1.14.1
- add Patch0 (xf86-video-xgixp-1.8.1-remove-mibstore.patch)

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

* Sun Mar 25 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-5
- rebuild with xserver-1.12.0

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

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

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

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

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

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

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

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