%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Name:		libvdpau
Version:	1.1.1
Release:	1%{?_dist_release}
Summary:	Wrapper library for the Video Decode and Presentation API for unix
Summary(ja):	VDPAU (Video Decode and Presentation API for unix) 用のラッパーライブラリ

Group:		System Environment/Libraries
License:	MIT
URL:		http://freedesktop.org/wiki/Software/VDPAU
Source0:	http://people.freedesktop.org/~aplattner/vdpau/libvdpau-%{version}.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	libX11-devel
BuildRequires:  texlive, graphviz, doxygen

Packager:	kazutaka, shaolin

%description
VDPAU is the Video Decode and Presentation API for UNIX. 
It provides an interface to video decode acceleration and presentation
hardware present in modern GPUs.

%description -l ja
VDPAU は Video Decode and Presentation API for UNIX の略で、
GPU が提供するハードウェアによる動画の再生支援機能を利用する
ためのインターフェース (API) を提供します。


%package devel
Summary:	Development files for %{name}
Summary(ja):	%{name} の開発用ファイル
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	libX11-devel
Requires:	pkgconfig

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%description devel -l ja
%{name}-devel パッケージは、%{name} を使用するアプリケーションの
開発に必要なライブラリやヘッダファイルを含んでいます。

# compat32
%package -n compat32-%{name}
Summary:	Wrapper library for the Video Decode and Presentation API for unix
Summary(ja):	VDPAU (Video Decode and Presentation API for unix) 用のラッパーライブラリ
Group:		System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description -n compat32-%{name}
VDPAU is the Video Decode and Presentation API for UNIX. 
It provides an interface to video decode acceleration and presentation
hardware present in modern GPUs.

%description -l ja -n compat32-%{name}
VDPAU は Video Decode and Presentation API for UNIX の略で、
GPU が提供するハードウェアによる動画の再生支援機能を利用する
ためのインターフェース (API) を提供します。

%package -n compat32-%{name}-devel
Summary:	Development files for compat32-%{name}
Summary(ja):	compat32-%{name} の開発用ファイル
Group:		Development/Libraries
Requires:	compat32-%{name} = %{version}-%{release}
Requires:	compat32-%{name}-devel = %{version}-%{release}

%description -n compat32-%{name}-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%description -n compat32-%{name}-devel -l ja
%{name}-devel パッケージは、%{name} を使用するアプリケーションの
開発に必要なライブラリやヘッダファイルを含んでいます。


%prep
%setup -q
autoreconf -vif

%build
%configure --disable-static
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%{__rm} -rf %{buildroot}%{_docdir}
mv doc/html-out html


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_sysconfdir}/vdpau_wrapper.cfg
%{_libdir}/*.so.*
%dir %{_libdir}/vdpau
%{_libdir}/vdpau/libvdpau_trace.so.*

%files devel
%defattr(-,root,root,-)
%doc html
%config %{_includedir}/vdpau/
%{_libdir}/libvdpau.so
%{_libdir}/vdpau/libvdpau_trace.so
%{_libdir}/pkgconfig/vdpau.pc

%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_libdir}/vdpau/*.so.*

%files -n compat32-%{name}-devel
%defattr(-,root,root,-)
%{_libdir}/libvdpau.so
%{_libdir}/vdpau/libvdpau_trace.so
%endif


%changelog
* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.1-1
- new upstream release

* Wed Jul 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.8-1
- new upstream release

* Fri Oct 18 2013 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.7-1
- new upstream release

* Sun May 26 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6-1
- update to 0.6

* Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5-1
- new upstream release

* Sat Jan 08 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.1-1
- new upstream release

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.4-2
- rebuild with rpm-4.8.1 for pkg-config file

* Wed Feb 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-1
- new upstream release
- add compat32 package

* Thu Nov 05 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.2-1
- initial build for Vine Linux based of fedora development
- add japanese description and summary

* Thu Sep 17 2009 kwizart < kwizart at gmail.com > - 0.2-1
- Update to 0.2
- Disable ExclusiveArch

* Mon Sep  7 2009 kwizart < kwizart at gmail.com > - 0.1-0.6.20090904git
- Update to gitdate 20090904git

* Wed Sep  2 2009 kwizart < kwizart at gmail.com > - 0.1-0.5git20090902
- Update to gitdate 20090902 with merged patches

* Mon Jun 15 2009 kwizart < kwizart at gmail.com > - 0.1-0.3git20090318
- Add missing -ldl at link time

* Sun Mar 22 2009 kwizart < kwizart at gmail.com > - 0.1-0.2git20090318
- Backport fix thread_2

* Fri Mar  6 2009 kwizart < kwizart at gmail.com > - 0.1-0.1git20090318
- Initial spec file

