File vdr-plugin-xineliboutput.spec of Package vdr-plugin-xineliboutput

#
# spec file for package vdr-plugin-xineliboutput
#
# 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 pluginname xineliboutput
%define pluginurl http://sourceforge.net/projects/xineliboutput/
Name:           vdr-plugin-xineliboutput
Version:        1.1.0
Release:        0
Summary:        VDR %{pluginname} plugin
License:        GPL-2.0
Group:          Hardware/TV
Url:            %{pluginurl}
Source:         vdr-%{pluginname}-%{version}.tgz
Source1:        remote.conf
Source2:        xineliboutput_allowed_hosts.conf
Patch0:         xineliboutput-1.1.0-vdr-2.2.patch
%if 0%{?suse_version} < 1200
BuildRequires:  Mesa-devel
%else
BuildRequires:  Mesa-libGL-devel
BuildRequires:  Mesa-libGLU-devel
BuildRequires:  libavutil-devel
BuildRequires:  libbluray-devel
BuildRequires:  libvdpau-devel
%endif
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gcc-c++
BuildRequires:  libcap-devel
BuildRequires:  libjpeg-devel
BuildRequires:  pkg-config
BuildRequires:  vdr-devel
BuildRequires:  xine-devel
BuildRequires:  xorg-x11-devel
# FIXME: use proper Requires(pre/post/preun/...)
PreReq:         %{vdr_prereq}
# only needef for packages that used the old naming scheme
Obsoletes:      vdr-%{pluginname} < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Xinelib-based software output device for VDR. Supports X11 and Linux
framebuffer. Connects to vdr locally or over the network. This package includes
just the vdr-plugin.

%package -n vdr-xineliboutput-client
Summary:        Xinelib-based software output device for VDR - client
Group:          Hardware/TV

%description -n vdr-xineliboutput-client
Xinelib-based software output device for VDR. Supports X11 and Linux
framebuffer. Connects to vdr locally or over the network. This package includes
just the client programs.

%prep
%setup -q -n %{pluginname}-%{version}
%patch0 -p1
cp %{SOURCE1} .

%build
# crappy makefile does everything on "make install" anyway...

%install
# use msgmerge wrapper
export PATH=%{_datadir}/vdr:$PATH
make VDRDIR=%{vdr_includedir} DESTDIR=%{buildroot} LOCALEDIR=%{buildroot}%{vdr_localedir} install
%{vdr_find_locale}
install -D -m 0644 %{SOURCE2} %{buildroot}%{vdr_sysconfdir}/plugins/xineliboutput/allowed_hosts.conf

%post
if [ -e %{_docdir}/%{name}/remote.conf ] && ! grep -q XKeySym %{vdr_sysconfdir}/remote.conf; then
	cat %{_docdir}/%{name}/remote.conf >> %{vdr_sysconfdir}/remote.conf
fi
/bin/true

%files -f vdrlocale.files
%defattr(-,root,root)
%doc COPYING HISTORY README
%doc remote.conf
%attr(-,vdr,root) %dir %{vdr_sysconfdir}/plugins
%attr(-,vdr,root) %dir %{vdr_sysconfdir}/plugins/xineliboutput
%attr(-,vdr,root) %config(noreplace) %{vdr_sysconfdir}/plugins/xineliboutput/allowed_hosts.conf
%{_libdir}/vdr/*
%{vdr_dirs}

%files -n vdr-xineliboutput-client
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/xine/plugins/*
%{_libdir}/xine/plugins/*/post
%dir %{_libdir}/xine
%dir %{_libdir}/xine/plugins
%dir %{_libdir}/xine/plugins/*
%dir %{_libdir}/xine/plugins/*/post

%changelog
openSUSE Build Service is sponsored by