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

#
# spec file for package vdr-plugin-vnsiserver
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#


%define pluginname vnsiserver
%define pluginconfdir %{vdr_sysconfdir}/plugins/%{pluginname}

Name:           vdr-plugin-%{pluginname}
Version:        1.8.0
Release:        0
Summary:        VDR plugin to handle XBMC clients
#Url:            https://github.com/opdenkamp/xbmc-pvr-addons/tree/master/addons/pvr.vdr.vnsi/vdr-plugin-vnsiserver
License:        GPL-2.0-only
Group:          Hardware/TV
Url:            https://github.com/FernetMenta/vdr-plugin-vnsiserver
Source0:        https://github.com/FernetMenta/vdr-plugin-vnsiserver/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:        vdr-plugin-vnsiserver.firewall
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  vdr-devel
BuildRequires:  zlib-devel
# Requires(pre) is not enough, as it does not work on updates
Requires:       vdr(abi) = %{vdr_apiversion}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
VDR plugin to handle XBMC clients.
The vdr-plugin-vnsiserver is able to handle several XBMC clients connecting via the vnsiserver addon.

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

%build
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
install -d -m 755 %{buildroot}%{pluginconfdir}
ln -s %{vdr_sysconfdir}/svdrphosts.conf %{buildroot}%{pluginconfdir}/allowed_hosts.conf
%if 0%{?suse_version} < 1550
# firewall config
install -m 644 -D %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%endif

%{vdr_find_locale}

%files -f vdrlocale.files
%defattr(-,root,root)
%{_libdir}/vdr/*
%{vdr_dirs}
%doc COPYING HISTORY README
%attr(755,vdr,root) %dir %{vdr_sysconfdir}/plugins
%attr(755,vdr,root) %dir %{pluginconfdir}
%{pluginconfdir}/allowed_hosts.conf
%if 0%{?suse_version} < 1550
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%endif

%changelog
openSUSE Build Service is sponsored by