%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.0
Release:   4%{?_dist_release}
URL:       http://www.x.org
Source0:   http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2
License: MIT
Group:     User Interface/X Hardware Support

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

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

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

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

