File libvdpau-va-gl.spec of Package libvdpau-va-gl
#
# spec file for package libvdpau-va-gl
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _libname libvdpau_va_gl
%define _sover 1
Name: libvdpau-va-gl
Version: 0.3.4
Release: 0
Summary: VDPAU driver with OpenGL/VAAPI backend
License: LGPL-3.0+
Group: System/Libraries
Url: https://github.com/i-rinat/libvdpau-va-gl
Source: https://github.com/i-rinat/%{name}/archive/v%{version}.tar.gz
Source1: baselibs.conf
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libva-glx)
BuildRequires: pkgconfig(vdpau)
%description
Many applications can use VDPAU to accelerate portions of the video
decoding process and video post-processing to the GPU video hardware.
Unfortunately, there is no such library for many graphic chipsets. Some
applications also support VA-API but many of them, including
Adobe Flash Player, don't.
This library proposes a generic VDPAU library. It uses OpenGL under the
hood to accelerate drawing and scaling and VA-API (if available) to
accelerate video decoding.
%package -n %{_libname}%{_sover}
Summary: VDPAU driver with OpenGL/VAAPI backend
Group: System/Libraries
Supplements: xf86-video-intel
Provides: %{_libname} = %{version}
%description -n %{_libname}%{_sover}
Many applications can use VDPAU to accelerate portions of the video
decoding process and video post-processing to the GPU video hardware.
Unfortunately, there is no such library for many graphic chipsets. Some
applications also support VA-API but many of them, including
Adobe Flash Player, don't.
This library proposes a generic VDPAU library. It uses OpenGL under the
hood to accelerate drawing and scaling and VA-API (if available) to
accelerate video decoding.
%prep
%setup -q
cat > %{name}.sh << EOF
# avoid usage of this library when NVIDIA's proprietary driver is running
if ! test -c /dev/nvidiactl; then
export VDPAU_DRIVER='va_gl'
fi
EOF
cat > %{name}.csh << EOF
# avoid usage of this library when NVIDIA's proprietary driver is running
if (! -c /dev/nvidiactl) then
setenv VDPAU_DRIVER 'va_gl'
endif
EOF
%build
%cmake -DLIB_INSTALL_DIR=%{_libdir}/vdpau
make %{?_smp_mflags}
%install
%cmake_install
install -Dm 0644 %{name}.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
install -Dm 0644 %{name}.csh %{buildroot}%{_sysconfdir}/profile.d/%{name}.csh
%files -n %{_libname}%{_sover}
%defattr(-,root,root)
%doc ChangeLog COPYING
%{_libdir}/vdpau/
%{_sysconfdir}/profile.d/%{name}.*sh
%changelog