Date: Saturday, May 1, 2021 @ 20:44:29
  Author: bgyorgy
Revision: 926045

Use patch to add AppStream metadata

Added:
  qnapi/trunk/0001-Add-AppStream-metadata-file.patch
Modified:
  qnapi/trunk/PKGBUILD
Deleted:
  qnapi/trunk/qnapi.appdata.xml

----------------------------------------+
 0001-Add-AppStream-metadata-file.patch |   71 +++++++++++++++++++++++++++++++
 PKGBUILD                               |   22 ++++-----
 qnapi.appdata.xml                      |   35 ---------------
 3 files changed, 82 insertions(+), 46 deletions(-)

Added: 0001-Add-AppStream-metadata-file.patch
===================================================================
--- 0001-Add-AppStream-metadata-file.patch                              (rev 0)
+++ 0001-Add-AppStream-metadata-file.patch      2021-05-01 20:44:29 UTC (rev 
926045)
@@ -0,0 +1,71 @@
+From 2e5be972cbdf909aef39c8156fc6f83a52a6cdeb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballog...@gmail.com>
+Date: Sat, 1 May 2021 22:33:04 +0200
+Subject: [PATCH] Add AppStream metadata file
+
+It's useful for software catalogs to display detailed information about this 
application.
+---
+ doc/qnapi.appdata.xml | 35 +++++++++++++++++++++++++++++++++++
+ qnapi.pro             |  4 +++-
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+ create mode 100644 doc/qnapi.appdata.xml
+
+diff --git a/doc/qnapi.appdata.xml b/doc/qnapi.appdata.xml
+new file mode 100644
+index 0000000..ed88899
+--- /dev/null
++++ b/doc/qnapi.appdata.xml
+@@ -0,0 +1,35 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop">
++  <id>io.github.qnapi</id>
++  <metadata_license>CC0-1.0</metadata_license>
++  <project_license>GPL-2.0+</project_license>
++  <name>QNapi</name>
++  <summary>A software for downloading and automatic matching subtitles to 
movies</summary>
++  <description>
++    <p>QNapi is designed to automatically download and match subtitles to a 
specific movie file. Unlike similar programs, QNapi queries several different 
subtitle databases to find the best subtitles for your movie. Also, thanks to 
the QT library, the program runs on various operating systems (Windows, OSX, 
Linux).</p>
++    <ul>
++      <li>matching subtitles for specific movie file</li>
++      <li>automatic matching the best subtitles</li>
++      <li>select target subtitles format (SRT, mDVD, TMP, MPL2) as well as 
manual conversion</li>
++      <li>select subtitles, when multiple matching has been found</li>
++      <li>download subtitles in one of many supported languages</li>
++      <li>directory scanning and batch subtitles download</li>
++      <li>subtitles post-processing: change file encoding, set file 
permissions</li>
++      <li>provides nice command-line interface</li>
++    </ul>
++  </description>
++  <launchable type="desktop-id">qnapi.desktop</launchable>
++  <url type="homepage">https://qnapi.github.io/</url>
++  <screenshots>
++    <screenshot type="default">
++      
<image>https://qnapi.github.io/images/screenshots/0.1.7/lin05.png</image>
++    </screenshot>
++  </screenshots>
++  <content_rating type="oars-1.1">
++    <content_attribute id="social-chat">intense</content_attribute>
++  </content_rating>
++  <url type="bugtracker">https://github.com/QNapi/qnapi/issues</url>
++  <url type="help">https://qnapi.github.io/#help</url>
++  <url type="donation">https://qnapi.github.io/#donate</url>
++  <developer_name>Piotr Krzemiński</developer_name>
++</component>
+diff --git a/qnapi.pro b/qnapi.pro
+index 1ba7529..db4e8ec 100644
+--- a/qnapi.pro
++++ b/qnapi.pro
+@@ -46,7 +46,9 @@ unix {
+ 
+     desktop.path = $${INSTALL_PREFIX}/share/applications
+     desktop.files = doc/qnapi.desktop
+-    INSTALLS += target doc man man_it man_pl desktop
++    metainfo.path = $${INSTALL_PREFIX}/share/metainfo
++    metainfo.files = doc/qnapi.appdata.xml
++    INSTALLS += target doc man man_it man_pl desktop metainfo
+ }
+ 
+ macx {
+-- 
+2.31.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-05-01 20:04:43 UTC (rev 926044)
+++ PKGBUILD    2021-05-01 20:44:29 UTC (rev 926045)
@@ -6,27 +6,28 @@
 pkgname=qnapi
 pkgver=0.2.3
 pkgrel=4
-pkgdesc="Qt client for downloading movie subtitles from NapiProjekt, 
OpenSubtitles, Napisy24"
-arch=(x86_64)
-url="https://qnapi.github.io/";
-license=(GPL)
-depends=(hicolor-icon-theme libmediainfo p7zip qt5-base)
-source=(https://github.com/QNapi/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
-        qt-5.11.patch
-        qnapi.appdata.xml)
+pkgdesc='Qt client for downloading movie subtitles from NapiProjekt, 
OpenSubtitles, Napisy24'
+arch=('x86_64')
+url='https://qnapi.github.io/'
+license=('GPL')
+depends=('hicolor-icon-theme' 'libmediainfo' 'p7zip' 'qt5-base')
+source=("https://github.com/QNapi/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz";
+        'qt-5.11.patch'
+        '0001-Add-AppStream-metadata-file.patch')
 sha256sums=('8debb6862e96e52e4060131b314d9b887051a646a4a57c87c0287f2655357046'
             'c10d4be453ea1ca313079abd5b7caeecb35d99dd711e4da288bf3d74138d0c01'
-            '6d90b97e4b9209d79cad4a28c4647dd78dc077bd04182bd0644464d888a3e41f')
+            '463325b8af9840ce748f862dd6f3b25fd818d64ade98e5fbcd8950cacf7af530')
 
 prepare() {
   cd $pkgname-$pkgver
   patch -Np1 -i ../qt-5.11.patch
+  patch -Np1 -i ../0001-Add-AppStream-metadata-file.patch
   sed -i '/INSTALLS +=/ s/ doc//' qnapi.pro
 }
 
 build() {
   cd $pkgname-$pkgver
-  qmake-qt5 QMAKE_DEFAULT_INCDIRS="" qnapi.pro
+  qmake-qt5 QMAKE_DEFAULT_INCDIRS='' qnapi.pro
   make
 }
 
@@ -34,5 +35,4 @@
   cd $pkgname-$pkgver
   make INSTALL_ROOT="$pkgdir" install
   install -Dm644 -t "$pkgdir/usr/share/kservices5/ServiceMenus/" 
doc/qnapi-{download,scan}.desktop
-  install -Dm644 ../$pkgname.appdata.xml 
"$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
 }

Deleted: qnapi.appdata.xml
===================================================================
--- qnapi.appdata.xml   2021-05-01 20:04:43 UTC (rev 926044)
+++ qnapi.appdata.xml   2021-05-01 20:44:29 UTC (rev 926045)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component type="desktop">
-  <id>io.github.qnapi</id>
-  <metadata_license>CC0-1.0</metadata_license>
-  <project_license>GPL-2.0+</project_license>
-  <name>QNapi</name>
-  <summary>A software for downloading and automatic matching subtitles to 
movies</summary>
-  <description>
-    <p>QNapi is designed to automatically download and match subtitles to a 
specific movie file. Unlike similar programs, QNapi queries several different 
subtitle databases to find the best subtitles for your movie. Also, thanks to 
the QT library, the program runs on various operating systems (Windows, OSX, 
Linux).</p>
-    <ul>
-      <li>matching subtitles for specific movie file</li>
-      <li>automatic matching the best subtitles</li>
-      <li>select target subtitles format (SRT, mDVD, TMP, MPL2) as well as 
manual conversion</li>
-      <li>select subtitles, when multiple matching has been found</li>
-      <li>download subtitles in one of many supported languages</li>
-      <li>directory scanning and batch subtitles download</li>
-      <li>subtitles post-processing: change file encoding, set file 
permissions</li>
-      <li>provides nice command-line interface</li>
-    </ul>
-  </description>
-  <launchable type="desktop-id">qnapi.desktop</launchable>
-  <url type="homepage">https://qnapi.github.io/</url>
-  <screenshots>
-    <screenshot type="default">
-      <image>https://qnapi.github.io/images/screenshots/0.1.7/lin05.png</image>
-    </screenshot>
-  </screenshots>
-  <content_rating type="oars-1.1">
-    <content_attribute id="social-chat">intense</content_attribute>
-  </content_rating>
-  <url type="bugtracker">https://github.com/QNapi/qnapi/issues</url>
-  <url type="help">https://qnapi.github.io/#help</url>
-  <url type="donation">https://qnapi.github.io/#donate</url>
-  <developer_name>Piotr Krzemiński</developer_name>
-</component>

Reply via email to