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

Summary:   Xorg X11 ast video driver
Summary(ja):   Xorg X11 ast ビデオドライバ
Name:      xorg-x11-drv-ast
Version:   0.91.10
Release:   4%{?_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:   ast.xinf

ExcludeArch: s390 s390x

BuildRequires: xorg-x11-server-sdk >= 1.6

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

%description 
X.Org X11 ast video driver.

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

%build
%configure --disable-static --disable-dri
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}/ast_drv.so
%{_datadir}/hwdata/videoaliases/ast.xinf

%changelog
* Tue Nov 01 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.91.10-4
- rebuild with xserver-1.11.1.902

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

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

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

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

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

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

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

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

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

* Mon Mar 10 2008 Dave Airlie <airlied@redhat.com> 0.81.0-8
- pciaccess conversion

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

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

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

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

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

* Sat Jun 17 2006 Mike A. Harris <mharris@redhat.com> 0.81.0-2
- Update ast.xinf with PCI ID list from driver.

* Sat Jun 17 2006 Mike A. Harris <mharris@redhat.com> 0.81.0-1
- Initial spec file for ast cloned from mga video driver spec version 1.4.1-3
