commit a99ef55511459d99fb518e4adf46e07092b91048
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Mar 23 11:57:23 2018 +0100
Add appstream support
intel-vaapi-driver.metainfo.xml | 32 ++++++++++++++++++++++++++++++
libva-intel-driver.spec | 20 ++++++++++++++++++-
parse-intel-vaapi-driver.py | 43 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 94 insertions(+), 1 deletion(-)
---
diff --git a/intel-vaapi-driver.metainfo.xml b/intel-vaapi-driver.metainfo.xml
new file mode 100644
index 0000000..2d0c833
--- /dev/null
+++ b/intel-vaapi-driver.metainfo.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2018 Nicolas Chauvet <kwizart(a)gmail.com> -->
+<component type="driver">
+ <id>libva-intel-driver</id>
+ <name>HW video decode support for Intel integrated graphics</name>
+ <summary>Accelerated Linux Graphics Driver</summary>
+ <description>
+ <p>
+ HW video decode support for Intel integrated graphics.
+ </p>
+ </description>
+ <translation/>
+ <url
type="homepage">https://github.com/intel/intel-vaapi-driver&...
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>LicenseRef:MIT</project_license>
+ <developer_name>Intel Corporation</developer_name>
+ <keywords>
+ <keyword>Intel</keyword>
+ <keyword>driver</keyword>
+ <keyword>VA-API</keyword>
+ <keyword>vaapi</keyword>
+ <keyword>HW</keyword>
+ <keyword>Video</keyword>
+ <keyword>Decode</keyword>
+ <keyword>Encode</keyword>
+ <keyword>h264</keyword>
+ <keyword>vp8</keyword>
+ <keyword>vp9</keyword>
+ </keywords>
+ <url type="bugtracker">https://bugzilla.rpmfusion.org</url>
+ <update_contact>libva-intel-driver-owner(a)rpmfusion.org</update_contact>
+</component>
diff --git a/libva-intel-driver.spec b/libva-intel-driver.spec
index a8d6851..5783436 100644
--- a/libva-intel-driver.spec
+++ b/libva-intel-driver.spec
@@ -2,16 +2,22 @@
Name: libva-intel-driver
Version: 2.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: HW video decode support for Intel integrated graphics
License: MIT and EPL
URL:
https://01.org/linuxmedia
Source0:
https://github.com/intel/intel-vaapi-driver/archive/%{version}.tar.gz#/%{...
+Source1: intel-vaapi-driver.metainfo.xml
+Source9: parse-intel-vaapi-driver.py
ExclusiveArch: %{ix86} x86_64
BuildRequires: libtool
BuildRequires: python2
+%if 0%{?fedora} >= 28
+# AppStream metadata generation
+BuildRequires: libappstream-glib >= 0.6.3
+%endif
#Renamed when moved to
01.org
Provides: intel-vaapi-driver = %{version}-%{release}
@@ -65,14 +71,26 @@ find %{buildroot} -regex ".*\.la$" | xargs rm -f --
gendiff . .prebuilt
}
+%if 0%{?fedora} >= 28
+# install AppData and add modalias provides
+mkdir -p %{buildroot}%{_datadir}/appdata/
+install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/
+fn=%{buildroot}%{_datadir}/appdata/intel-vaapi-driver.metainfo.xml
+%{SOURCE9} src/i965_pciids.h | xargs appstream-util add-provide ${fn} modalias
+%endif
+
%files
%doc AUTHORS NEWS README
%license COPYING
%{_libdir}/dri/i965_drv_video.so
+%{_datadir}/appdata/intel-vaapi-driver.metainfo.xml
%changelog
+* Fri Mar 23 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 2.1.0-2
+- Add appstream support
+
* Mon Feb 12 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 2.1.0-1
- Update to 2.1.0
diff --git a/parse-intel-vaapi-driver.py b/parse-intel-vaapi-driver.py
new file mode 100755
index 0000000..5deac83
--- /dev/null
+++ b/parse-intel-vaapi-driver.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python2
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2018 Nicolas Chauvet <kwizart(a)gmail.com>
+# Licensed under the GNU General Public License Version or later
+
+from __future__ import print_function
+import sys
+
+def main():
+ if len(sys.argv) != 2:
+ print("usage: %s src/i965_pciids.h" % sys.argv[0])
+ return 1
+
+ # open file
+ f = open(sys.argv[1])
+ pids = []
+ for line in f.readlines():
+
+ # remove Windows and Linux line endings
+ line = line.replace('\r', '')
+ line = line.replace('\n', '')
+
+ # Only look at line with CHIPSET
+ if len(line) > 0 and not line.startswith('CHIPSET'):
+ continue
+
+ # empty line
+ if len(line) == 0:
+ continue
+
+ # get name
+ pid = int(line[10:14], 16)
+ if not pid in pids:
+ pids.append(pid)
+
+ # output
+ for pid in pids:
+ vid = 0x8086
+ print("pci:v%08Xd%08Xsv*sd*bc*sc*i*" % (vid, pid))
+
+if __name__ == "__main__":
+ main()