commit c62cab57430dfc527be1962f9dfd75845c446569
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Tue Jan 31 12:09:58 2023 +0100
- Update to 20.3.0
- Add AppStream metadata
- Switch to SPDX license identifiers
.gitignore | 1 +
kodi-pvr-vbox-20.3.0-use_external_tinyxml2.patch | 214 +++++++++++++++++++++++
kodi-pvr-vbox-7.0.0-tinyxml2_6.patch | 36 ----
kodi-pvr-vbox-8.0.0-use_external_tinyxml2.patch | 132 --------------
kodi-pvr-vbox.metainfo.xml | 11 ++
kodi-pvr-vbox.spec | 36 ++--
sources | 2 +-
7 files changed, 250 insertions(+), 182 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 076f4ca..9a294db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/pvr.vbox-8.0.0.tar.gz
/pvr.vbox-8.1.0.tar.gz
/pvr.vbox-8.1.2.tar.gz
+/pvr.vbox-20.3.0.tar.gz
diff --git a/kodi-pvr-vbox-20.3.0-use_external_tinyxml2.patch
b/kodi-pvr-vbox-20.3.0-use_external_tinyxml2.patch
new file mode 100644
index 0000000..4c0bbf1
--- /dev/null
+++ b/kodi-pvr-vbox-20.3.0-use_external_tinyxml2.patch
@@ -0,0 +1,214 @@
+diff -up ./CMakeLists.txt.orig ./CMakeLists.txt
+--- ./CMakeLists.txt.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./CMakeLists.txt 2023-01-31 12:07:58.392962248 +0100
+@@ -4,10 +4,14 @@ project(pvr.vbox)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
+
+ find_package(Kodi REQUIRED)
++find_package(TinyXML2 REQUIRED)
+
+ include_directories(${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger
Kodi cmake rework to match right include ways
++ ${TINYXML2_INCLUDE_DIRS}
+ ${PROJECT_SOURCE_DIR})
+
++set(DEPLIBS ${TINYXML2_LIBRARIES})
++
+ # Sources and headers
+ set(VBOX_SOURCES
+ src/addon.h
+@@ -79,13 +83,6 @@ source_group("Source Files\\vbox\\respon
+ source_group("Source Files\\timeshift" FILES ${VBOX_SOURCES_TIMESHIFT})
+ source_group("Source Files\\xmltv" FILES ${VBOX_SOURCES_XMLTV})
+
+-# Library files
+-set(VBOX_LIBRARIES_TINYXML2
+- lib/tinyxml2/tinyxml2.h
+- lib/tinyxml2/tinyxml2.cpp)
+-
+-source_group("Library Files\\tinyxml2" FILES ${VBOX_LIBRARIES_TINYXML2})
+-
+ # Resource files
+ set(VBOX_RESOURCES
+ README.md
+@@ -105,8 +102,7 @@ list(APPEND VBOX_SOURCES
+ ${VBOX_SOURCES_VBOX_RESPONSE}
+ ${VBOX_SOURCES_TIMESHIFT}
+ ${VBOX_SOURCES_XMLTV}
+- ${VBOX_RESOURCES}
+- ${VBOX_LIBRARIES_TINYXML2})
++ ${VBOX_RESOURCES})
+
+ build_addon(pvr.vbox VBOX DEPLIBS)
+
+diff -up ./debian/control.orig ./debian/control
+--- ./debian/control.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./debian/control 2023-01-31 12:07:58.392962248 +0100
+@@ -1,7 +1,7 @@
+ Source: kodi-pvr-vbox
+ Priority: extra
+ Maintainer: Sam Stenvall <sam.stenvall(a)kodi.tv>
+-Build-Depends: debhelper (>= 9.0.0), cmake,
++Build-Depends: debhelper (>= 9.0.0), cmake, libtinyxml2-dev,
+ kodi-addon-dev
+ Standards-Version: 4.1.2
+ Section: libs
+diff -up ./depends/common/tinyxml2/flags.txt.orig ./depends/common/tinyxml2/flags.txt
+--- ./depends/common/tinyxml2/flags.txt.orig 2023-01-31 12:07:51.713867945 +0100
++++ ./depends/common/tinyxml2/flags.txt 2023-01-31 12:07:58.392962248 +0100
+@@ -0,0 +1 @@
++-Dtinyxml2_BUILD_TESTING:BOOL=OFF
+diff -up ./depends/common/tinyxml2/tinyxml2.sha256.orig
./depends/common/tinyxml2/tinyxml2.sha256
+--- ./depends/common/tinyxml2/tinyxml2.sha256.orig 2023-01-31 12:07:51.714867959 +0100
++++ ./depends/common/tinyxml2/tinyxml2.sha256 2023-01-31 12:07:58.392962248 +0100
+@@ -0,0 +1 @@
++cc2f1417c308b1f6acc54f88eb70771a0bf65f76282ce5c40e54cfe52952702c
+diff -up ./depends/common/tinyxml2/tinyxml2.txt.orig
./depends/common/tinyxml2/tinyxml2.txt
+--- ./depends/common/tinyxml2/tinyxml2.txt.orig 2023-01-31 12:07:51.714867959 +0100
++++ ./depends/common/tinyxml2/tinyxml2.txt 2023-01-31 12:07:58.393962262 +0100
+@@ -0,0 +1 @@
++tinyxml2
https://github.com/leethomason/tinyxml2/archive/refs/tags/9.0.0.tar.gz
+diff -up ./FindTinyXML2.cmake.orig ./FindTinyXML2.cmake
+--- ./FindTinyXML2.cmake.orig 2023-01-31 12:07:35.484638804 +0100
++++ ./FindTinyXML2.cmake 2023-01-31 12:07:58.392962248 +0100
+@@ -0,0 +1,27 @@
++# - Find TinyXML2
++# Find the native TinyXML2 includes and library
++#
++# TINYXML2_FOUND - True if TinyXML2 found.
++# TINYXML2_INCLUDE_DIRS - where to find tinyxml2.h, etc.
++# TINYXML2_LIBRARIES - List of libraries when using TinyXML2.
++#
++
++find_package(PkgConfig)
++if(PKG_CONFIG_FOUND)
++ pkg_check_modules(PC_TINYXML2 tinyxml2 QUIET)
++endif()
++
++find_path(TINYXML2_INCLUDE_DIR tinyxml2.h PATHS ${PC_TINYXML2_INCLUDEDIR})
++find_library(TINYXML2_LIBRARY NAMES tinyxml2 PATHS ${PC_TINYXML2_LIBDIR})
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(TinyXML2
++ REQUIRED_VARS TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR
++ VERSION_VAR ${PC_TINYXML2_VERSION})
++
++if(TINYXML2_FOUND)
++ set(TINYXML2_INCLUDE_DIRS ${TINYXML2_INCLUDE_DIR})
++ set(TINYXML2_LIBRARIES ${TINYXML2_LIBRARY})
++endif()
++
++mark_as_advanced(TINYXML2_INCLUDE_DIR TINYXML2_LIBRARY)
+diff -up ./src/vbox/CategoryGenreMapper.cpp.orig ./src/vbox/CategoryGenreMapper.cpp
+--- ./src/vbox/CategoryGenreMapper.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/vbox/CategoryGenreMapper.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -16,7 +16,7 @@
+ #include <kodi/General.h>
+ #include <kodi/addon-instance/pvr/EPG.h>
+ #include <kodi/tools/StringUtils.h>
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ // using namespace xmltv;
+ using namespace kodi::tools;
+@@ -68,7 +68,7 @@ bool CategoryGenreMapper::LoadCategoryTo
+ std::unique_ptr<std::string> contents =
utilities::ReadFileContents(fileHandle);
+
+ // Try to parse the document
+- if (document.Parse(contents->c_str(), contents->size()) != XML_NO_ERROR)
++ if (document.Parse(contents->c_str(), contents->size()) != XML_SUCCESS)
+ throw vbox::InvalidXMLException("XML parsing failed: " +
std::string(document.ErrorName()));
+
+ // Create mappings
+diff -up ./src/vbox/GuideChannelMapper.cpp.orig ./src/vbox/GuideChannelMapper.cpp
+--- ./src/vbox/GuideChannelMapper.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/vbox/GuideChannelMapper.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -13,7 +13,7 @@
+
+ #include <memory>
+
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ using namespace vbox;
+ using namespace tinyxml2;
+@@ -74,7 +74,7 @@ void GuideChannelMapper::Load()
+ std::unique_ptr<std::string> contents =
utilities::ReadFileContents(fileHandle);
+
+ // Try to parse the document
+- if (document.Parse(contents->c_str(), contents->size()) != XML_NO_ERROR)
++ if (document.Parse(contents->c_str(), contents->size()) != XML_SUCCESS)
+ throw vbox::InvalidXMLException("XML parsing failed: " +
std::string(document.ErrorName()));
+
+ // Create mappings
+diff -up ./src/vbox/response/Content.cpp.orig ./src/vbox/response/Content.cpp
+--- ./src/vbox/response/Content.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/vbox/response/Content.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -13,7 +13,7 @@
+ #include "../../xmltv/Utilities.h"
+ #include "../Channel.h"
+
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ using namespace tinyxml2;
+ using namespace vbox;
+diff -up ./src/vbox/response/Response.cpp.orig ./src/vbox/response/Response.cpp
+--- ./src/vbox/response/Response.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/vbox/response/Response.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -31,7 +31,7 @@ Response::~Response()
+ void Response::ParseRawResponse(const std::string& rawResponse)
+ {
+ // Try to parse the response as XML
+- if (m_document->Parse(rawResponse.c_str(), rawResponse.size()) != XML_NO_ERROR)
++ if (m_document->Parse(rawResponse.c_str(), rawResponse.size()) != XML_SUCCESS)
+ throw vbox::InvalidXMLException("XML parsing failed: " +
std::string(m_document->ErrorName()));
+
+ // Parse the response status
+diff -up ./src/vbox/response/Response.h.orig ./src/vbox/response/Response.h
+--- ./src/vbox/response/Response.h.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/vbox/response/Response.h 2023-01-31 12:07:58.394962276 +0100
+@@ -11,7 +11,7 @@
+ #include <memory>
+ #include <string>
+
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ namespace vbox
+ {
+diff -up ./src/xmltv/Guide.cpp.orig ./src/xmltv/Guide.cpp
+--- ./src/xmltv/Guide.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/xmltv/Guide.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -15,7 +15,7 @@
+ #include <algorithm>
+
+ #include <kodi/tools/StringUtils.h>
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ using namespace kodi::tools;
+ using namespace xmltv;
+diff -up ./src/xmltv/Programme.cpp.orig ./src/xmltv/Programme.cpp
+--- ./src/xmltv/Programme.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/xmltv/Programme.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -10,7 +10,7 @@
+
+ #include "Utilities.h"
+
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ using namespace xmltv;
+ using namespace tinyxml2;
+diff -up ./src/xmltv/Utilities.cpp.orig ./src/xmltv/Utilities.cpp
+--- ./src/xmltv/Utilities.cpp.orig 2022-09-16 15:31:03.000000000 +0200
++++ ./src/xmltv/Utilities.cpp 2023-01-31 12:07:58.394962276 +0100
+@@ -14,7 +14,7 @@
+ #include <sstream>
+ #include <stdexcept>
+
+-#include <lib/tinyxml2/tinyxml2.h>
++#include <tinyxml2.h>
+
+ using namespace xmltv;
+
diff --git a/kodi-pvr-vbox.metainfo.xml b/kodi-pvr-vbox.metainfo.xml
new file mode 100644
index 0000000..45b4b2d
--- /dev/null
+++ b/kodi-pvr-vbox.metainfo.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+ <id>kodi-pvr-vbox</id>
+ <extends>kodi.desktop</extends>
+ <name>VBox TV Gateway PVR Client</name>
+ <summary>PVR addon for VBox Home TV Gateways</summary>
+ <url
type="homepage">https://github.com/xbmc/peripheral.joystick/...
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0-or-later</project_license>
+ <update_contact>melmorabity(a)fedoraproject.org</update_contact>
+</component>
diff --git a/kodi-pvr-vbox.spec b/kodi-pvr-vbox.spec
index 37e0097..0f45b83 100644
--- a/kodi-pvr-vbox.spec
+++ b/kodi-pvr-vbox.spec
@@ -1,26 +1,27 @@
%global kodi_addon pvr.vbox
-%global kodi_version 19.0
-%global kodi_codename Matrix
+%global kodi_version 20
+%global kodi_codename Nexus
Name: kodi-%(tr "." "-" <<<%{kodi_addon})
-Version: 8.1.2
-Release: 4%{?dist}
+Version: 20.3.0
+Release: 1%{?dist}
Summary: VBox Home TV Gateway PVR client for Kodi
-License: GPLv2+
+License: GPL-2.0-or-later
URL:
https://github.com/kodi-pvr/%{kodi_addon}/
Source0:
%{url}/archive/%{version}-%{kodi_codename}/%{kodi_addon}-%{version}.tar.gz
-# Use external tinyxml2 library
-Patch0: %{name}-8.0.0-use_external_tinyxml2.patch
-# Fix build with tinyxml2 >= 6.0.0
-Patch1: %{name}-7.0.0-tinyxml2_6.patch
+Source1: %{name}.metainfo.xml
+# Use external tinyxml2 library (see
+#
https://github.com/kodi-pvr/pvr.vbox/pull/275)
+Patch0: %{name}-20.3.0-use_external_tinyxml2.patch
BuildRequires: cmake3
BuildRequires: gcc-c++
BuildRequires: kodi-devel >= %{kodi_version}
+BuildRequires: libappstream-glib
BuildRequires: pkgconfig(tinyxml2)
Requires: kodi >= %{kodi_version}
-ExcludeArch: %{power64} ppc64le
+ExcludeArch: %{power64}
%description
%{summary}.
@@ -29,9 +30,6 @@ ExcludeArch: %{power64} ppc64le
%prep
%autosetup -n %{kodi_addon}-%{version}-%{kodi_codename} -p0
-# Drop bundled tinyxml2 library
-rm -r lib/tinyxml2/
-
%build
%cmake3
@@ -40,6 +38,12 @@ rm -r lib/tinyxml2/
%install
%cmake3_install
+# Install AppData file
+install -Dpm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_metainfodir}/%{name}.metainfo.xml
+
+
+%check
+appstream-util validate-relax --nonet
$RPM_BUILD_ROOT%{_metainfodir}/%{name}.metainfo.xml
%files
@@ -47,9 +51,15 @@ rm -r lib/tinyxml2/
%license LICENSE.md
%{_libdir}/kodi/addons/%{kodi_addon}/
%{_datadir}/kodi/addons/%{kodi_addon}/
+%{_metainfodir}/%{name}.metainfo.xml
%changelog
+* Sun Jan 29 2023 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 20.3.0-1
+- Update to 20.3.0
+- Add AppStream metadata
+- Switch to SPDX license identifiers
+
* Sun Aug 07 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
8.1.2-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
5.1
diff --git a/sources b/sources
index 9b797b3..f32a095 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pvr.vbox-8.1.2.tar.gz) =
f0e3bed8305d9f7762ed41c3350029e5b374cacf3bf936e5b35503f651761e7addca1f961a7d44739dfd92e48bdd7756c53b616e2183c91c446afc2411598eed
+SHA512 (pvr.vbox-20.3.0.tar.gz) =
28fc8d3d905bd10825c27d6d5fbd330edaedfbe09cf9e4489fbe375a630c5ac42ec65e1e18507cd3df0f03dc63b5744be9a8f6175cea104920bb73d7637ec834