Blob Blame Raw
%global pname   epgfixer
%global __provides_exclude_from ^%{vdr_plugindir}/

Name:           vdr-%{pname}
Version:        0.3.1
Release:        1%{?dist}
Summary:        VDR plugin for doing extra fixing of EPG data

License:        GPLv2+
URL:            https://projects.vdr-developer.org/projects/plg-epgfixer
Source0:        https://projects.vdr-developer.org/attachments/download/1138/%{name}-%{version}.tgz
Source1:        %{name}.conf
# https://projects.vdr-developer.org/git/vdr-plugin-epgfixer.git/commit/?id=2b099cc01701e784fa5b1c53f38fd592b0b3ae42
Patch0:         0001-Fix-replacing-at-the-end-of-string-when-using-s-.-Fi.patch
# https://projects.vdr-developer.org/git/vdr-plugin-epgfixer.git/commit/?id=16d0db40d37706c79c7e911aebcdd344200a4725
Patch1:         0001-Fix-LoadConfigFile-return-value-on-success.patch

BuildRequires:  vdr-devel >= 1.7.26
BuildRequires:  pcre-devel
Requires:       vdr(abi)%{?_isa} = %{vdr_apiversion}

%description
Epgfixer is a VDR plugin for doing extra fixing of EPG data. Features
include modifying EPG data using regular expressions, character set
conversions, blacklists, cloning EPG data, removing HTML tags, and
editing all settings through setup menu.


%prep
%setup -q -n %{pname}-%{version}
%patch0 -p1
%patch1 -p1


%build
make %{?_smp_mflags} LIBDIR=. LOCALEDIR=./locale VDRDIR=%{_libdir}/vdr


%install

install -dm 755 $RPM_BUILD_ROOT%{vdr_plugindir}
install -pm 755 libvdr-%{pname}.so.%{vdr_apiversion} \
    $RPM_BUILD_ROOT%{vdr_plugindir}
install -dm 755 $RPM_BUILD_ROOT%{vdr_configdir}/plugins/%{pname}
install -pm 644 epgfixer/{blacklist,charset,epgclone,regexp}.conf \
    $RPM_BUILD_ROOT%{vdr_configdir}/plugins/%{pname}

install -Dpm 644 %{SOURCE1} \
    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf

install -dm 755 $RPM_BUILD_ROOT%{_datadir}/locale
cp -pR locale/* $RPM_BUILD_ROOT%{_datadir}/locale
%find_lang %{name}


%files -f %{name}.lang
%license COPYING
%doc HISTORY README
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf
%{vdr_plugindir}/libvdr-%{pname}*.so.%{vdr_apiversion}
%defattr(-,%{vdr_user},root,-)
%config(noreplace) %{vdr_configdir}/plugins/%{pname}/
%defattr(-,root,root,-)


%changelog
* Fri Jan  1 2016 Ville Skyttä <ville.skytta@iki.fi> - 0.3.1-1
- First Fedora build