parent
ad8a614c1f
commit
19ec459cc7
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
|
||||
# Licensed under the GNU General Public License Version or later
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
print("usage: %s README.txt \"header to match\"" % sys.argv[0])
|
||||
return 1
|
||||
|
||||
# open file
|
||||
f = open(sys.argv[1])
|
||||
in_section = False
|
||||
in_table = False
|
||||
pids = []
|
||||
for line in f.readlines():
|
||||
|
||||
# find the right data table
|
||||
if line.find(sys.argv[2]) != -1:
|
||||
in_section = True
|
||||
continue
|
||||
if not in_section:
|
||||
continue
|
||||
|
||||
# remove Windows and Linux line endings
|
||||
line = line.replace('\r', '')
|
||||
line = line.replace('\n', '')
|
||||
|
||||
# end of section
|
||||
if len(line) > 0 and not line.startswith(' '):
|
||||
in_section = False
|
||||
in_table = False
|
||||
continue
|
||||
|
||||
# empty line
|
||||
if len(line) == 0:
|
||||
continue
|
||||
|
||||
# skip the header
|
||||
if line.startswith(' ---'):
|
||||
in_table = True
|
||||
continue
|
||||
if not in_table:
|
||||
continue
|
||||
|
||||
# get name
|
||||
pid = int(line[42:46], 16)
|
||||
if not pid in pids:
|
||||
pids.append(pid)
|
||||
|
||||
# output
|
||||
for pid in pids:
|
||||
vid = 0x10de
|
||||
print("pci:v%08Xd%08Xsv*sd*bc*sc*i*" % (vid, pid))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2016 Richard Hughes <richard@hughsie.com> -->
|
||||
<component type="driver">
|
||||
<id>xorg-x11-drv-nvidia</id>
|
||||
<name>NVIDIA Linux Graphics Driver</name>
|
||||
<summary>Accelerated Linux Graphics Driver</summary>
|
||||
<description>
|
||||
<p>
|
||||
The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D
|
||||
functionality and high-performance OpenGL support to Linux with the
|
||||
use of NVIDIA graphics processing units.
|
||||
</p>
|
||||
<p>
|
||||
These drivers provide optimized hardware acceleration for OpenGL and X
|
||||
applications and support nearly all recent NVIDIA GPU products.
|
||||
The NVIDIA graphics driver uses a Unified Driver Architecture: the single
|
||||
graphics driver supports all modern NVIDIA GPUs.
|
||||
</p>
|
||||
</description>
|
||||
<translation/>
|
||||
<url type="homepage">http://www.nvidia.com/</url>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LicenseRef-proprietary:NVIDIA</project_license>
|
||||
<developer_name>NVIDIA Corporation</developer_name>
|
||||
<keywords>
|
||||
<keyword>NVIDIA</keyword>
|
||||
<keyword>driver</keyword>
|
||||
<keyword>GeForce</keyword>
|
||||
<keyword>CUDA</keyword>
|
||||
<keyword>Quadro</keyword>
|
||||
<keyword>Vulkan</keyword>
|
||||
<keyword>OpenGL</keyword>
|
||||
</keywords>
|
||||
<url type="bugtracker">https://bugzilla.rpmfusion.org</url>
|
||||
<update_contact>xorg-x11-drv-nvidia@rpmfusion.org</update_contact>
|
||||
</component>
|
Loading…
Reference in new issue