Update AppStream metadata generation

el9
Leigh Scott 4 years ago
parent d745c95939
commit a0a88e6285

@ -1,61 +1,61 @@
#!/usr/bin/python3 #!/usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2016 Richard Hughes <richard@hughsie.com> # Copyright (C) 2021 Simone Caronni <negativo17@gmail.com>
# Licensed under the GNU General Public License Version or later # Licensed under the GNU General Public License Version or later
from __future__ import print_function
import sys import sys
def main(): def main():
if len(sys.argv) != 3: if len(sys.argv) != 2:
print("usage: %s README.txt \"header to match\"" % sys.argv[0]) print("usage: %s README.txt" % sys.argv[0])
return 1 return 1
# open file
f = open(sys.argv[1]) f = open(sys.argv[1])
in_section = False in_section = False
in_table = False in_table = False
pids = [] pids = []
sections = ["NVIDIA GEFORCE GPUS", "NVIDIA RTX/QUADRO GPUS", "NVIDIA NVS GPUS", "NVIDIA TESLA GPUS", "NVIDIA GRID GPUS"]
for section in sections:
for line in f.readlines(): for line in f.readlines():
# find the right data table # Find the right data tables
if line.find(sys.argv[2]) != -1: if line.find(section) != -1:
in_section = True in_section = True
continue continue
if not in_section: if not in_section:
continue continue
# remove Windows and Linux line endings # Remove Windows and Linux line endings
line = line.replace('\r', '') line = line.replace('\r', '')
line = line.replace('\n', '') line = line.replace('\n', '')
# end of section # End of section
if len(line) > 0 and not line.startswith(' '): if len(line) > 0 and not line.startswith(' '):
in_section = False in_section = False
in_table = False in_table = False
continue continue
# empty line
if len(line) == 0: if len(line) == 0:
continue continue
# skip the header # Skip the header
if line.startswith(' ---'): if line.startswith(' ---'):
in_table = True in_table = True
continue continue
if not in_table: if not in_table:
continue continue
# get name # PCI ID
pid = int(line[42:46], 16) pid = int(line[50:54], 16)
if not pid in pids: if not pid in pids:
pids.append(pid) pids.append(pid)
# output
for pid in pids: for pid in pids:
vid = 0x10de vid = 0x10de
print("pci:v%08Xd%08Xsv*sd*bc*sc*i*" % (vid, pid)) print("pci:v%08Xd%08Xsv*sd*bc*sc*i*" % (vid, pid))
if __name__ == "__main__": if __name__ == "__main__":
main() main()

@ -17,20 +17,32 @@
graphics driver supports all modern NVIDIA GPUs. graphics driver supports all modern NVIDIA GPUs.
</p> </p>
</description> </description>
<translation/>
<url type="homepage">http://www.nvidia.com/</url> <url type="homepage">http://www.nvidia.com/</url>
<icon type="local" width="128" height="128">/usr/share/pixmaps/xorg-x11-drv-nvidia.png</icon> <icon type="local" width="128" height="128">/usr/share/pixmaps/xorg-x11-drv-nvidia.png</icon>
<metadata_license>CC0-1.0</metadata_license> <metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary:NVIDIA</project_license> <project_license>LicenseRef-proprietary:NVIDIA</project_license>
<developer_name>NVIDIA Corporation</developer_name> <developer_name>NVIDIA Corporation</developer_name>
<keywords> <keywords>
<keyword>NVIDIA</keyword>
<keyword>driver</keyword>
<keyword>GeForce</keyword>
<keyword>CUDA</keyword> <keyword>CUDA</keyword>
<keyword>GeForce</keyword>
<keyword>NVIDIA</keyword>
<keyword>OpenGL</keyword>
<keyword>Quadro</keyword> <keyword>Quadro</keyword>
<keyword>Tesla</keyword>
<keyword>Video</keyword>
<keyword>Vulkan</keyword> <keyword>Vulkan</keyword>
<keyword>OpenGL</keyword> <keyword>av1</keyword>
<keyword>avc</keyword>
<keyword>driver</keyword>
<keyword>h264</keyword>
<keyword>h265</keyword>
<keyword>hevc</keyword>
<keyword>jpeg</keyword>
<keyword>mpeg2</keyword>
<keyword>vaapi</keyword>
<keyword>vc-1</keyword>
<keyword>vp8</keyword>
<keyword>vp9</keyword>
</keywords> </keywords>
<url type="bugtracker">https://bugzilla.rpmfusion.org</url> <url type="bugtracker">https://bugzilla.rpmfusion.org</url>
<update_contact>xorg-x11-drv-nvidia-owner@rpmfusion.org</update_contact> <update_contact>xorg-x11-drv-nvidia-owner@rpmfusion.org</update_contact>

@ -22,7 +22,7 @@
Name: xorg-x11-drv-nvidia Name: xorg-x11-drv-nvidia
Epoch: 3 Epoch: 3
Version: 465.24.02 Version: 465.24.02
Release: 1%{?dist} Release: 2%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted License: Redistributable, no modification permitted
@ -332,11 +332,7 @@ EOF
# install AppData and add modalias provides # install AppData and add modalias provides
mkdir -p %{buildroot}%{_metainfodir}/ mkdir -p %{buildroot}%{_metainfodir}/
install -pm 0644 %{SOURCE8} %{buildroot}%{_metainfodir}/ install -pm 0644 %{SOURCE8} %{buildroot}%{_metainfodir}/
#fn=%{buildroot}%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml %{SOURCE9} README.txt | xargs appstream-util add-provide %{buildroot}%{_metainfodir}/xorg-x11-drv-nvidia.metainfo.xml modalias
#%{SOURCE9} README.txt "NVIDIA GEFORCE GPUS" | xargs appstream-util add-provide ${fn} modalias
#%{SOURCE9} README.txt "NVIDIA RTX/QUADRO GPUS" | xargs appstream-util add-provide ${fn} modalias
#%{SOURCE9} README.txt "NVIDIA NVS GPUS" | xargs appstream-util add-provide ${fn} modalias
#%{SOURCE9} README.txt "NVIDIA TESLA GPUS" | xargs appstream-util add-provide ${fn} modalias
mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_datadir}/pixmaps
install -pm 0644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/%{name}.png install -pm 0644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%endif %endif
@ -531,6 +527,9 @@ fi ||:
%{_libdir}/libnvidia-encode.so %{_libdir}/libnvidia-encode.so
%changelog %changelog
* Thu Apr 15 2021 Leigh Scott <leigh123linux@gmail.com> - 3:465.24.02-2
- Update AppStream metadata generation
* Wed Apr 14 2021 Leigh Scott <leigh123linux@gmail.com> - 3:465.24.02-1 * Wed Apr 14 2021 Leigh Scott <leigh123linux@gmail.com> - 3:465.24.02-1
- Update to 465.24.02 release - Update to 465.24.02 release

Loading…
Cancel
Save