Changes for mesa glvnd

el9
leigh123linux 8 years ago
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>

@ -1,7 +1,6 @@
%global _nvidia_serie nvidia %global _nvidia_serie nvidia
%global _nvidia_libdir %{_libdir}/%{_nvidia_serie} %global _nvidia_libdir %{_libdir}
%global _nvidia_xorgdir %{_nvidia_libdir}/xorg %global _nvidia_xorgdir %{_libdir}/%{_nvidia_serie}/xorg
%global _glvnd_libdir %{_libdir}/libglvnd
%global debug_package %{nil} %global debug_package %{nil}
%global __strip /bin/true %global __strip /bin/true
@ -9,7 +8,7 @@
Name: xorg-x11-drv-nvidia Name: xorg-x11-drv-nvidia
Epoch: 1 Epoch: 1
Version: 375.26 Version: 375.26
Release: 7%{?dist} Release: 8%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
Group: User Interface/X Hardware Support Group: User Interface/X Hardware Support
@ -27,6 +26,8 @@ Source8: nvidia-old.conf
Source9: nvidia-settings.desktop Source9: nvidia-settings.desktop
Source10: nvidia.conf Source10: nvidia.conf
Source11: 00-ignoreabi.conf Source11: 00-ignoreabi.conf
Source12: xorg-x11-drv-nvidia.metainfo.xml
Source13: parse-readme.py
ExclusiveArch: i686 x86_64 armv7hl ExclusiveArch: i686 x86_64 armv7hl
@ -37,6 +38,10 @@ Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%endif %endif
%if 0%{?fedora} >= 25
# AppStream metadata generation
BuildRequires: libappstream-glib%{?_isa} >= 0.6.3
%endif
Requires(post): ldconfig Requires(post): ldconfig
Requires(postun): ldconfig Requires(postun): ldconfig
@ -44,9 +49,12 @@ Requires(post): grubby
Requires: which Requires: which
Requires: %{_nvidia_serie}-kmod >= %{?epoch}:%{version} Requires: %{_nvidia_serie}-kmod >= %{?epoch}:%{version}
Requires: %{name}-libs%{_isa} = %{?epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{?epoch}:%{version}-%{release}
%if 0%{?fedora} >= 25 %if 0%{?fedora} >= 25
Requires: xorg-x11-server-Xorg%{_isa} >= 1.19.0-3 Requires: xorg-x11-server-Xorg%{?_isa} >= 1.19.0-3
Requires: mesa-libEGL%{?_isa} >= 13.0.3-3
Requires: mesa-libGL%{?_isa} >= 13.0.3-3
Requires: mesa-libGLES%{?_isa} >= 13.0.3-3
%endif %endif
Obsoletes: %{_nvidia_serie}-kmod < %{?epoch}:%{version} Obsoletes: %{_nvidia_serie}-kmod < %{?epoch}:%{version}
@ -90,12 +98,12 @@ http://rpmfusion.org/Howto/nVidia
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}-libs%{_isa} = %{?epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{?epoch}:%{version}-%{release}
Requires: %{name}-cuda%{_isa} = %{?epoch}:%{version}-%{release} Requires: %{name}-cuda%{?_isa} = %{?epoch}:%{version}-%{release}
#Don't put an epoch here #Don't put an epoch here
Provides: cuda-drivers-devel = %{version} Provides: cuda-drivers-devel = %{version}
Provides: cuda-drivers-devel%{_isa} = %{version} Provides: cuda-drivers-devel%{?_isa} = %{version}
%description devel %description devel
This package provides the development files of the %{name} package, This package provides the development files of the %{name} package,
@ -112,7 +120,7 @@ Conflicts: xorg-x11-drv-nvidia-340xx-cuda
#Don't put an epoch here #Don't put an epoch here
Provides: cuda-drivers = %{version} Provides: cuda-drivers = %{version}
Provides: cuda-drivers%{_isa} = %{version} Provides: cuda-drivers%{?_isa} = %{version}
%description cuda %description cuda
This package provides the CUDA driver libraries. This package provides the CUDA driver libraries.
@ -129,8 +137,14 @@ which is generated during the build of main package.
Summary: Libraries for %{name} Summary: Libraries for %{name}
Group: User Interface/X Hardware Support Group: User Interface/X Hardware Support
Requires: %{name} = %{?epoch}:%{version}-%{release} Requires: %{name} = %{?epoch}:%{version}-%{release}
Requires: libvdpau%{_isa} >= 0.5 Requires: libvdpau%{?_isa} >= 0.5
Requires: libglvnd%{_isa} Requires: libglvnd%{?_isa} >= 0.2
%if 0%{?fedora} >= 25
Requires: libglvnd-egl%{?_isa} >= 0.2
Requires: libglvnd-gles%{?_isa} >= 0.2
Requires: libglvnd-glx%{?_isa} >= 0.2
Requires: libglvnd-opengl%{?_isa} >= 0.2
%endif
%ifarch x86_64 i686 %ifarch x86_64 i686
Requires: vulkan-filesystem Requires: vulkan-filesystem
%endif %endif
@ -174,10 +188,6 @@ rm -f nvidia-installer*
install -m 0755 -d $RPM_BUILD_ROOT%{_bindir} install -m 0755 -d $RPM_BUILD_ROOT%{_bindir}
# ld.so.conf.d file
install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/
echo -e "%{_nvidia_libdir} \n%{_glvnd_libdir} \n" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
#Blacklist nouveau (since F-11) #Blacklist nouveau (since F-11)
install -m 0755 -d $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/ install -m 0755 -d $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/
install -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/ install -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/
@ -265,7 +275,9 @@ rm $RPM_BUILD_ROOT%{_nvidia_libdir}/libnvidia-{cfg,tls}.so
#Install static driver dependant configuration files #Install static driver dependant configuration files
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
%if 0%{?fedora} <= 24
install -pm 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d install -pm 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
%endif
install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/ install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/
%if 0%{?fedora} <= 24 %if 0%{?fedora} <= 24
install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
@ -287,10 +299,6 @@ desktop-file-install --vendor "" \
#Workaround for self made xorg.conf using a Files section. #Workaround for self made xorg.conf using a Files section.
ln -fs ../../%{_nvidia_serie}/xorg $RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version} ln -fs ../../%{_nvidia_serie}/xorg $RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
#Workaround for cuda availability - rfbz#2916
ln -fs %{_nvidia_libdir}/libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/libcuda.so.1
ln -fs %{_nvidia_libdir}/libcuda.so $RPM_BUILD_ROOT%{_libdir}/libcuda.so
#Alternate-install-present is checked by the nvidia .run #Alternate-install-present is checked by the nvidia .run
install -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_nvidia_libdir} install -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_nvidia_libdir}
@ -337,6 +345,17 @@ tar Jcf $RPM_BUILD_ROOT%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}
#Add autostart file for nvidia-settings to load user config #Add autostart file for nvidia-settings to load user config
install -D -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/nvidia-settings.desktop install -D -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/nvidia-settings.desktop
%if 0%{?fedora} >= 25
# install AppData and add modalias provides
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata/
install -pm 0644 %{SOURCE12} %{buildroot}%{_datadir}/appdata/
fn=$RPM_BUILD_ROOT%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{SOURCE13} README.txt "NVIDIA GEFORCE GPUS" | xargs appstream-util add-provide ${fn} modalias
%{SOURCE13} README.txt "NVIDIA QUADRO GPUS" | xargs appstream-util add-provide ${fn} modalias
%{SOURCE13} README.txt "NVIDIA NVS GPUS" | xargs appstream-util add-provide ${fn} modalias
%{SOURCE13} README.txt "NVIDIA TESLA GPUS" | xargs appstream-util add-provide ${fn} modalias
%endif
%pre %pre
if [ "$1" -eq "1" ]; then if [ "$1" -eq "1" ]; then
@ -452,8 +471,8 @@ fi ||:
%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf %ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
%if 0%{?fedora} <= 24 %if 0%{?fedora} <= 24
%config %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf %config %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%endif
%config %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf %config %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
%endif
# Comment Xorg abi override # Comment Xorg abi override
#%%config %%{_sysconfdir}/X11/xorg.conf.d/00-ignoreabi.conf #%%config %%{_sysconfdir}/X11/xorg.conf.d/00-ignoreabi.conf
%config(noreplace) %{_prefix}/lib/modprobe.d/blacklist-nouveau.conf %config(noreplace) %{_prefix}/lib/modprobe.d/blacklist-nouveau.conf
@ -478,6 +497,9 @@ fi ||:
%if 0%{?fedora} >= 21 %if 0%{?fedora} >= 21
%{_datadir}/X11/xorg.conf.d/nvidia.conf %{_datadir}/X11/xorg.conf.d/nvidia.conf
%endif %endif
%if 0%{?fedora} >= 25
%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%endif
%dir %{_datadir}/nvidia %dir %{_datadir}/nvidia
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-* %{_datadir}/nvidia/nvidia-application-profiles-%{version}-*
%{_datadir}/applications/*nvidia-settings.desktop %{_datadir}/applications/*nvidia-settings.desktop
@ -492,7 +514,6 @@ fi ||:
%files libs %files libs
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{_nvidia_libdir} %dir %{_nvidia_libdir}
%config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%ghost %{_sysconfdir}/prelink.conf.d/nvidia-%{_lib}.conf %ghost %{_sysconfdir}/prelink.conf.d/nvidia-%{_lib}.conf
%{_nvidia_libdir}/alternate-install-present %{_nvidia_libdir}/alternate-install-present
%{_nvidia_libdir}/*.so.* %{_nvidia_libdir}/*.so.*
@ -526,7 +547,6 @@ fi ||:
%{_bindir}/nvidia-persistenced %{_bindir}/nvidia-persistenced
#nvidia-modprobe is setuid root to allow users to load the module in #nvidia-modprobe is setuid root to allow users to load the module in
%attr(4755, root, root) %{_bindir}/nvidia-modprobe %attr(4755, root, root) %{_bindir}/nvidia-modprobe
%{_libdir}/libcuda.so*
%{_nvidia_libdir}/libcuda.so* %{_nvidia_libdir}/libcuda.so*
%{_nvidia_libdir}/libnvcuvid.so* %{_nvidia_libdir}/libnvcuvid.so*
%{_nvidia_libdir}/libnvidia-encode.so* %{_nvidia_libdir}/libnvidia-encode.so*
@ -569,6 +589,11 @@ fi ||:
%{_nvidia_libdir}/libGLX_nvidia.so %{_nvidia_libdir}/libGLX_nvidia.so
%changelog %changelog
* Tue Jan 17 2017 Leigh Scott <leigh123linux@googlemail.com> - 1:375.26-8
- Changes for mesa glvnd
- Move nvidia libs to lib directoy and remove ldconfig config file
- Add appdata info
* Sat Dec 31 2016 leigh scott <leigh123linux@googlemail.com> - 1:375.26-7 * Sat Dec 31 2016 leigh scott <leigh123linux@googlemail.com> - 1:375.26-7
- Update nvidia.conf for latest Xorg changes - Update nvidia.conf for latest Xorg changes

Loading…
Cancel
Save