%global backend vdpau-driver

Summary:        A VDPAU backend for VA API
Summary(ja):    VA-API の VDPAU バックエンド
Name:           libva-%{backend}
Version:        0.7.4
Release:        1%{?_dist_release}
License:        MIT
Url:            http://cgit.freedesktop.org/vaapi/%{backend}/
Group:          System Environment/Libraries

Source: http://cgit.freedesktop.org/vaapi/%{backend}/snapshot/%{backend}-%{version}.tar.gz

Patch10:        vdpau-driver-0.7.4_fix_build_glext.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  autoconf, automake, libtool, gettext
BuildRequires:  pkgconfig
BuildRequires:  libva-devel >= 1.0.15
BuildRequires:  libvdpau-devel >= 0.4
BuildRequires:  libXext-devel
Obsoletes:      vdpau-video < 0.7.2
Obsoletes:      libva-vdpau-video < 0.7.3

%description
VAAPI-VDPAU Driver Bridge for NVidia/S3 Binary blob driver.

%prep
%setup -q -n %{backend}-%{version}
%patch10 -p1

%build
autoreconf -v --install
%configure
make

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
find %{buildroot} -name '*.la' -delete -print

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/dri/nvidia_drv_video.so
%{_libdir}/dri/s3g_drv_video.so
%{_libdir}/dri/vdpau_drv_video.so

%changelog
* Fri Oct 18 2013 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.7.4-1
- new upstream release
- add Patch10 to fix build failure

* Thu Nov 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.3-2
- new upstram release
- new upstream
- rename to libva-vdpau-driver

* Fri Jan 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.3-1.pre5
- initial build for Vine Linux

* Wed Jul 21 2010 Paulo Roma <roma@lcg.ufrj.br> - 0.6.10-1
- Adapted spec for Fedora.

* Sat Jun 12 2010 dominique-vlc.suse@leuenberger.net
- Initial package of nvidia vdpau driver for nvidia.
