diff --git a/.gitignore b/.gitignore index 8404e84..67c0f02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /*.tgz /vdr-plugin-epgfixer-354f28b0112ba27f08f6509243b410899f74b6ed.tar.bz2 -/vdr-epgfixer-0.3.1-git354f28b.tar.gz diff --git a/0001-Fix-LoadConfigFile-return-value-on-success.patch b/0001-Fix-LoadConfigFile-return-value-on-success.patch new file mode 100644 index 0000000..17b7172 --- /dev/null +++ b/0001-Fix-LoadConfigFile-return-value-on-success.patch @@ -0,0 +1,24 @@ +From 1df04e59273606117bd7a19559dd26da26844962 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Wed, 3 Apr 2013 19:11:10 +0300 +Subject: [PATCH] Fix LoadConfigFile() return value on success. + +--- + tools.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools.h b/tools.h +index 119d32d..9dda805 100644 +--- a/tools.h ++++ b/tools.h +@@ -94,6 +94,7 @@ template bool cEpgfixerList +Date: Sun, 2 Dec 2012 18:03:29 +0200 +Subject: [PATCH] Fix replacing at the end of string when using s///. Fix + variable name clash. + +--- + regexp.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/regexp.c b/regexp.c +index 4631cbd..8392586 100644 +--- a/regexp.c ++++ b/regexp.c +@@ -221,7 +221,7 @@ bool cRegexp::Apply(cEvent *Event) + start_offset = ovector[1]; + } + // replace EPG field if regexp matched +- if (last_match_end > 0 && (last_match_end < tmpstringlen - 1)) { ++ if (last_match_end > 0 && (last_match_end <= tmpstringlen)) { + resultstring = cString::sprintf("%s%s", *resultstring, tmpstring + last_match_end); + switch (source) { + case REGEXP_TITLE: +@@ -240,7 +240,7 @@ bool cRegexp::Apply(cEvent *Event) + } + } + else {// use backreferences +- const char *string; ++ const char *capturestring; + rc = pcre_exec(re, sd, *tmpstring, strlen(*tmpstring), 0, 0, ovector, OVECCOUNT); + if (rc == 0) { + error("maximum number of captured substrings is %d\n", OVECCOUNT / 3 - 1); +@@ -250,51 +250,51 @@ bool cRegexp::Apply(cEvent *Event) + // loop through all possible backreferences + // TODO allow duplicate backreference names? + while (i < 10) { +- if (pcre_get_named_substring(re, tmpstring, ovector, rc, strBackrefs[i], &string) != PCRE_ERROR_NOSUBSTRING) { ++ if (pcre_get_named_substring(re, tmpstring, ovector, rc, strBackrefs[i], &capturestring) != PCRE_ERROR_NOSUBSTRING) { + switch (i) { + case ATITLE: + case PTITLE: + if (Event->Title()) { + if (i == ATITLE) +- Event->SetTitle(*cString::sprintf("%s %s", Event->Title(), string)); ++ Event->SetTitle(*cString::sprintf("%s %s", Event->Title(), capturestring)); + else +- Event->SetTitle(*cString::sprintf("%s %s", string, Event->Title())); ++ Event->SetTitle(*cString::sprintf("%s %s", capturestring, Event->Title())); + break; + } + case TITLE: +- Event->SetTitle(string); ++ Event->SetTitle(capturestring); + break; + case ASHORTTEXT: + case PSHORTTEXT: + if (Event->ShortText()) { + if (i == ASHORTTEXT) +- Event->SetShortText(*cString::sprintf("%s %s", Event->ShortText(), string)); ++ Event->SetShortText(*cString::sprintf("%s %s", Event->ShortText(), capturestring)); + else +- Event->SetShortText(*cString::sprintf("%s %s", string, Event->ShortText())); ++ Event->SetShortText(*cString::sprintf("%s %s", capturestring, Event->ShortText())); + break; + } + case SHORTTEXT: +- Event->SetShortText(string); ++ Event->SetShortText(capturestring); + break; + case ADESCRIPTION: + case PDESCRIPTION: + if (Event->Description()) { + if (i == ADESCRIPTION) +- Event->SetDescription(*cString::sprintf("%s %s", Event->Description(), string)); ++ Event->SetDescription(*cString::sprintf("%s %s", Event->Description(), capturestring)); + else +- Event->SetDescription(*cString::sprintf("%s %s", string, Event->Description())); ++ Event->SetDescription(*cString::sprintf("%s %s", capturestring, Event->Description())); + break; + } + case DESCRIPTION: +- Event->SetDescription(string); ++ Event->SetDescription(capturestring); + break; + case RATING: +- Event->SetParentalRating(atoi(string)); ++ Event->SetParentalRating(atoi(capturestring)); + break; + default: + break; + } +- pcre_free_substring(string); ++ pcre_free_substring(capturestring); + } + ++i; + } +-- +1.9.0 + diff --git a/sources b/sources index ad025fd..62eba6e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vdr-epgfixer-0.3.1-git354f28b.tar.gz) = 0446a012f83df10b0203f1e6699256c3a2820edbf4b77e311ea4de5e7bff6e3d362da21f60d0b0cb70ebff519d024deed1d8d25c4b681721ecbd0660a046cec5 +SHA512 (vdr-plugin-epgfixer-354f28b0112ba27f08f6509243b410899f74b6ed.tar.bz2) = c27e8d10d61023b4583ac7ddea70d1e7d49436da3fb65a52d6639ceba3f7b8ce8a9ccddc750a0811a30316c424cefcfce639fcfe3ad4adaef40ba0e973b29927 diff --git a/vdr-epgfixer.spec b/vdr-epgfixer.spec index 960c388..c9c75f3 100644 --- a/vdr-epgfixer.spec +++ b/vdr-epgfixer.spec @@ -1,32 +1,21 @@ %global pname epgfixer %global __provides_exclude_from ^%{vdr_plugindir}/ -%global commit 354f28b0112ba27f08f6509243b410899f74b6ed -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global gitdate 20180416 - -# Set vdr_version based on Fedora version -%if 0%{?fedora} >= 43 -%global vdr_version 2.7.7 -%elif 0%{?fedora} == 42 -%global vdr_version 2.7.4 -%else -%global vdr_version 2.6.9 -%endif Name: vdr-%{pname} Version: 0.3.1 -Release: 41.%{gitdate}git%{shortcommit}%{?dist} +Release: 6%{?dist} Summary: VDR plugin for doing extra fixing of EPG data -License: GPL-2.0-or-later -URL: https://github.com/vdr-projects/vdr-plugin-epgfixer -Source0: https://github.com/vdr-projects/vdr-plugin-epgfixer/archive/%{commit}/%{name}-%{version}-git%{shortcommit}.tar.gz +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: make -BuildRequires: gcc-c++ -BuildRequires: gettext -BuildRequires: vdr-devel >= %{vdr_version} +BuildRequires: vdr-devel >= 1.7.26 BuildRequires: pcre-devel Requires: vdr(abi)%{?_isa} = %{vdr_apiversion} @@ -36,23 +25,34 @@ 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 -%autosetup -p1 -n vdr-plugin-%{pname}-%{commit} +%setup -q -n %{pname}-%{version} +%patch0 -p1 +%patch1 -p1 + %build -%make_build CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" \ - LIBDIR=. LOCALEDIR=./locale VDRDIR=%{_libdir}/vdr +make %{?_smp_mflags} LIBDIR=. LOCALEDIR=./locale VDRDIR=%{_libdir}/vdr + %install -%make_install -install -dm 755 %{buildroot}%{vdr_configdir}/plugins/%{pname} -install -pm 644 epgfixer/{blacklist,charset,epgclone,regexp}.conf \ - %{buildroot}%{vdr_configdir}/plugins/%{pname} -install -Dpm 644 %{SOURCE1} \ - %{buildroot}%{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf +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 @@ -62,114 +62,8 @@ install -Dpm 644 %{SOURCE1} \ %config(noreplace) %{vdr_configdir}/plugins/%{pname}/ %defattr(-,root,root,-) + %changelog -* Fri Jul 25 2025 Martin Gansser - 0.3.1-41.20180416git354f28b -- Rebuilt for new VDR API version 2.7.7 - -* Fri Jul 25 2025 Fedora Release Engineering - 0.3.1-40.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jun 21 2025 Martin Gansser - 0.3.1-39.20180416git354f28b -- Rebuilt for new VDR API version 2.7.6 - -* Tue May 27 2025 Martin Gansser - 0.3.1-38.20180416git354f28b -- Rebuilt for new VDR API version 2.7.5 - -* Fri Feb 28 2025 Martin Gansser - 0.3.1-37.20180416git354f28b -- Rebuilt for new VDR API version 2.7.4 - -* Sun Jan 19 2025 Fedora Release Engineering - 0.3.1-36.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Oct 09 2024 Martin Gansser - 0.3.1-35.20180416git354f28b -- Rebuilt for new VDR API version 2.7.2 - -* Fri Jul 26 2024 Miroslav Suchý - 0.3.1-34.20180416git354f28b -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 0.3.1-33.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jul 15 2024 Martin Gansser - 0.3.1-32.20180416git354f28b -- Rebuilt for new VDR API version 2.6.9 - -* Thu Jul 11 2024 Martin Gansser - 0.3.1-31.20180416git354f28b -- Rebuilt for new VDR API version 2.6.8 - -* Fri Apr 12 2024 Martin Gansser - 0.3.1-30.20180416git354f28b -- Rebuilt for new VDR API version - -* Fri Jan 26 2024 Martin Gansser - 0.3.1-29.20180416git354f28b -- Rebuilt for new VDR API version - -* Fri Jan 05 2024 Martin Gansser - 0.3.1-28.20180416git354f28b -- Rebuilt for new VDR API version -- Add BR gettext for rawhide - -* Wed Jul 26 2023 Martin Gansser - 0.3.1-27.20180416git354f28b -- Rebuilt for rawhide - -* Sat Jul 22 2023 Fedora Release Engineering - 0.3.1-26.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Jan 21 2023 Fedora Release Engineering - 0.3.1-25.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Dec 14 2022 Martin Gansser - 0.3.1-24.20180416git354f28b -- Rebuilt for new VDR API version - -* Thu Dec 01 2022 Martin Gansser - 0.3.1-23.20180416git354f28b -- Rebuilt for new VDR API version - -* Sat Jul 23 2022 Fedora Release Engineering - 0.3.1-22.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Feb 04 2022 Martin Gansser - 0.3.1-21.20180416git354f28b -- Rebuilt for new VDR API version - -* Sat Jan 22 2022 Fedora Release Engineering - 0.3.1-20.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Dec 30 2021 Martin Gansser - 0.3.1-19.20180416git354f28b -- Rebuilt for new VDR API version - -* Fri Jul 23 2021 Fedora Release Engineering - 0.3.1-18.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Apr 28 2021 Martin Gansser - 0.3.1-17.20180416git354f28b -- Rebuilt for new VDR API version - -* Wed Jan 27 2021 Fedora Release Engineering - 0.3.1-16.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Sun Jan 03 2021 Martin Gansser - 0.3.1-15.20180416git354f28b -- Rebuilt for new VDR API version - -* Fri Aug 28 2020 Martin Gansser - 0.3.1-14.20180416git354f28b -- Rebuilt for new VDR API version - -* Wed Jul 29 2020 Fedora Release Engineering - 0.3.1-13.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jan 31 2020 Fedora Release Engineering - 0.3.1-12.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Sat Jul 27 2019 Fedora Release Engineering - 0.3.1-11.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jun 19 2019 Martin Gansser - 0.3.1-10.20180416git354f28b -- Rebuilt for new VDR API version - -* Sun Feb 03 2019 Fedora Release Engineering - 0.3.1-9.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 0.3.1-8.20180416git354f28b -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Apr 26 2018 Martin Gansser - 0.3.1-7.20180416git354f28b -- Update to 0.3.1-7.20180416git354f28b -- Rebuilt for vdr-2.4.0 - * Fri Feb 09 2018 Fedora Release Engineering - 0.3.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild